Skip to content

Commit 4c1187e

Browse files
authored
[automated] Merge branch 'main' => 'prerelease' (#8612)
2 parents ff3ca2a + 4f92206 commit 4c1187e

File tree

86 files changed

+1720
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1720
-126
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"vsix/": true
1313
},
1414
"[typescript]": {
15-
"editor.defaultFormatter": "esbenp.prettier-vscode"
15+
"editor.defaultFormatter": "esbenp.prettier-vscode",
16+
"editor.formatOnSave": true
1617
},
1718
"csharp.suppressDotnetRestoreNotification": true,
1819
"typescript.tsdk": "./node_modules/typescript/lib",

CHANGELOG.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
33
- Diagnostics related feature requests and improvements [#5951](https://github.com/dotnet/vscode-csharp/issues/5951)
44
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
55

6+
# 2.91.x
7+
* Bump Roslyn to 5.0.0-2.25458.10 (PR: [#8588](https://github.com/dotnet/vscode-csharp/pull/8588))
8+
* Move brace adjustment on enter to on auto insert in LSP(PR: [#80075](https://github.com/dotnet/roslyn/pull/80075))
9+
* Avoid throwing when obsolete overload of GetUpdatesAsync is invoked with empty array(PR: [#80161](https://github.com/dotnet/roslyn/pull/80161))
10+
* Bump patch version of MSBuild packages(PR: [#80156](https://github.com/dotnet/roslyn/pull/80156))
11+
* Include category in Hot Reload log messages(PR: [#80160](https://github.com/dotnet/roslyn/pull/80160))
12+
* Store client's version for open docs (PR: [#80064](https://github.com/dotnet/roslyn/pull/80064))
13+
* Pass global properties and the binary log path via RPC to BuildHost (PR: [#80094](https://github.com/dotnet/roslyn/pull/80094))
14+
* Don't switch runtime / design time solutions if cohosting is on (PR: [#80065](https://github.com/dotnet/roslyn/pull/80065))
15+
* Allow Razor to get task list items for a document (PR: [#80102](https://github.com/dotnet/roslyn/pull/80102))
16+
* Update debugger packages, move to PortableInterop IMetadataImport (PR: [#80063](https://github.com/dotnet/roslyn/pull/80063))
17+
* Fix issue reporting diagnostic in additional file when diagnostic produced by a source generator (PR: [#80071](https://github.com/dotnet/roslyn/pull/80071))
18+
* Always run the razor generator even in balanced mode (PR: [#79510](https://github.com/dotnet/roslyn/pull/79510))
19+
* Bump Razor to 10.0.0-preview.25454.5 (PR: [#8590](https://github.com/dotnet/vscode-csharp/pull/8590))
20+
* Fix extra character insertion during attribute completion in VS Code (PR: [#12177](https://github.com/dotnet/razor/pull/12177))
21+
* Remove UseNewRazorFormattingEngine feature flag (PR: [#12160](https://github.com/dotnet/razor/pull/12160))
22+
* Allow for weird Uris as file paths (PR: [#12155](https://github.com/dotnet/razor/pull/12155))
23+
* Remove the feature flag for precise semantic tokens (PR: [#12149](https://github.com/dotnet/razor/pull/12149))
24+
* Do not create a proxy agent if proxy url is empty string. (PR: [#8580](https://github.com/dotnet/vscode-csharp/pull/8580))
25+
* Use aka.ms link for ARM32 Linux help page (PR: [#8574](https://github.com/dotnet/vscode-csharp/pull/8574))
26+
* Update Debugger to 2.90.0 (PR: [#8572](https://github.com/dotnet/vscode-csharp/pull/8572))
27+
628
# 2.90.x
729
* Register the CSharp context provider with Copilot Chat as well. (PR: [#8565](https://github.com/dotnet/vscode-csharp/pull/8565))
830
* Improve the limited activation experience (PR: [#8564](https://github.com/dotnet/vscode-csharp/pull/8564))
@@ -13,8 +35,8 @@
1335
* Cache diagnostic analyzer computation (PR: [#80045](https://github.com/dotnet/roslyn/pull/80045))
1436
* Generate `init` accessor for required properties inside `readonly struct`s (PR: [#80004](https://github.com/dotnet/roslyn/pull/80004))
1537
* Allow Razor cohosting to work with non-Razor SDK projects (PR: [#79953](https://github.com/dotnet/roslyn/pull/79953))
16-
* Update 'use expr body' to be a purely syntactic analyzer (PR: [#79979](https://github.com/dotnet/roslyn/pull/79979))
17-
* Implement "Simplify property accessor" feature (PR: [#79754](https://github.com/dotnet/roslyn/pull/79754))
38+
* Update 'use expr body' to be a purely syntactic analyzer (PR: [#79979](https://github.com/dotnet/roslyn/pull/79979))
39+
* Implement "Simplify property accessor" feature (PR: [#79754](https://github.com/dotnet/roslyn/pull/79754))
1840
* Allow Razor to hook up the source generator in misc files (PR: [#79891](https://github.com/dotnet/roslyn/pull/79891))
1941
* Bump Razor to 10.0.0-preview.25424.9 (PR: [#8559](https://github.com/dotnet/vscode-csharp/pull/8559))
2042
* Allow Razor cohosting to work with non-Razor SDK projects (PR: [#12118](https://github.com/dotnet/razor/pull/12118))

CONTRIBUTING.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,26 @@ To update the version of the roslyn server used by the extension do the followin
182182
4. Ensure that version of the package is in the proper feeds by running `gulp updateRoslynVersion`. Note: you may need to install the [Azure Artifacts NuGet Credential Provider](https://github.com/microsoft/artifacts-credprovider#installation-on-windows) to run interactive authentication.
183183
5. Build and test the change. If everything looks good, submit a PR.
184184

185+
## Updating the `Roslyn` Copilot Language Server version
186+
187+
In order to pull in the latest version of Roslyn Copilot bits from the VS Conversations repo, follow these steps:
188+
1. Trigger [this pipeline](https://devdiv.visualstudio.com/DevDiv/_build?definitionId=27222) which should automatically publish bits to the storage account and then create an insertion PR like [this](https://github.com/dotnet/vscode-csharp/pull/8597)
189+
2. Build and test the change to ensure the roslyn copilot language server bits are downloaded correctly. You'll see log entries like the below in the Output->C# pane:
190+
```
191+
[info] Installing package 'Language server for Roslyn Copilot integration'
192+
[info] Finished
193+
```
194+
More details for this are [here] (https://devdiv.visualstudio.com/DevDiv/_git/VisualStudio.Conversations?path=/src/Copilot.Roslyn.LanguageServer/README.md)
195+
185196
## Snapping for releases
186197
Extension releases on the marketplace are done from the prerelease and release branches (corresponding to the prerelease or release version of the extension). Code flows from main -> prerelease -> release. Every week we snap main -> prerelease. Monthly, we snap prerelease -> release.
187198

188199
### Snap main -> prerelease
189200
The snap is done via the "Branch snap" github action. To run the snap from main -> prerelease, run the action via "Run workflow" and choose main as the base branch.
190-
![branch snap action](./docs/main_snap.png)
201+
![branch snap action](./docs/images/main_snap.png)
191202

192203
This will generate two PRs that must be merged. One merging the main branch into prerelease, and the other bumps the version in main.
193-
![generated prs](./docs/generated_prs.png)
204+
![generated prs](./docs/images/generated_prs.png)
194205

195206
### Snap prerelease -> release
196207
To snap from prerelease to release, run the same action but use **prerelease** as the workflow branch. This will generate a single PR merging from prerelease to release.
@@ -199,6 +210,6 @@ To snap from prerelease to release, run the same action but use **prerelease** a
199210
The marketplace release is managed by an internal AzDo pipeline. On the pipeline page, hit run pipeline. This will bring up the pipeline parameters to fill out:
200211
1. The branch will **always** be main, no matter if release a build from prerelease or release.
201212
2. Uncheck the "test" option.
202-
3. In "Resources", choose "dotnet-vscode-csharp [officialBuildCI]", then check only the build that should be released, and then confirm with "Use selected run". Based on the selected build, it will automatically determine if it is prerelease or release. ![release pipeline image](./docs/release_pipeline.png)
203-
4. The pipeline parameters should then look something like the following image. Hit "Run". ![release pipeline parameters image](./docs/release_pipeline_params.png)
213+
3. In "Resources", choose "dotnet-vscode-csharp [officialBuildCI]", then check only the build that should be released, and then confirm with "Use selected run". Based on the selected build, it will automatically determine if it is prerelease or release. ![release pipeline image](./docs/images/release_pipeline.png)
214+
4. The pipeline parameters should then look something like the following image. Hit "Run". ![release pipeline parameters image](./docs/images/release_pipeline_params.png)
204215
5. After a bit, the pipeline will request approval from an authorized approver before it actually uploads to the marketplace. Hit approve and it will continue.

SUPPORT.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For help and questions about using this project, please see the [README](https:/
1313
### How to file an issue
1414

1515
We highly recommend using the C# extension's built-in command, `CSharp: Report an issue` (`csharp.reportIssue`) to create a pre-filled issue template. This will include helpful details such as local dotnet installations, installed extensions, and other information.
16-
![csharp.reportIssue command](./docs/report_issue.png)
16+
![csharp.reportIssue command](./docs/images/report_issue.png)
1717

1818
#### Collecting General Logs
1919

@@ -22,8 +22,8 @@ The template has a section to include the `C#` output window logs. These logs ar
2222
1. **Set the Log Level to Trace**:
2323
- Open the `C#` output window (`View` -> `Output`).
2424
- Set the log level to `Trace`.
25-
26-
![c# output window showing trace option](./docs/csharp_trace.png)
25+
26+
![c# output window showing trace option](./docs/images/csharp_trace.png)
2727

2828
2. **Reproduce the Issue**:
2929
- Perform the actions that reproduce the issue.
@@ -57,8 +57,8 @@ For issues with Razor, the Razor Log output window can contain useful informatio
5757
1. **Set the Log Level to Trace**:
5858
- Open the `Razor Logs` output window (`View` -> `Output`).
5959
- Set the log level to `Trace`.
60-
61-
![razor log output window showing trace option](./docs/razor_logs.png)
60+
61+
![razor log output window showing trace option](./docs/images/razor_logs.png)
6262

6363
2. **Reproduce the Issue**:
6464
- Perform the actions that reproduce the issue.
@@ -81,7 +81,7 @@ Missing language features are often caused by a failure to load the project(s) o
8181
- This information is displayed in the bottom-right corner of the VSCode window in the language status section.
8282
- You can pin this item using the pin icon to keep it visible at all times.
8383

84-
![language status bar showing file active project context](./docs/language_status.png)
84+
![language status bar showing file active project context](./docs/images/language_status.png)
8585

8686
3. **Verify the Solution Explorer (C# Dev Kit)**:
8787
- If you are using C# Dev Kit, check the Solution Explorer to ensure the project is displayed with the expected references.
@@ -100,12 +100,12 @@ If you encounter issues with document classification (e.g., incorrect syntax hig
100100
3. Click on the word or section with incorrect colorization to display the token and scope information.
101101
- Take a screenshot of the output and include it in your issue report.
102102

103-
![Inspect Tokens and Scopes Output](./docs/inspect_tokens.png)
103+
![Inspect Tokens and Scopes Output](./docs/images/inspect_tokens.png)
104104

105105
### Diagnostics problems
106106

107107
For issues with diagnostics, please provide values of the background analysis scope options, `dotnet.backgroundAnalysis.analyzerDiagnosticsScope` and `dotnet.backgroundAnalysis.compilerDiagnosticsScope`
108-
![background analysis settings](./docs/background_analysis.png)
108+
![background analysis settings](./docs/images/background_analysis.png)
109109

110110
#### Language server crashing
111111

@@ -124,12 +124,12 @@ When investigating performance issues, we may request a performance trace of the
124124
The C# extension has a built in command, `csharp.recordLanguageServerTrace` to help with trace collection. This command will install `dotnet-trace` as a global tool and invoke it against the language server.
125125

126126
1. Invoke the record language server trace command
127-
![alt text](docs/recordTraceCommand.png)
127+
![alt text](docs/images/recordTraceCommand.png)
128128
2. Select the folder to save the trace.
129129
3. Accept the default trace arguments, or change them if requested
130-
![alt text](docs/recordTraceArgs.png)
130+
![alt text](docs/images/recordTraceArgs.png)
131131
4. A new terminal window will open to run the trace collection. While the trace is running, reproduce the peformance issue. When done, hit <Enter> or <Ctrl+C> in the trace window to stop the trace
132-
![alt text](docs/recordTraceTerminal.png)
132+
![alt text](docs/images/recordTraceTerminal.png)
133133
5. Share the trace. Note that the trace may contain PII, so generally we will provide an email or other confidential way to share the trace with us.
134134

135135
## Microsoft Support Policy

azure-pipelines/publish-roslyn-copilot.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
trigger: none
22
pr: none
33

4+
variables:
5+
# Variable group contains PAT for bot account.
6+
- group: dotnet-vscode-insertion-variables
7+
48
resources:
59
repositories:
610
- repository: 1ESPipelineTemplates
@@ -29,7 +33,6 @@ extends:
2933
image: 1ESPT-Windows2022
3034
os: windows
3135
templateContext:
32-
type: releaseJob
3336
isProduction: false #change this
3437
inputs:
3538
- input: pipelineArtifact
@@ -38,7 +41,11 @@ extends:
3841
destinationPath: $(Pipeline.Workspace)/artifacts
3942

4043
steps:
41-
- checkout: none
44+
- checkout: self
45+
clean: true
46+
submodules: true
47+
fetchTags: false
48+
fetchDepth: 0
4249

4350
- task: CopyFiles@2
4451
displayName: 'Copy files from Zip folder to staging directory'
@@ -56,3 +63,13 @@ extends:
5663
Destination: "AzureBlob"
5764
storage: "$(AzStorage)"
5865
ContainerName: "$(AzContainerName)"
66+
67+
- pwsh: |
68+
npm install
69+
npm install -g gulp
70+
displayName: 'Install tools'
71+
72+
- pwsh: gulp 'publish roslyn copilot' --userName dotnet-maestro-bot --email [email protected] --stagingDirectory '$(Build.ArtifactStagingDirectory)/staging'
73+
displayName: 'Create component update PR'
74+
env:
75+
GitHubPAT: $(BotAccount-dotnet-maestro-bot-PAT)

debugger.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Your project is now all set. Set a breakpoint or two where you want to stop, cli
6565
If your code was built on a different computer from where you would like to run in there are a few things to keep in mind --
6666

6767
* **Source Maps**: Unless your local source code is at exactly the same path as where the code was originally built you will need to add a [sourceFileMap](https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md#source-file-map) to launch.json.
68-
* **Portable PDBs**: If the code was built on Windows, it might have been built using Windows PDBs instead of portable PDBs, but the C# extension only supports portable PDBs. See the [portable PDB documentation](https://github.com/dotnet/vscode-csharp/wiki/Portable-PDBs#how-to-generate-portable-pdbs) for more information.
68+
* **Portable PDBs**: If the code was built on Windows, it might have been built using Windows PDBs instead of portable PDBs, but the C# extension only supports portable PDBs. See the [portable PDB documentation](./docs/debugger/Portable-PDBs.md#how-to-generate-portable-pdbs) for more information.
6969
* **Debug vs. Release**: It is much easier to debug code which has been compiled in the `Debug` configuration. So unless the issue you are looking at only reproduces with optimizations, it is much better to use Debug bits. If you do need to debug optimized code, you will need to disable [justMyCode](https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md#just-my-code) in launch.json.
7070

7171
#### [Configurating launch.json for C# Debugging](debugger-launchjson.md)
@@ -76,7 +76,7 @@ See the [official documentation](https://code.visualstudio.com/docs/csharp/debug
7676

7777
#### Remote Debugging
7878

79-
The debugger supports remotely launching or attaching to processes. See [Attaching to remote processes](https://github.com/dotnet/vscode-csharp/wiki/Attaching-to-remote-processes) in the wiki for more information.
79+
The debugger supports remotely launching or attaching to processes. See [Attaching to remote processes](./docs/debugger/Attaching-to-remote-processes.md) in the wiki for more information.
8080

8181
#### Exception Settings
8282

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
The C# extension currently supports running and debugging a unit test via CodeLens annotations on test methods. Just click the 'run test' or 'debug test' links:
2+
3+
![CodeLens](./images/unit-test-codelens.png)
4+
5+
### Notes
6+
7+
* Because `dotnet test` will run the test code in a child process, it isn't possible to configure a "unit test debugging" configuration in launch.json
8+
* There currently isn't a VS Code command to run the current test, though there is an [issue for this in the backlog](https://github.com/dotnet/vscode-csharp/issues/421).
9+
* You can tweak [debugging options](../debugger-launchjson.md) for unit tests by opening your VS Code settings file (ex: File->Preferences->Settings on Windows), and configuring the `"csharp.unitTestDebuggingOptions"` setting. See example below.
10+
* If your unit tests are targeting .NET Framework instead of .NET Core, see [Desktop .NET Framework](./debugger/Desktop-.NET-Framework.md) for more information.
11+
12+
Example User Settings file with unit test debugging options:
13+
14+
```json
15+
{
16+
"window.zoomLevel": 0,
17+
"csharp.unitTestDebuggingOptions": {
18+
"sourceFileMap": {
19+
"c:\\example\\folder\\where\\library\\was\\built": "/folder/where/my/library/is/now"
20+
}
21+
}
22+
}
23+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Some environments may not have access to the Internet and thus the marketplace to download extensions or dependencies dynamically. To install the C# language extension and dependencies without Internet access, the following is required:
2+
3+
> NOTE: It is important that if extensions offer platform-specific versions, that you ensure you are downloading/installing the matching platform pieces. Failure to do so could put your VS Code environment in a non-functional state.
4+
5+
* Download and install the required ASP.NET Core 9.0.8 runtime from https://dot.net/downloads
6+
* Download the following VS Code extensions **for your specific platform**:
7+
* [.NET Install Tool](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscode-dotnet-runtime)
8+
* [C# language extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp)
9+
* Optional extensions such as the [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit), [MAUI](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-maui), or [IntelliCode for C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscodeintellicode-csharp)
10+
* Follow the documentation to [**Install from VSIX**](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix) in VS Code with the downloaded extension files

docs/Reporting-Issues.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
The extension supports the command that populates the necessary information from the user's system into a new github issue and opens the preview in the user's default browser to preview and submit.
2+
3+
#### Report issue on GitHub
4+
* In VSCode, navigate to the View --> Command Palette menu or press Ctrl+Shift+P.
5+
* Select the option : `CSharp: Report an issue`. This will open the github repository issues page with a new issue with all the necessary system information.
6+
* Fill in all the fields like "Expected Behavior", "Actual Behavior", "Steps to Reproduce".
7+
* Paste the "C#" log (if any) and hit "Submit"
8+
9+
##### OmniSharp and C# log
10+
* In VSCode, navigate to View-->Output or press Ctrl+Shift+U
11+
* In the output pane on the right, you should see an "OmniSharp log" in the drop-down
12+
* Paste the output from here to the "OmniSharp log" section
13+
14+
![OmniSharp log](./images/omnisharp_log.png)
15+
* The C# log can also be found in the same window.

0 commit comments

Comments
 (0)