Skip to content

Commit 525f7b2

Browse files
authored
[automated] Merge branch 'main' => 'prerelease' (#8421)
2 parents 37194ff + fa9980c commit 525f7b2

29 files changed

+137
-62
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,31 @@
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.86.x
7+
* Bump Roslyn to 5.0.0-1.25361.2 (PR: [#8416](https://github.com/dotnet/vscode-csharp/pull/8416))
8+
* Fix issue with diagnostics when renaming a file (case change only) (PR: [#79298](https://github.com/dotnet/roslyn/pull/79298))
9+
* Allow rename to (optionally) process source generated documents(PR: [#78984](https://github.com/dotnet/roslyn/pull/78984))
10+
* Initial support for adding obsolete attributes to primary constructors(PR: [#79271](https://github.com/dotnet/roslyn/pull/79271))
11+
* Allow the Razor extension to report telemetry (and initialize)(PR: [#79254](https://github.com/dotnet/roslyn/pull/79254))
12+
* Use same location for 'use implicit object' as we do for 'use collection expression'.(PR: [#79265](https://github.com/dotnet/roslyn/pull/79265))
13+
* Use the miscellaneous files project name for rich misc projects(PR: [#79267](https://github.com/dotnet/roslyn/pull/79267))
14+
* Razor: Don't double register for document sync(PR: [#79241](https://github.com/dotnet/roslyn/pull/79241))
15+
* Allow LanguageServerProjectSystems to load into more than one workspace(PR: [#78975](https://github.com/dotnet/roslyn/pull/78975))
16+
* Improve diagnostic for ambiguous predefined type(PR: [#79196](https://github.com/dotnet/roslyn/pull/79196))
17+
* Fix renaming constructor via alias(PR: [#79175](https://github.com/dotnet/roslyn/pull/79175))
18+
* Speed up performance of remove-unused-imports fix all(PR: [#79173](https://github.com/dotnet/roslyn/pull/79173))
19+
* Improve performance in metadata-to-project-reference conversion(PR: [#79163](https://github.com/dotnet/roslyn/pull/79163))
20+
* Fix issue where we offered to use a collection expression when teh user didn't have a viable Add method(PR: [#79157](https://github.com/dotnet/roslyn/pull/79157))
21+
* Don't load the razor redirector unless it could actually be a razor assembly(PR: [#79154](https://github.com/dotnet/roslyn/pull/79154))
22+
* Tweak clarity rules for parentheses where ?? is involved(PR: [#79159](https://github.com/dotnet/roslyn/pull/79159))
23+
* Avoid hitting object pool when not needed(PR: [#79158](https://github.com/dotnet/roslyn/pull/79158))
24+
* Merge 'extension operators' into 'main'(PR: [#79151](https://github.com/dotnet/roslyn/pull/79151))
25+
* Extensions: interceptors(PR: [#79010](https://github.com/dotnet/roslyn/pull/79010))
26+
* Small but trivial allocation improvement in FileWatchedReferenceFactory.StopWatchingReference(PR: [#79140](https://github.com/dotnet/roslyn/pull/79140))
27+
* Slight allocation reduction in CommandLineParser.FlattenArgs(PR: [#79139](https://github.com/dotnet/roslyn/pull/79139))
28+
* Fix promptForDevKitDebugConfigurations without CDK installed(PR: [#8390](https://github.com/dotnet/vscode-csharp/pull/8390))
29+
* Remove Razor ForceRuntimeCodeGeneration flag(PR: [#8398](https://github.com/dotnet/vscode-csharp/pull/8398))
30+
631
# 2.85.x
732
* Bump Roslyn to 5.0.0-1.25326.2 (PR: [#8386](https://github.com/dotnet/vscode-csharp/pull/8386))
833
* Fix nullable oblivious quick info (PR: [#79102](https://github.com/dotnet/roslyn/pull/79102))

CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ Follow these steps to build, run, and test the repository:
3636

3737
#### Building
3838

39+
If you have the ability to run powershell, you can invoke "init.ps1" from the root of the repo. If not, the following steps will get build going for you as well:
40+
3941
1. Run `npm install -g vsts-npm-auth`, then run `vsts-npm-auth -config .npmrc` - This command will configure your credentials for the next command.
4042
a. If you have already authenticated before, but the token expired, you may need to run `vsts-npm-auth -config .npmrc -f` instead.
4143
2. Run `npm i` - This command installs the project dependencies.
4244
3. Run `npm i -g gulp` - This command installs Gulp globally.
4345
4. Run `gulp installDependencies` - This command downloads the various dependencies as specified by the version in the [package.json](package.json) file.
44-
5. Run `code .` - This command opens the project in Visual Studio Code.
46+
47+
You can now run `code .` - This command opens the project in Visual Studio Code.
4548

4649
#### Running
4750

@@ -168,7 +171,7 @@ To package this extension, we need to create VSIX Packages. The VSIX packages ca
168171

169172
## Updating the `Roslyn` Language Server Version
170173

171-
In order to pull in new packages from upstreams into the msft_consumption feed we use for restoring, you will need to be a member of the 'CSharp VS Code Extension contributors' group in the [Azure Devops instance](https://dev.azure.com/azure-public/vside/_settings/teams).
174+
In order to pull in new packages from upstreams into the msft_consumption feed we use for restoring, you will need to be a member of the 'CSharp VS Code Extension contributors' group in the [Azure Devops instance](https://dev.azure.com/azure-public/vside/_settings/teams).
172175

173176
To update the version of the roslyn server used by the extension do the following:
174177
1. Find the the Roslyn signed build you want from [here](https://dnceng.visualstudio.com/internal/_build?definitionId=327&_a=summary). Typically the latest successful build of main is fine.
@@ -195,5 +198,5 @@ The marketplace release is managed by an internal AzDo pipeline. On the pipelin
195198
1. The branch will **always** be main, no matter if release a build from prerelease or release.
196199
2. Uncheck the "test" option.
197200
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)
198-
4. The pipeline parameters should then look something like the following image. Hit "Run". ![release pipeline parameters image](./docs/release_pipeline_params.png)
201+
4. The pipeline parameters should then look something like the following image. Hit "Run". ![release pipeline parameters image](./docs/release_pipeline_params.png)
199202
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: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ For issues with Razor, the Razor Log output window can contain useful informatio
6868
4. **Reset the Log Level**:
6969
- Once the logs are collected, reset the log level to `Info`.
7070

71-
#### Project Loading Problems
71+
### Project Loading Problems
7272

7373
Missing language features are often caused by a failure to load the project(s) or solution. To diagnose and resolve these issues, follow these steps:
7474

@@ -86,7 +86,7 @@ Missing language features are often caused by a failure to load the project(s) o
8686
- If you are using C# Dev Kit, check the Solution Explorer to ensure the project is displayed with the expected references.
8787
- If the references or structure are not as expected, include the contents of the `Projects` output window in your issue report.
8888

89-
#### Colorization problems
89+
### Colorization problems
9090
If you encounter issues with document classification (e.g., incorrect syntax highlighting or colorization), please provide the following information to help us diagnose the problem:
9191

9292
1. **Theme in Use**:
@@ -101,7 +101,7 @@ If you encounter issues with document classification (e.g., incorrect syntax hig
101101

102102
![Inspect Tokens and Scopes Output](./docs/inspect_tokens.png)
103103

104-
#### Diagnostics problems
104+
### Diagnostics problems
105105

106106
For issues with diagnostics, please provide values of the background analysis scope options, `dotnet.backgroundAnalysis.analyzerDiagnosticsScope` and `dotnet.backgroundAnalysis.compilerDiagnosticsScope`
107107
![background analysis settings](./docs/background_analysis.png)
@@ -116,6 +116,21 @@ If the language server crashes, general logs are often helpful for diagnosing th
116116
> [!WARNING]
117117
> The dump can contain detailed information on the project - generally we will provide an email so that it can be shared privately
118118
119+
#### Recording a language server trace
120+
121+
When investigating performance issues, we may request a performance trace of the language server to diagnose what is causing the problem. These are typically taken via [dotnet-trace](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace) (a cross platform tool to collect performance traces of .NET processes)
122+
123+
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.
124+
125+
1. Invoke the record language server trace command
126+
![alt text](docs/recordTraceCommand.png)
127+
2. Select the folder to save the trace.
128+
3. Accept the default trace arguments, or change them if requested
129+
![alt text](docs/recordTraceArgs.png)
130+
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
131+
![alt text](docs/recordTraceTerminal.png)
132+
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.
133+
119134
## Microsoft Support Policy
120135

121136
Support for this project is limited to the resources listed above.

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pr:
1717
paths:
1818
exclude:
1919
- '*.md'
20+
- 'version.json'
2021
- .github/*
2122
- azure-pipelines/release.yml
2223
- CHANGELOG.

docs/recordTraceArgs.png

9.45 KB
Loading

docs/recordTraceCommand.png

8.01 KB
Loading

docs/recordTraceTerminal.png

37.4 KB
Loading

init.ps1

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env pwsh
2+
3+
Write-Host "`nStarting init..." -ForegroundColor Cyan
4+
5+
# Cross-platform command execution with error checking
6+
function Run-Command($command, $arguments, $errorMsg) {
7+
Write-Host "Running: $command $($arguments -join ' ')" -ForegroundColor Yellow
8+
9+
# Check if command exists first
10+
if (-not (Get-Command $command -ErrorAction SilentlyContinue)) {
11+
throw "$command is not available on this system. Please ensure you have the command installed globally and it's available in your PATH."
12+
}
13+
14+
& $command @arguments
15+
16+
if ($LASTEXITCODE -ne 0) {
17+
throw "$errorMsg (Exit code: $LASTEXITCODE)"
18+
}
19+
}
20+
21+
22+
Push-Location $PSScriptRoot
23+
24+
try {
25+
Write-Host "`n[1/5] Installing vsts-npm-auth globally..." -ForegroundColor Cyan
26+
Run-Command "npm" @("install", "-g", "vsts-npm-auth") "Failed to install vsts-npm-auth."
27+
28+
Write-Host "`n[2/5] Authenticating with Azure DevOps..." -ForegroundColor Cyan
29+
if (Test-Path ".npmrc") {
30+
try {
31+
Run-Command "vsts-npm-auth" @("-config", ".npmrc") "Initial authentication failed."
32+
}
33+
catch {
34+
Write-Host "Initial authentication failed. Trying with force (-f) flag..." -ForegroundColor DarkYellow
35+
Run-Command "vsts-npm-auth" @("-config", ".npmrc", "-f") "Forced authentication failed."
36+
}
37+
} else {
38+
Write-Host ".npmrc file not found in the current directory." -ForegroundColor Red
39+
throw ".npmrc file not found in the current directory."
40+
}
41+
42+
Write-Host "`n[3/5] Installing project dependencies..." -ForegroundColor Cyan
43+
Run-Command "npm" @("install") "Failed to install project dependencies."
44+
45+
Write-Host "`n[4/5] Installing Gulp globally..." -ForegroundColor Cyan
46+
Run-Command "npm" @("install", "-g", "gulp") "Failed to install Gulp globally."
47+
48+
Write-Host "`n[5/5] Running gulp installDependencies..." -ForegroundColor Cyan
49+
Run-Command "gulp" @("installDependencies") "Failed to run 'gulp installDependencies'."
50+
51+
Write-Host "`n✅ Setup complete." -ForegroundColor Green
52+
}
53+
catch {
54+
Write-Host "`n❌ Setup failed: $($_.Exception.Message)" -ForegroundColor Red
55+
exit 1
56+
}
57+
finally {
58+
Pop-Location
59+
}
60+
61+

package.json

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"workspace"
4141
],
4242
"defaults": {
43-
"roslyn": "5.0.0-1.25326.2",
43+
"roslyn": "5.0.0-1.25361.2",
4444
"omniSharp": "1.39.12",
4545
"razor": "10.0.0-preview.25329.6",
4646
"razorOmnisharp": "7.0.0-preview.23363.1",
@@ -1528,16 +1528,6 @@
15281528
"description": "%configuration.razor.languageServer.debug%",
15291529
"order": 90
15301530
},
1531-
"razor.languageServer.forceRuntimeCodeGeneration": {
1532-
"type": "boolean",
1533-
"scope": "machine-overridable",
1534-
"default": true,
1535-
"description": "%configuration.razor.languageServer.forceRuntimeCodeGeneration%",
1536-
"order": 90,
1537-
"tags": [
1538-
"experimental"
1539-
]
1540-
},
15411531
"razor.languageServer.suppressLspErrorToasts": {
15421532
"type": "boolean",
15431533
"default": true,
@@ -1899,8 +1889,8 @@
18991889
"enablement": "dotnet.server.activationContext == 'OmniSharp'"
19001890
},
19011891
{
1902-
"command": "csharp.recordTrace",
1903-
"title": "%command.csharp.recordTrace%",
1892+
"command": "csharp.recordLanguageServerTrace",
1893+
"title": "%command.csharp.recordLanguageServerTrace%",
19041894
"category": "CSharp",
19051895
"enablement": "dotnet.server.activationContext == 'Roslyn' || dotnet.server.activationContext == 'RoslynDevKit'"
19061896
},

package.nls.cs.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"command.csharp.listProcess": "Vypsat proces pro připojení",
55
"command.csharp.listRemoteDockerProcess": "Výpis procesů v připojení Dockeru",
66
"command.csharp.listRemoteProcess": "Vypsat procesy pro připojení na vzdáleném připojení",
7-
"command.csharp.recordTrace": "Záznam trasování výkonu jazykového serveru C#",
7+
"command.csharp.recordLanguageServerTrace": "Record a performance trace of the C# Language Server",
88
"command.csharp.reportIssue": "Nahlásit problém",
99
"command.csharp.showDecompilationTerms": "Zobrazit smlouvu o podmínkách dekompilátoru",
1010
"command.dotnet.generateAssets.currentProject": "Generovat prostředky pro sestavení a ladění",
@@ -125,7 +125,6 @@
125125
"configuration.razor.languageServer.cohostingEnabled": "Povolte společné hostování Razor.",
126126
"configuration.razor.languageServer.debug": "Určuje, jestli se má při spouštění jazykového serveru čekat na připojení ladění.",
127127
"configuration.razor.languageServer.directory": "Přepíše cestu k adresáři jazykového serveru Razor.",
128-
"configuration.razor.languageServer.forceRuntimeCodeGeneration": "Povolit kombinované generování kódu v době návrhu / za běhu pro soubory Razor",
129128
"configuration.razor.languageServer.suppressLspErrorToasts": "Potlačí zobrazování informačních zpráv o chybách, pokud na serveru dojde k chybě, ze které se dá zotavit.",
130129
"configuration.razor.languageServer.useNewFormattingEngine": "Použijte nový modul formátování Razor.",
131130
"configuration.razor.server.trace": "Určuje úroveň protokolování, která se má použít pro server Razor.",

0 commit comments

Comments
 (0)