Skip to content

Commit 6555d80

Browse files
authored
Merge branch 'main' into merge/release-to-main
2 parents 602baeb + 3e8c17e commit 6555d80

File tree

143 files changed

+3466
-1049
lines changed

Some content is hidden

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

143 files changed

+3466
-1049
lines changed

.devcontainer/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/dotnet/.devcontainer/base.Dockerfile
2+
3+
FROM mcr.microsoft.com/dotnet/sdk:8.0
4+
5+
# Set up machine requirements to build the repo
6+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
7+
&& apt-get -y install --no-install-recommends curl git gnupg \
8+
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
9+
&& apt-get install -y nodejs

.devcontainer/devcontainer.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/dotnetcore
3+
{
4+
"name": "vscode-csharp",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
// Set the context to the workspace folder to allow us to copy files from it.
8+
"context": ".."
9+
},
10+
"customizations": {
11+
"vscode": {
12+
"settings": {
13+
"files.associations": {
14+
"*.csproj": "msbuild",
15+
"*.fsproj": "msbuild",
16+
"*.globalconfig": "ini",
17+
"*.manifest": "xml",
18+
"*.nuspec": "xml",
19+
"*.pkgdef": "ini",
20+
"*.projitems": "msbuild",
21+
"*.props": "msbuild",
22+
"*.resx": "xml",
23+
"*.rsp": "Powershell",
24+
"*.ruleset": "xml",
25+
"*.settings": "xml",
26+
"*.shproj": "msbuild",
27+
"*.slnf": "json",
28+
"*.targets": "msbuild",
29+
"*.vbproj": "msbuild",
30+
"*.vsixmanifest": "xml",
31+
"*.vstemplate": "xml",
32+
"*.xlf": "xml",
33+
"*.yml": "azure-pipelines"
34+
},
35+
// ms-vscode.powershell settings
36+
"powershell.promptToUpdatePowerShell": false,
37+
"powershell.integratedConsole.showOnStartup": false,
38+
"powershell.startAutomatically": false,
39+
// ms-azure-devops.azure-pipelines settings
40+
"azure-pipelines.customSchemaFile": ".vscode/dnceng-schema.json"
41+
},
42+
"extensions": [
43+
"ms-dotnettools.csharp",
44+
"ms-dotnettools.csdevkit",
45+
"EditorConfig.EditorConfig",
46+
"ms-vscode.powershell",
47+
"tintoy.msbuild-project-tools",
48+
"ms-azure-devops.azure-pipelines",
49+
"dbaeumer.vscode-eslint",
50+
"esbenp.prettier-vscode",
51+
"orta.vscode-jest"
52+
]
53+
}
54+
},
55+
"postCreateCommand": "npm ci && npx gulp installDependencies"
56+
}

.devcontainer/devinit.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"run": [
3+
{
4+
"tool": "require-dotnetcoresdk"
5+
}
6+
]
7+
}

.vscode/dneng-schema.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,30 @@
44
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
55

