Skip to content

Commit c3f5904

Browse files
committed
Merge remote-tracking branch 'upstream' into dev/shech/localization4
2 parents 04da37c + fb2e221 commit c3f5904

File tree

322 files changed

+54708
-17957
lines changed

Some content is hidden

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

322 files changed

+54708
-17957
lines changed

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"recommendations": [
33
"dbaeumer.vscode-eslint",
4-
"esbenp.prettier-vscode"
4+
"esbenp.prettier-vscode",
5+
"orta.vscode-jest"
56
]
67
}

.vscode/launch.json

Lines changed: 72 additions & 57 deletions
Large diffs are not rendered by default.

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
"omnisharp.autoStart": false,
2121
"editor.formatOnSave": false,
2222
"eslint.lintTask.enable": true,
23-
"dotnet.defaultSolution": "disable"
23+
"dotnet.defaultSolution": "disable",
24+
"jest.autoRun": "off"
2425
}

.vscodeignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ server/**
1515
src/**
1616
tasks/**
1717
test/**
18+
omnisharptest/**
19+
__mocks__/**
20+
jest.config.ts
21+
baseJestConfig.ts
22+
.prettierignore
1823
typings/**
1924
vsix/**
2025
node_modules

CHANGELOG.md

Lines changed: 109 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,120 @@
11
## Known Issues
2-
2+
33
- Diagnostics related feature requests and improvements [#5951](https://github.com/dotnet/vscode-csharp/issues/5951)
44
- [O# Parity] FixAll support for code fixes and refactorings [#5735](https://github.com/dotnet/vscode-csharp/issues/5735)
55
- [O# Parity] Nuget restore [#5725](https://github.com/dotnet/vscode-csharp/issues/5725)
6-
- [O# Parity] Support loading projects/files without a solution file [#5722](https://github.com/dotnet/vscode-csharp/issues/5722)
7-
- [O# Parity] Some csproj projects will not correctly load [#5721](https://github.com/dotnet/vscode-csharp/issues/5721)
6+
- [O# Parity] Projects running on Mono may not load correctly [#5721](https://github.com/dotnet/vscode-csharp/issues/5721)
87
- [O# Parity] Run and debug tests in context [#5719](https://github.com/dotnet/vscode-csharp/issues/5719)
98
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
109

1110
## Latest
11+
* Update Roslyn version to 4.8.0-3.23475.7 (PR: [#6431](https://github.com/dotnet/vscode-csharp/pull/6431))
12+
* Fix crash when navigating to .NET Framework reference assemblies (PR: [#69936](https://github.com/dotnet/roslyn/pull/69936))
13+
* Fix error when only the invariant culture is available (PR: [#70096](https://github.com/dotnet/roslyn/pull/70096))
14+
* Fix issue in razor new file formatting (PR: [#6429](https://github.com/dotnet/vscode-csharp/pull/6429))
15+
* Update Razor version to 8.0.0-preview.23465.2 (PR: [#6423](https://github.com/dotnet/vscode-csharp/pull/6423))
16+
* Use message pack for project.razor.* configuration file (PR: [#9270](https://github.com/dotnet/razor/pull/9270))
17+
* Fix issue in debug tests where tests would complete before the debugger attached (PR: [#6415](https://github.com/dotnet/vscode-csharp/pull/6415))
18+
* Hide certain debugger launch configurations when devkit is installed (PR: [#6405](https://github.com/dotnet/vscode-csharp/pull/6405))
19+
* Fix issue where build errors were not parsed correctly in the problems list (PR: [#6340](https://github.com/dotnet/vscode-csharp/pull/6340))
20+
* Update debugger packages to 2.0.3 (PR: [#6401](https://github.com/dotnet/vscode-csharp/pull/6401))
21+
22+
## 2.3.27
23+
* Update Roslyn version to 4.8.0-3.23470.7 (PR: [#6408](https://github.com/dotnet/vscode-csharp/pull/6408))
24+
* Update NuGet version to fix issues loading projects with .NET 8 RC2 (PR: [#70023](https://github.com/dotnet/roslyn/pull/70023))
25+
* Update MSBuildLocator version to fix issues loading projects when only .NET 6 is installed (PR: [#70038](https://github.com/dotnet/roslyn/pull/70038))
26+
* Remove diagnostic source name (PR: [#69939](https://github.com/dotnet/roslyn/pull/69939))
27+
* Fix fold all regions (PR: [#69817](https://github.com/dotnet/roslyn/pull/69817))
28+
* Fix escaping and wrapping in hover (PR: [#69893](https://github.com/dotnet/roslyn/pull/69893))
29+
* Fix error in override completion when containing type does not exist (PR: [#69855](https://github.com/dotnet/roslyn/pull/69855))
30+
* Fix issues generating assets in Omnisharp (PR: [#6380](https://github.com/dotnet/vscode-csharp/pull/6380))
31+
* Allow Razor to format new documents via Roslyn (PR: [#6329](https://github.com/dotnet/vscode-csharp/pull/6329))
32+
* Switch to named pipes for client <-> server communication (PR: [#6351](https://github.com/dotnet/vscode-csharp/pull/6351))
33+
* Only show clr debugger if on Windows (PR: [#6359](https://github.com/dotnet/vscode-csharp/pull/6359))
34+
* Update Razor version to 7.0.0-preview.23456.2 (PR: [#6304](https://github.com/dotnet/vscode-csharp/pull/6304))
35+
* Fixes regression where semantic colors for razor components appear as red
36+
* Make completion complex text edits more robust (PR: [#6325](https://github.com/dotnet/vscode-csharp/pull/6325))
37+
* Fix dotnet info when the dotnet path contains spaces (PR: [#6334](https://github.com/dotnet/vscode-csharp/pull/6334))
38+
* Add support for specifying a .runsettings file when using Roslyn LSP (PR: [#6265](https://github.com/dotnet/vscode-csharp/pull/6265))
39+
* Update Roslyn version (PR: [#6265](https://github.com/dotnet/vscode-csharp/pull/6265))
40+
* Add server support for .runsettings in unit tests (PR: [#69792](https://github.com/dotnet/roslyn/pull/69792))
41+
* Log more information when we're unable to parse a URI (PR: [#69840](https://github.com/dotnet/roslyn/pull/69840))
42+
* Bump ICSharpCode.Decompiler to 8.1.0.745 (PR: [#69772](https://github.com/dotnet/roslyn/pull/69772))
43+
* Fix override completion erroring when framework assemblies are not found (PR: [#69795](https://github.com/dotnet/roslyn/pull/69795))
44+
* Remove test only files from vsix (PR: [#6332](https://github.com/dotnet/vscode-csharp/pull/6332))
45+
* Fix override completion when drive letter casing does not match (PR: [#6315](https://github.com/dotnet/vscode-csharp/pull/6315))
46+
* Allow the server path to be specified by the `DOTNET_ROSLYN_SERVER_PATH` environment variable (PR: [#6316](https://github.com/dotnet/vscode-csharp/pull/6316))
47+
48+
## 2.2.10
49+
* Update Roslyn version
50+
* Includes better support for .NET 8 and .NET Framework-targeting projects (PR: [#69616](https://github.com/dotnet/roslyn/pull/69616))
51+
* This should fix a number of reports where projects don't have full IntelliSense. .NET Framework projects on Windows should load without errors. .NET Framework targeting projects on Mac and Linux which would use Mono are still processed as if they are .NET Core projects and may not load correctly; support for Mono is coming in a future update.
52+
* Fix issues where some projects fail to load being unable to find NuGet.Frameworks (PR: [#69824](https://github.com/dotnet/roslyn/pull/69824))
53+
* Update Razor to 7.0.0-preview.23455.5 (PR: [#6291](https://github.com/dotnet/vscode-csharp/pull/6291))
54+
* Fixes issue reading razor.format.enable and other options (PR: [dotnet/razor#9240](https://github.com/dotnet/razor/issues/9240))
55+
* Fix parsing of tasks.json with comments in certain locations (PR: [#6288](https://github.com/dotnet/vscode-csharp/pull/6288))
56+
* Fix Razor browser discovery issues on Mac and Linux `DOTNET_ROSLYN_SERVER_PATH` environment variable (PR: [#6269](https://github.com/dotnet/vscode-csharp/pull/6269))
57+
58+
## 2.1.2
59+
* Update Roslyn version (PR: [#6264](https://github.com/dotnet/vscode-csharp/pull/6264))
60+
* Upgrade MSBuildLocator to fix homebrew dotnet resolution (PR: [#69769](https://github.com/dotnet/roslyn/pull/69769))
61+
* Fix reported ExeName / ExeVersion (PR: [#69771](https://github.com/dotnet/roslyn/pull/69771))
62+
* Add 1.x setting names to migrated settings descriptions (PR: [#6266](https://github.com/dotnet/vscode-csharp/pull/6266))
63+
64+
## 2.0.436
65+
* Update Roslyn version (PR: [#6245](https://github.com/dotnet/vscode-csharp/pull/6245))
66+
* Fix import completion (PR: [#69691](https://github.com/dotnet/roslyn/pull/69691))
67+
* Reduce overhead on semantic token refresh requests (PR: [#69690](https://github.com/dotnet/roslyn/pull/69690))
68+
* Localization additions (PR: [#6233](https://github.com/dotnet/vscode-csharp/pull/6233), [#6233](https://github.com/dotnet/vscode-csharp/pull/6233), [#6206](https://github.com/dotnet/vscode-csharp/pull/6206), [#6196](https://github.com/dotnet/vscode-csharp/pull/6196))
69+
* Fix specific case where razor formatting no longer worked (PR: [#6195](https://github.com/dotnet/vscode-csharp/pull/6236))
70+
* Fix quoting bug in extension paths (PR: [#6228](https://github.com/dotnet/vscode-csharp/pull/6228))
71+
* Fix Razor mapping errors in the log (PR: [#6209](https://github.com/dotnet/vscode-csharp/pull/6209))
72+
* Add the configuration option for creating binlogs (PR: [#6155](https://github.com/dotnet/vscode-csharp/pull/6155))
73+
* Update option changes toast to reload window (PR: [#6174](https://github.com/dotnet/vscode-csharp/pull/6174))
74+
* Update Roslyn version (PR: [#6205](https://github.com/dotnet/vscode-csharp/pull/6205))
75+
* Add option to capture binlogs for design time builds (PR: [#69572](https://github.com/dotnet/roslyn/pull/69572))
76+
* Enable decompilation support (PR: [#69501](https://github.com/dotnet/roslyn/pull/69501))
77+
* Fix move type adding to the root folder (PR: [#68995](https://github.com/dotnet/roslyn/pull/68995))
78+
* Add support for compilation end diagnostics (PR: [#69541](https://github.com/dotnet/roslyn/pull/69541))
79+
* Bump Razor to 7.0.0-preview.23421.4 (PR: [#6195](https://github.com/dotnet/vscode-csharp/pull/6195))
80+
81+
## 2.0.416
82+
* Fix UriFormatException during dotnet SDK resolution when symlinks are involved (PR: [#6230](https://github.com/dotnet/vscode-csharp/pull/6230))
83+
84+
## 2.0.413
85+
* Update Roslyn version (PR: [#6192](https://github.com/dotnet/vscode-csharp/pull/6192))
86+
* Include CodeLens on more types and members (PR: [#69608](https://github.com/dotnet/roslyn/pull/69608))
87+
* Improve performance when computing colorization (PR: [#69496](https://github.com/dotnet/roslyn/pull/69496))
88+
* Fix dotnet resolver returning incorrect runtime in certain scenarios (PR: [#6180](https://github.com/dotnet/vscode-csharp/pull/6180))
89+
* Fix issue resolving .NET 7 runtimes from path (PR: [#6175](https://github.com/dotnet/vscode-csharp/pull/6175))
90+
* Fix URI issue when loading Razor files (PR: [#6168](https://github.com/dotnet/vscode-csharp/pull/6168))
91+
* Bump Razor to 7.0.0-preview.23417.3 (PR: [#6165](https://github.com/dotnet/vscode-csharp/pull/6165))
92+
* Fix various textDocument/foldingRange issues (PR: [#9134](https://github.com/dotnet/razor/pull/9134))
93+
* Clarify dotnet path option description (PR: [#6164](https://github.com/dotnet/vscode-csharp/pull/6164))
94+
* Handle multiple dotnet on path and symlinks (PR: [#6152](https://github.com/dotnet/vscode-csharp/pull/6152))
95+
* Localize Roslyn options (PR: [#6136](https://github.com/dotnet/vscode-csharp/pull/6136))
96+
* Show a prompt if we have more than one solution file (PR: [#6132](https://github.com/dotnet/vscode-csharp/pull/6132))
97+
98+
## 2.0.376
99+
* Update Roslyn (PR: [#6131](https://github.com/dotnet/vscode-csharp/pull/6131))
100+
* Only show toast for project load failures (PR: [#69494](https://github.com/dotnet/roslyn/pull/69494))
101+
* Fix enter inserting /// on the incorrect line in documentation comments (PR: [#6130](https://github.com/dotnet/vscode-csharp/pull/6130))
102+
* Build extension with node 18 LTS (PR: [#6128](https://github.com/dotnet/vscode-csharp/pull/6128))
103+
* Update localized strings (PR: [#6129](https://github.com/dotnet/vscode-csharp/pull/6129))
104+
* Fix paths for package.nls.*.json (PR: [#6121](https://github.com/dotnet/vscode-csharp/pull/6121))
105+
* Add request to prepare for build diagnostic de-dupping (PR: [#6113](https://github.com/dotnet/vscode-csharp/pull/6113))
106+
* Support unit test debugging options in Roslyn LSP (PR: [#6110](https://github.com/dotnet/vscode-csharp/pull/6110))
107+
* Fix loading of package.nls.*.json (PR: [#6118](https://github.com/dotnet/vscode-csharp/pull/6118))
108+
* Add localization infrastructure to debugger package.json strings (PR: [#6088](https://github.com/dotnet/vscode-csharp/pull/6088))
109+
* Adjust C# semantic token scopes to better match 1.26 (PR: [#6094](https://github.com/dotnet/vscode-csharp/pull/6094))
110+
* Update Razor to 7.0.0-preview.23410.1 (PR: [#6105](https://github.com/dotnet/vscode-csharp/pull/6105))
111+
* Implement razor support for method simplification (PR: [#5982](https://github.com/dotnet/vscode-csharp/pull/5982))
112+
* Attempt to find a valid dotnet version from PATH before using runtime installer extension (PR: [#6074](https://github.com/dotnet/vscode-csharp/pull/6074))
113+
* Respect background analysis scope option in O# (PR: [#6058](https://github.com/dotnet/vscode-csharp/pull/6058))
114+
* Add localization infrastructure to debugger components (PR: [#6064](https://github.com/dotnet/vscode-csharp/pull/6064))
115+
* Add coreclr as a search keyword (PR: [#6071](https://github.com/dotnet/vscode-csharp/pull/6071))
116+
117+
## 2.0.357
12118
* Fix issue with Go to Definition giving a "unable to resolve reference" error (PR: [#69453](https://github.com/dotnet/roslyn/pull/69453))
13119
* Fix completion items not correctly adding using statements to the top of the file (PR: [#69454](https://github.com/dotnet/roslyn/pull/69454))
14120
* Improve de-duping of project load failure toasts (PR: [#69455](https://github.com/dotnet/roslyn/pull/69455))

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
First install:
66

7-
* Node.js ([v18.17.0 LTS](https://nodejs.org/de/blog/release/v18.17.0) is recommended).
7+
* Node.js ([v18.17.0 LTS](https://nodejs.org/en/blog/release/v18.17.0) is recommended).
88
* Npm (The version shipped with node is fine)
99
* .NET 7.0 SDK (dotnet should be on your path)
1010

@@ -49,7 +49,7 @@ VSIXs can be created using the gulp command `gulp vsix:release:package`. This w
4949

5050
To update the version of the roslyn server used by the extension do the following:
5151
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.
52-
2. In the official build stage, look for the `Publish Assets` step. In there you will see it publishing the `Microsoft.CodeAnalysis.LanguageServer` package with some version, e.g. `4.6.0-3.23158.4`. Take note of that version number.
52+
2. In the official build stage, look for the `Publish Assets` step. In there you will see it publishing the `Microsoft.CodeAnalysis.LanguageServer.neutral` package with some version, e.g. `4.6.0-3.23158.4`. Take note of that version number.
5353
3. In the [package.json](package.json) inside the `defaults` section update the `roslyn` key to point to the version number you found above in step 2.
54-
4. Build and test the change (make sure to run `gulp installDependencies` to get the new version!). If everything looks good, submit a PR.
55-
* Adding new package versions might require authentication, run with the `--interactive` flag to login. You may need to install [azure artifacts nuget credential provider](https://github.com/microsoft/artifacts-credprovider#installation-on-windows) to run interactive authentication.
54+
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.
55+
5. Build and test the change. If everything looks good, submit a PR.

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ While it is possible to use the C# extension as a standalone extension, we highl
88
2. Open a folder/workspace that contains a C# project (.csproj) and a C# solution (.sln) and the extension will activate.
99
3. Whether you install C# Dev Kit or just the C# extension, the [.NET Runtime Installer Tool extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscode-dotnet-runtime) will be installed as a dependency.
1010

11-
Note: If working on a solution that requires versions prior to .NET 6 or non-solution based projects, install a Full Framework runtime and [MSBuild tooling](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022).
11+
Note: If working on a solution that requires versions prior to .NET 6 or non-solution based projects, install a .NET Framework runtime and [MSBuild tooling](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022).
1212
* Set omnisharp.useModernNet to false and set dotnet.server.useOmnisharp to true
1313
* Uninstall or disable C# Dev Kit
1414
* Windows: .NET Framework along with [MSBuild Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022)
@@ -29,11 +29,20 @@ For more information you can:
2929
## How to use OmniSharp?
3030
If you don’t want to take advantage of the great Language Server features, you can revert back to using OmniSharp by going to the Extension settings and setting `dotnet.server.useOmnisharp` to true. Next, uninstall or disable C# Dev Kit. Finally, restart VS Code for this to take effect.
3131

32-
3332
## Found a Bug?
34-
To file a new issue to include all the related config information directly from vscode by entering the command pallette with Ctrl+Shift+P (Cmd+Shift+P on macOS) and running CSharp: Report an issue command. This will open a browser window with all the necessary information related to the installed extensions, dotnet version, mono version, etc. Enter all the remaining information and hit submit.
35-
Alternatively you could visit https://github.com/dotnet/vscode-csharp/issues and file a new one.
36-
33+
To file a new issue:
34+
35+
1. Open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS), type "Open Settings (UI)", and press Enter.
36+
2. Search for "trace" in the search bar. Under "Dotnet > Server: Trace" select "Trace" from the drop down. This will provide more output information.
37+
3. Reload the window by opening the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS), type "Reload Window", and press Enter.
38+
4. Next, check the C# logs in the Output Window by opening it with Ctrl+Shift+U (Cmd+Shift+U on macOS), and select C# from the dropdown.
39+
5. Select and copy all the text in the log, and then report the issue through VS Code.
40+
6. Open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS), type “CSharp: Report an issue”, and press Enter.
41+
7. This will open a window with all the necessary information related to the C# extension, dotnet version, mono version, etc.
42+
8. Paste the previously copied C# log into the “Steps to Reproduce” field. Please also include a description of what you were doing/attempting to do at the time the problem occurred.
43+
9. Click the “Preview on GitHub” button, and then file the issue.
44+
45+
Alternatively, you could visit https://github.com/dotnet/vscode-csharp/issues and file a new issue there.
3746

3847
## Contributing
3948

__mocks__/vscode.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import * as vscodeAdapter from '../src/vscodeAdapter';
7+
import { getFakeVsCode } from '../test/unitTests/fakes';
8+
9+
// This module creates a manual mock for the vscode module for running in unit tests.
10+
// Jest will automatically pick this up as it is in the __mocks__ directory next to node_modules.
11+
12+
// We can consider switching to an actual jest mock (instead of this manual fake) once we entirely
13+
// remove the old test framework (mocha/chai).
14+
const vscode: vscodeAdapter.vscode = getFakeVsCode();
15+
module.exports = vscode;

azure-pipelines.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,37 @@ stages:
3434
displayName: Test
3535
dependsOn: []
3636
jobs:
37+
- template: azure-pipelines/test.yml
38+
parameters:
39+
jobName: Linux
40+
poolName: NetCore-Public
41+
demandsName: 1es-ubuntu-2004-open
42+
43+
- template: azure-pipelines/test.yml
44+
parameters:
45+
jobName: Windows
46+
poolName: NetCore-Public
47+
demandsName: 1es-windows-2022-open
48+
49+
- template: azure-pipelines/test.yml
50+
parameters:
51+
jobName: MacOS
52+
poolName: Azure Pipelines
53+
vmImageName: macOS-13
54+
55+
- stage: Test_OmniSharp
56+
displayName: Test OmniSharp
57+
dependsOn: []
58+
jobs:
3759
- job: Test
3860
strategy:
3961
matrix:
4062
linux:
41-
demandsName: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
63+
demandsName: 1es-ubuntu-2004-open
64+
windows:
65+
demandsName: 1es-windows-2022-open
4266
pool:
4367
name: NetCore-Public
44-
demands: $(demandsName)
68+
demands: ImageOverride -equals $(demandsName)
4569
steps:
46-
- template: azure-pipelines/test.yml
70+
- template: azure-pipelines/test-omnisharp.yml

0 commit comments

Comments
 (0)