66
# Latest
7+
* Update Roslyn to 4.12.0-3.24456.2 (PR: [#7525](https://github.com/dotnet/vscode-csharp/pull/7525))
8+
* Avoid BuildHost crash in Mono due to missing types (PR: [#74994](https://github.com/dotnet/roslyn/pull/74994))
9+
* Turn off word suggestions in XAML completions (PR: [#7516](https://github.com/dotnet/vscode-csharp/pull/7516))
10+
* Bump xamltools to 17.12.35305.252 (PR: [#7521](https://github.com/dotnet/vscode-csharp/pull/7521))
11+
* XAML editor enabled various lightbulbs related to x:DataType, BindingContext and Bindings.
12+
13+
# 2.46.x
14+
* Update Roslyn to 4.12.0-3.24430.2 (PR: [#7496](https://github.com/dotnet/vscode-csharp/pull/7496))
15+
* Bump Razor to 9.0.0-preview.24427.2 (PR: [#7471](https://github.com/dotnet/vscode-csharp/pull/7471))
16+
* Suppress unique ids (#10791) (PR: [#10791](https://github.com/dotnet/razor/pull/10791))
17+
* Self-versioned documents (#10747) (PR: [#10747](https://github.com/dotnet/razor/pull/10747))
18+
* Remove ItemCollection from CodeRenderingContext (#10764) (PR: [#10764](https://github.com/dotnet/razor/pull/10764))
19+
* Moving formatting service to common layer (#10761) (PR: [#10761](https://github.com/dotnet/razor/pull/10761))
20+
* Allow LSP and cohosting to provide specialized methods to get a syntax tree (#10765) (PR: [#10765](https://github.com/dotnet/razor/pull/10765))
21+
* Update NOTICE.txt (#10768) (PR: [#10768](https://github.com/dotnet/razor/pull/10768))
22+
* Allow @@ as a fallback (#10752) (PR: [#10752](https://github.com/dotnet/razor/pull/10752))
23+
* Support component rename from an end tag (#10762) (PR: [#10762](https://github.com/dotnet/razor/pull/10762))
24+
* Bump xamltools to 17.12.35230.10 (PR: [#7493](https://github.com/dotnet/vscode-csharp/pull/7493))
25+
26+
# 2.45.17
727
* Fix check for rzls being present (PR: [#7462](https://github.com/dotnet/vscode-csharp/pull/7462))
828
* Bump Razor to 9.0.0-preview.24418.1 (PR: [#7456](https://github.com/dotnet/vscode-csharp/pull/7456))
929
* Don't add already known documents to the misc files project (#10753) (PR: [#10753](https://github.com/dotnet/razor/pull/10753))
1030
* Remove ItemCollection from TagHelperDescriptorProviderContext (#10720) (PR: [#10720](https://github.com/dotnet/razor/pull/10720))
11-
* Cohost inlay hint support (#10672) (PR: [#10672](https://github.com/dotnet/razor/pull/10672))
1231
* Fix excerpt service to allow for multi line verbatim strings (#10675) (PR: [#10675](https://github.com/dotnet/razor/pull/10675))
1332
* Fix attribute parsing recovery (#10620) (PR: [#10620](https://github.com/dotnet/razor/pull/10620))
1433
* Turn off trailing whitespace triming in strings (#10646) (PR: [#10646](https://github.com/dotnet/razor/pull/10646))
@@ -25,7 +44,7 @@
2544
* Added XAML Hot Reload support for x:FactoryMethod and x:Arguments
2645
* Bump xamltools to 17.12.35304.30 (PR: [#7507](https://github.com/dotnet/vscode-csharp/pull/7508))
2746

28-
# 2.44.x
47+
# 2.44.19
2948
* Bump Roslyn to 4.12.0-2.24416.3 (PR: [#7448](https://github.com/dotnet/vscode-csharp/pull/7448))
3049
* Use EnableCodeStyleSeverity instead of AnalysisLevel to control new diagnostic severity behavior (PR: [#73843](https://github.com/dotnet/roslyn/pull/73843))
3150
* Cleanup LSP error reporting (PR: [#74530](https://github.com/dotnet/roslyn/pull/74530))
@@ -52,7 +71,7 @@
5271
* Task 2187810: [VS Code] Add OnEnter rules to indent tags (PR: [#7426](https://github.com/dotnet/vscode-csharp/pull/7426))
5372
* Fix completion handler bug that causes language server to crash (#7401) (PR: [#7406](https://github.com/dotnet/vscode-csharp/pull/7406))
5473

55-
# 2.41.x
74+
# 2.41.26
5675
* Bump Roslyn to 4.12.0-1.24376.3 (PR: [#7393](https://github.com/dotnet/vscode-csharp/pull/7393))
5776
* Fix race condition in LSP FindAllReferences when linked files were involved.(PR: [#74566](https://github.com/dotnet/roslyn/pull/74566))
5877
* Fix dll load issue when loading Razor projects in VSCode (PR: [#74570](https://github.com/dotnet/roslyn/pull/74570))
@@ -79,7 +98,7 @@
7998
* `dotnet.implementType.insertionBehavior` to `dotnet.typeMembers.memberInsertionLocation`
8099
* `dotnet.implementType.propertyGenerationBehavior` to `dotnet.typeMembers.propertyGenerationBehavior`
81100

82-
# 2.39.x
101+
# 2.39.29
83102
* Add language status bar item displaying project context for open files (PR: [#7321](https://github.com/dotnet/vscode-csharp/pull/7321), PR: [#7333](https://github.com/dotnet/vscode-csharp/pull/7333))
84103
* Add language status bar item for workspace status (C# standalone) (PR: [#7254](https://github.com/dotnet/vscode-csharp/pull/7254), PR: [#7329])https://github.com/dotnet/vscode-csharp/pull/7329))
85104
* Update Razor to 9.0.0-preview.24365.1 (PR: [#7354](https://github.com/dotnet/vscode-csharp/pull/7354))

CONTRIBUTING.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Setting up your local development environment for the vscode-csharp repository i
2222

2323
Before you start, make sure you have the following software installed on your machine:
2424

25-
* Node.js v18 ([v18.17.0 LTS](https://nodejs.org/en/blog/release/v18.17.0)).
25+
* Node.js v20 ([v20.17.0 LTS](https://nodejs.org/en/blog/release/v20.17.0)).
2626
* Note - Building with higher major versions of Node.js is not advised - it may work but we do not test it.
2727
* Npm (The version shipped with node is fine)
2828
* .NET 8.0 SDK (dotnet should be on your path)
@@ -36,9 +36,10 @@ Follow these steps to build, run, and test the repository:
3636
#### Building
3737

3838
1. Run `npm i` - This command installs the project dependencies.
39-
2. Run `npm i -g gulp` - This command installs Gulp globally.
40-
3. Run `gulp installDependencies` - This command downloads the various dependencies as specified by the version in the [package.json](package.json) file.
41-
4. Run `code .` - This command opens the project in Visual Studio Code.
39+
2. Run `vsts-npm-auth -config .npmrc` - This command will configure your credentials for the next command.
40+
3. Run `npm i -g gulp` - This command installs Gulp globally.
41+
4. Run `gulp installDependencies` - This command downloads the various dependencies as specified by the version in the [package.json](package.json) file.
42+
5. Run `code .` - This command opens the project in Visual Studio Code.
4243

4344
#### Running
4445

@@ -141,6 +142,11 @@ Or, in VSCode settings (`Ctrl+,`):
141142
3. Enable `razor.languageServer.debug`.
142143
4. Set `razor.server.trace` to `Debug`. This gives you more detailed log messages in the output window.
143144

145+
### Updating NPM packages
146+
We use the .NET eng AzDo artifacts feed https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet-public-npm/npm/registry/ with upstreams to the public npm registry.
147+
Auth is required in order to pull new packages from the upstream. This can be done by running `vsts-npm-auth -config .npmrc`.
148+
If you need to renew authorization, you can force it via `vsts-npm-auth -config .npmrc -F`
149+
144150
## Creating VSIX Packages for the Extension
145151

146152
To package this extension, we need to create VSIX Packages. The VSIX packages can be created using the gulp command `gulp vsix:release:package`. This will create all the platform specific VSIXs that you can then install manually in VSCode.

azure-pipelines/install-node.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
steps:
2+
- task: NodeTool@0
3+
displayName: 'Install Node.js 20.x'
4+
inputs:
5+
versionSpec: '20.x'

azure-pipelines/prereqs.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ steps:
1111
# The server package is downloaded from NuGet
1212
- task: NuGetAuthenticate@1
1313

14-
- task: NodeTool@0
15-
displayName: 'Install Node.js 18.x'
16-
inputs:
17-
versionSpec: '18.x'
14+
- template: /azure-pipelines/install-node.yml@self
1815

1916
# Some tests use predefined docker images with a specific version of .NET installed.
2017
# So we avoid installing .NET in those cases.

azure-pipelines/release.yml

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ parameters:
77
default: true
88

99
variables:
10-
# This is expected to provide VisualStudioMarketplacePAT to the release (https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token)
11-
- group: vscode-csharp release secrets
1210
# This is expected to provide pat to tag release.
1311
- group: DncEng-Partners-Tokens
1412

@@ -55,59 +53,64 @@ extends:
5553
buildVersionToDownload: 'specific'
5654
buildId: '$(resources.pipeline.officialBuildCI.runID)'
5755
branchName: '$(resources.pipeline.officialBuildCI.sourceBranch)'
56+
- template: /azure-pipelines/install-node.yml@self
5857
- pwsh: |
59-
npm install --global vsce
58+
npm install --global @vscode/vsce
6059
displayName: 'Install vsce'
61-
- pwsh: |
62-
# Choose whether to upload to prerelease or release based on the artifacts generated by the build pipeline.
63-
$artifactFolder = ""
64-
$uploadPrerelease = $true
65-
if (Test-Path -Path "VSIX_Prerelease") {
66-
$artifactFolder = "VSIX_Prerelease"
67-
$uploadPrerelease = $true
68-
} elseif (Test-Path -Path "VSIX_Release") {
69-
$artifactFolder = "VSIX_Release"
70-
$uploadPrerelease = $false
71-
} else {
72-
throw "No artifacts are downloaded."
73-
}
60+
- task: AzureCLI@2
61+
displayName: '🚀 Publish to Marketplace'
62+
inputs:
63+
azureSubscription: 'VSCode Marketplace Publishing'
64+
scriptType: "pscore"
65+
scriptLocation: 'inlineScript'
66+
workingDirectory: $(Pipeline.Workspace)
67+
inlineScript: |
68+
# Choose whether to upload to prerelease or release based on the artifacts generated by the build pipeline.
69+
$artifactFolder = ""
70+
$uploadPrerelease = $true
71+
if (Test-Path -Path "VSIX_Prerelease") {
72+
$artifactFolder = "VSIX_Prerelease"
73+
$uploadPrerelease = $true
74+
} elseif (Test-Path -Path "VSIX_Release") {
75+
$artifactFolder = "VSIX_Release"
76+
$uploadPrerelease = $false
77+
} else {
78+
throw "No artifacts are downloaded."
79+
}
7480
75-
Write-Host "Uploading artifacts from $artifactFolder with prerelease=$uploadPrerelease"
81+
Write-Host "Uploading artifacts from $artifactFolder with prerelease=$uploadPrerelease"
7682
77-
# Our build pipeline would generated build based on attempt number. Publishing the latest attempt.
78-
$allArtifacts = Get-ChildItem -Path "$artifactFolder*" | Sort-Object -Descending
79-
if ($allArtifacts.Length -eq 0) {
80-
throw "No artifacts in $artifactFolder"
81-
}
83+
# Our build pipeline would generated build based on attempt number. Publishing the latest attempt.
84+
$allArtifacts = Get-ChildItem -Path "$artifactFolder*" | Sort-Object -Descending
85+
if ($allArtifacts.Length -eq 0) {
86+
throw "No artifacts in $artifactFolder"
87+
}
8288
83-
$publishArtifacts = $allArtifacts[0]
84-
Write-Host "All artifacts: $($allArtifacts). Publishing $($publishArtifacts)."
89+
$publishArtifacts = $allArtifacts[0]
90+
Write-Host "All artifacts: $($allArtifacts). Publishing $($publishArtifacts)."
8591
86-
$basePublishArgs = , "publish"
87-
If ( $uploadPrerelease ) {
88-
$basePublishArgs += "--pre-release"
89-
Write-Host "Publish to pre-release channel."
90-
} Else {
91-
Write-Host "Publish to release channel."
92-
}
93-
$basePublishArgs += '--packagePath'
94-
$publishArgs = $basePublishArgs + (Get-ChildItem $publishArtifacts\*.vsix | Sort-Object Name -Descending |% { $_ })
92+
$basePublishArgs = , "publish"
93+
If ( $uploadPrerelease ) {
94+
$basePublishArgs += "--pre-release"
95+
Write-Host "Publish to pre-release channel."
96+
} Else {
97+
Write-Host "Publish to release channel."
98+
}
99+
$basePublishArgs += '--azure-credential'
100+
$basePublishArgs += '--packagePath'
101+
$publishArgs = $basePublishArgs + (Get-ChildItem $publishArtifacts\*.vsix | Sort-Object Name -Descending |% { $_ })
95102
96-
If ("${{ parameters.test }}" -eq "true") {
97-
Write-Host "In test mode, command is printed instead of run."
98-
Write-Host "##[command]vsce $publishArgs"
103+
If ("${{ parameters.test }}" -eq "true") {
104+
Write-Host "In test mode, command is printed instead of run."
105+
Write-Host "##[command]vsce $publishArgs"
99106
100-
Write-Host "🔒 Verify PAT."
101-
vsce verify-pat ms-dotnettools
102-
}
103-
Else {
104-
Write-Host "##[command]vsce $publishArgs"
105-
vsce @publishArgs
106-
}
107-
displayName: 🚀 Publish to Marketplace
108-
workingDirectory: $(Pipeline.Workspace)
109-
env:
110-
VSCE_PAT: $(VSCodeMarketplacePAT)
107+
Write-Host "🔒 Verify PAT."
108+
vsce verify-pat --azure-credential ms-dotnettools
109+
}
110+
Else {
111+
Write-Host "##[command]vsce $publishArgs"
112+
vsce @publishArgs
113+
}
111114
- stage: 'TagRelease'
112115
displayName: 'Tag release of vscode-csharp'
113116
dependsOn: 'PublishStage'
@@ -119,15 +122,12 @@ extends:
119122
image: 1es-ubuntu-2204
120123
os: linux
121124
steps:
122-
- task: NodeTool@0
123-
displayName: 'Install Node.js 18.x'
124-
inputs:
125-
versionSpec: '18.x'
126125
- checkout: self
127126
clean: true
128127
submodules: true
129128
fetchTags: false
130129
fetchDepth: 0
130+
- template: /azure-pipelines/install-node.yml@self
131131
- pwsh: |
132132
git checkout $(resources.pipeline.officialBuildCI.sourceCommit)
133133
displayName: 'Checkout build source branch'

l10n/bundle.l10n.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,18 @@
143143
"Package {0} download from {1} failed integrity check. Some features may not work as expected. Please restart Visual Studio Code to retrigger the download": "Package {0} download from {1} failed integrity check. Some features may not work as expected. Please restart Visual Studio Code to retrigger the download",
144144
"Failed to run test: {0}": "Failed to run test: {0}",
145145
"Failed to start debugger: {0}": "Failed to start debugger: {0}",
146+
"pipeArgs must be a string or a string array type": "pipeArgs must be a string or a string array type",
147+
"Name not defined in current configuration.": "Name not defined in current configuration.",
148+
"Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.": "Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.",
149+
"Select the process to attach to": "Select the process to attach to",
150+
"Pipe transport failed to get OS and processes.": "Pipe transport failed to get OS and processes.",
151+
"Operating system \"{0}\" not supported.": "Operating system \"{0}\" not supported.",
152+
"Transport attach could not obtain processes list.": "Transport attach could not obtain processes list.",
153+
"Error Message: ": "Error Message: ",
154+
"See {0} output": "See {0} output",
155+
"Text editor must be focused to fix all issues": "Text editor must be focused to fix all issues",
156+
"Fix all issues": "Fix all issues",
157+
"Select fix all action": "Select fix all action",
146158
"Test run already in progress": "Test run already in progress",
147159
"Server stopped": "Server stopped",
148160
"Workspace projects": "Workspace projects",
@@ -167,18 +179,6 @@
167179
"Active File Context": "Active File Context",
168180
"Pick a fix all scope": "Pick a fix all scope",
169181
"Fix All Code Action": "Fix All Code Action",
170-
"pipeArgs must be a string or a string array type": "pipeArgs must be a string or a string array type",
171-
"Name not defined in current configuration.": "Name not defined in current configuration.",
172-
"Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.": "Configuration \"{0}\" in launch.json does not have a {1} argument with {2} for remote process listing.",
173-
"Select the process to attach to": "Select the process to attach to",
174-
"Pipe transport failed to get OS and processes.": "Pipe transport failed to get OS and processes.",
175-
"Operating system \"{0}\" not supported.": "Operating system \"{0}\" not supported.",
176-
"Transport attach could not obtain processes list.": "Transport attach could not obtain processes list.",
177-
"Error Message: ": "Error Message: ",
178-
"See {0} output": "See {0} output",
179-
"Text editor must be focused to fix all issues": "Text editor must be focused to fix all issues",
180-
"Fix all issues": "Fix all issues",
181-
"Select fix all action": "Select fix all action",
182182
"Failed to set extension directory": "Failed to set extension directory",
183183
"Failed to set debugadpter directory": "Failed to set debugadpter directory",
184184
"Failed to set install complete file path": "Failed to set install complete file path",

0 commit comments

Comments
 (0)