diff --git a/.gitignore b/.gitignore index 327e0f807..d33e035e1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ out .debugger/ .razor/ .razoromnisharp/ +.razortelemetry/ .vscode-test/ dist/ *.razor.json diff --git a/.vscode/launch.json b/.vscode/launch.json index ff9812299..cd6b1f06c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -15,6 +15,34 @@ ], "preLaunchTask": "buildDev" }, + { + "name": "Launch Current File slnWithCsproj Integration Tests", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + // Create a temp profile that has no extensions / user settings. + // This allows us to only have the C# extension + the dotnet runtime installer extension dependency. + "--profile-temp", + "${workspaceRoot}/test/integrationTests/testAssets/slnWithCsproj/.vscode/lsp_tools_host_slnWithCsproj.code-workspace", + "--extensionDevelopmentPath=${workspaceRoot}", + "--extensionTestsPath=${workspaceRoot}/out/test/integrationTests", + ], + "env": { + "CODE_EXTENSIONS_PATH": "${workspaceRoot}", + "TEST_FILE_FILTER": "${file}" + }, + "sourceMaps": true, + "outFiles": [ + "${workspaceRoot}/dist/*.js", + "${workspaceRoot}/out/test/**/*.js" + ], + "resolveSourceMapLocations": [ + "${workspaceFolder}/**", + "!**/node_modules/**" + ], + "preLaunchTask": "buildDev" + }, { "type": "node", "request": "launch", @@ -66,7 +94,7 @@ // Create a temp profile that has no extensions / user settings. // This allows us to only have the C# extension + the dotnet runtime installer extension dependency. "--profile-temp", - "${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/singleCsproj", + "${workspaceRoot}/test/integrationTests/testAssets/singleCsproj/.vscode/omnisharp_singleCsproj.code-workspace", "--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/omnisharptest/omnisharpIntegrationTests" ], @@ -90,7 +118,7 @@ // Create a temp profile that has no extensions / user settings. // This allows us to only have the C# extension + the dotnet runtime installer extension dependency. "--profile-temp", - "${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/BasicRazorApp2_1", + "${workspaceRoot}/test/integrationTests/testAssets/BasicRazorApp2_1", "--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/omnisharptest/omnisharpIntegrationTests" ], @@ -108,7 +136,7 @@ // Create a temp profile that has no extensions / user settings. // This allows us to only have the C# extension + the dotnet runtime installer extension dependency. "--profile-temp", - "${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithCsproj/.vscode/omnisharp_slnWithCsproj.code-workspace", + "${workspaceRoot}/test/integrationTests/testAssets/slnWithCsproj/.vscode/omnisharp_slnWithCsproj.code-workspace", "--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/omnisharptest/omnisharpIntegrationTests" ], @@ -123,30 +151,6 @@ ], "preLaunchTask": "buildDev" }, - { - "name": "LSP Tools Host: Launch slnWithCsproj Workspace Tests", - "type": "extensionHost", - "request": "launch", - "runtimeExecutable": "${execPath}", - "args": [ - // Create a temp profile that has no extensions / user settings. - // This allows us to only have the C# extension + the dotnet runtime installer extension dependency. - "--profile-temp", - "${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithCsproj/.vscode/lsp_tools_host_slnWithCsproj.code-workspace", - "--extensionDevelopmentPath=${workspaceRoot}", - "--extensionTestsPath=${workspaceRoot}/out/test/integrationTests", - ], - "env": { - "CODE_EXTENSIONS_PATH": "${workspaceRoot}", - "OSVC_SUITE": "slnWithCsproj", - }, - "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/dist/*.js", - "${workspaceRoot}/out/test/**/*.js" - ], - "preLaunchTask": "buildDev" - }, { "name": "Omnisharp: Launch singleCsproj Workspace Tests [LSP]", "type": "extensionHost", @@ -156,7 +160,7 @@ // Create a temp profile that has no extensions / user settings. // This allows us to only have the C# extension + the dotnet runtime installer extension dependency. "--profile-temp", - "${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithCsproj/.vscode/omnisharp_lsp_slnWithCsproj.code-workspace", + "${workspaceRoot}/test/integrationTests/testAssets/singleCsproj/.vscode/omnisharp_lsp_singleCsproj.code-workspace", "--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/omnisharptest/omnisharpIntegrationTests" ], @@ -180,7 +184,7 @@ // Create a temp profile that has no extensions / user settings. // This allows us to only have the C# extension + the dotnet runtime installer extension dependency. "--profile-temp", - "${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/BasicRazorApp2_1", + "${workspaceRoot}/test/integrationTests/testAssets/BasicRazorApp2_1", "--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/omnisharptest/omnisharpIntegrationTests" ], @@ -198,7 +202,7 @@ // Create a temp profile that has no extensions / user settings. // This allows us to only have the C# extension + the dotnet runtime installer extension dependency. "--profile-temp", - "${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithCsproj/.vscode/omnisharp_lsp_slnWithCsproj.code-workspace", + "${workspaceRoot}/test/integrationTests/testAssets/slnWithCsproj/.vscode/omnisharp_lsp_slnWithCsproj.code-workspace", "--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/omnisharptest/omnisharpIntegrationTests" ], @@ -222,7 +226,7 @@ // Create a temp profile that has no extensions / user settings. // This allows us to only have the C# extension + the dotnet runtime installer extension dependency. "--profile-temp", - "${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/slnFilterWithCsproj", + "${workspaceRoot}/test/integrationTests/testAssets/slnFilterWithCsproj", "--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/omnisharptest/omnisharpIntegrationTests" ], @@ -246,7 +250,7 @@ // Create a temp profile that has no extensions / user settings. // This allows us to only have the C# extension + the dotnet runtime installer extension dependency. "--profile-temp", - "${workspaceRoot}/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithGenerator", + "${workspaceRoot}/test/integrationTests/testAssets/slnWithGenerator", "--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/omnisharptest/omnisharpIntegrationTests" ], @@ -271,8 +275,9 @@ "updatePackageDependencies" ], "env": { - "NEW_DEPS_URLS": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-x64-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-x86-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-arm64-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-osx-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-x64-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-x86-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-arm64-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-musl-x64-net6.0-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-musl-arm64-net6.0-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-x64-net6.0-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-arm64-net6.0-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-osx-x64-net6.0-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-osx-arm64-net6.0-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-x64-net6.0-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-x86-net6.0-1.39.7.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-arm64-net6.0-1.39.7.zip", - "NEW_DEPS_VERSION": "1.39.7" + "NEW_DEPS_ID": "OmniSharp", + "NEW_DEPS_URLS": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-x64-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-x86-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-arm64-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-osx-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-x64-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-x86-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-arm64-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-musl-x64-net6.0-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-musl-arm64-net6.0-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-x64-net6.0-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-arm64-net6.0-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-osx-x64-net6.0-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-osx-arm64-net6.0-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-x64-net6.0-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-x86-net6.0-1.39.10.zip,https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-arm64-net6.0-1.39.10.zip", + "NEW_DEPS_VERSION": "1.39.10" }, "cwd": "${workspaceFolder}" }, @@ -286,11 +291,49 @@ "updatePackageDependencies" ], "env": { - "NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/4aca138f5c6299422e240dcc50689a67/razorlanguageserver-linux-arm64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/eee386c129c18ba1705fe411cb981a20/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/7d1e4e0bf72de43dc272d22de2486633/razorlanguageserver-linux-musl-x64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/b9653cb6c40f965986266f70ae7dab25/razorlanguageserver-linux-x64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/679c6fe63c016298914264c33326f2ea/razorlanguageserver-osx-arm64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/74f8a06bc496f54b37466c382c6744ee/razorlanguageserver-osx-x64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/695b332017bfa81af74787904979fde8/razorlanguageserver-win-arm64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/a48c3e83b44a34ddb295099c55e31e7e/razorlanguageserver-win-x64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/e188fa3cbd9a5601701d0f8de0705496/razorlanguageserver-win-x86-7.0.0-preview.23423.3.zip", - "NEW_DEPS_VERSION": "7.0.0-preview.23423.3", + "NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/bb7cd0c44e45bd21cd1341a4a6e87f1c/razorlanguageserver-linux-arm64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/159a171a7cc1ceb96604d148d5c75574/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/fb08013aad8cfbb2bc2c3f5f4d276a0d/razorlanguageserver-linux-musl-x64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/5ece63dde175c03ce79a8ec91005537b/razorlanguageserver-linux-x64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/89a58de8daaea554d00105dc435dfc98/razorlanguageserver-osx-arm64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/8a13539f57d6e59b32e767d3684c6c84/razorlanguageserver-osx-x64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/efe8ebdcd7f4162a537acb9325234f02/razorlanguageserver-win-arm64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/e0d9dc729905a672edb6bb44239fceb0/razorlanguageserver-win-x64-7.0.0-preview.23513.5.zip,https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/c7f08527fbb3809f6dc8e4bf2dc81571/razorlanguageserver-win-x86-7.0.0-preview.23513.5.zip", + "NEW_DEPS_VERSION": "7.0.0-preview.23513.5", "NEW_DEPS_ID": "Razor" }, "cwd": "${workspaceFolder}" - } + }, + { + "type": "node", + "request": "launch", + "name": "Update razor telemetry package dependencies", + "preLaunchTask": "build", + "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", + "args": [ + "updatePackageDependencies" + ], + "env": { + "NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/0b23b6f3f7cf31d231ba6205284521e9/devkittelemetry-linux-arm64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/50b2adf5ee4be81c408b5abb88ab9742/devkittelemetry-linux-musl-arm64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/d6e1c30239e8980a395c4c01cb6b867b/devkittelemetry-linux-musl-x64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/b4f2fb72ed2acda7263fc597fbd20882/devkittelemetry-linux-x64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/c1bda24c3a3a8ec6bbe3a7e28636d0b1/devkittelemetry-osx-arm64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/3c1a78bd8fd33577f8691e122872e63e/devkittelemetry-osx-x64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/6f665a1dfe1d43fded3df2ddd0928236/devkittelemetry-win-arm64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/187a09b50228410a03d7e264181e2503/devkittelemetry-win-x64-7.0.0-preview.23475.5.zip,https://download.visualstudio.microsoft.com/download/pr/baaea3c9-bcff-4331-9fd2-fee91ddbfccb/bd39a95d100683454ee49cfce0a498b9/devkittelemetry-win-x86-7.0.0-preview.23475.5.zip", + "NEW_DEPS_VERSION": "7.0.0-preview.23475.5", + "NEW_DEPS_ID": "RazorTelemetry" + }, + "cwd": "${workspaceFolder}" + }, + { + "type": "node", + "request": "launch", + "name": "Generate debugger options schema", + "preLaunchTask": "build", + "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", + "args": [ + "generateOptionsSchema" + ], + "cwd": "${workspaceFolder}" + }, + { + "type": "node", + "request": "launch", + "name": "Razor integration tests", + "preLaunchTask": "build", + "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", + "args": [ + "test:razorintegration" + ], + "cwd": "${workspaceFolder}" + } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 0c125a0b2..a67f54a97 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,5 +20,6 @@ "omnisharp.autoStart": false, "editor.formatOnSave": false, "eslint.lintTask.enable": true, - "dotnet.defaultSolution": "disable" + "dotnet.defaultSolution": "disable", + "jest.autoRun": "off" } diff --git a/.vscodeignore b/.vscodeignore index 85974d63b..71964e020 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -5,6 +5,7 @@ !.omnisharp/** !.razor/** !.razoromnisharp/** +!.razortelemetry/** .rpt2_cache/** .github/** .vscode/** @@ -15,6 +16,11 @@ server/** src/** tasks/** test/** +omnisharptest/** +__mocks__/** +jest.config.ts +baseJestConfig.ts +.prettierignore typings/** vsix/** node_modules diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ed84c401..68bd37ef7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,116 @@ ## Known Issues - + - Diagnostics related feature requests and improvements [#5951](https://github.com/dotnet/vscode-csharp/issues/5951) -- [O# Parity] FixAll support for code fixes and refactorings [#5735](https://github.com/dotnet/vscode-csharp/issues/5735) +- [O# Parity] Nested code code action support for code fixes and refactorings [#5735](https://github.com/dotnet/vscode-csharp/issues/5735) - [O# Parity] Nuget restore [#5725](https://github.com/dotnet/vscode-csharp/issues/5725) -- [O# Parity] Support loading projects/files without a solution file [#5722](https://github.com/dotnet/vscode-csharp/issues/5722) -- [O# Parity] Some csproj projects will not correctly load [#5721](https://github.com/dotnet/vscode-csharp/issues/5721) -- [O# Parity] Run and debug tests in context [#5719](https://github.com/dotnet/vscode-csharp/issues/5719) - Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876) ## Latest +* Update Razor to 7.0.0-preview.23513.5 (PR: [#6551](https://github.com/dotnet/vscode-csharp/pull/6551)) + * Reduce noisy errors when viewing git diff (PR: [razor#9407](https://github.com/dotnet/razor/pull/9407)) +* Update Roslyn to 4.9.0-1.23513.7 (PR: [#6548](https://github.com/dotnet/vscode-csharp/pull/6548)) + * Fix extraneous error when connecting to devkit (PR: [#70298](https://github.com/dotnet/roslyn/pull/70298)) + * Add support for using Mono to load .NET Framework projects on macOS and Linux (PR: [#70263](https://github.com/dotnet/roslyn/pull/70263)) + * Fix source generator and analyzer output not being recognized if you didn't have C# Dev Kit installed (PR: [#70331](https://github.com/dotnet/roslyn/pull/70331)) +* Hide debug console when using `"console": "integratedTerminal"` (PR: [#6523](https://github.com/dotnet/vscode-csharp/pull/6523)) +* Fix dotnet path resolution when using snap installed packages (PR: [#6515](https://github.com/dotnet/vscode-csharp/pull/6515)) +* Track debugging sessions until csdevkit is initialized (PR: [#6480](https://github.com/dotnet/vscode-csharp/pull/6480)) +* Update vsdbg and vsdbg-ui to 2.0.4 (PR: [#6517](https://github.com/dotnet/vscode-csharp/pull/6517)) +* Add setting to control Razor component commit behaviour (PR: [#6506](https://github.com/dotnet/vscode-csharp/pull/6506)) +* Razor textmate colorization fixes (PR: [#6514](https://github.com/dotnet/vscode-csharp/pull/6514)) +* Update Razor version to 7.0.0-preview.23475.5 (PR: [#6506](https://github.com/dotnet/vscode-csharp/pull/6506)) + * Add setting for whether to complete components with space (PR: [razor#9379](https://github.com/dotnet/razor/pull/9379)) + +## 2.6.24 +* Update Roslyn version to 4.9.0-1.23506.7 (PR: [#6447](https://github.com/dotnet/vscode-csharp/pull/6447)) + * Fix various issues with project loading and allow fallbacks to .NET framework msbuild (PR: [#70240](https://github.com/dotnet/roslyn/pull/70240)) +* Fix some Razor colorization issues (PR: [#6502](https://github.com/dotnet/vscode-csharp/pull/6502)) +* Fire telemetry if Razor buffers get out of sync, and recover from same (PR: [#6494](https://github.com/dotnet/vscode-csharp/pull/6494)) +* Update OmniSharp to 1.39.10 (PR: [#6491](https://github.com/dotnet/vscode-csharp/pull/6491)) + * Add RazorComplier EA to support razor generators (PR: [omnisharp-roslyn#2572](https://github.com/OmniSharp/omnisharp-roslyn/pull/2572)) + * Add Kind parameter to InlayHint (PR: [omnisharp-roslyn#2570](https://github.dev/OmniSharp/omnisharp-roslyn/pull/2570)) + * Do not include commit characters if the typed span is empty (PR: [omnisharp-roslyn#2569](https://github.com/OmniSharp/omnisharp-roslyn/pull/2569)) + * Update Roslyn to version 4.9.0-1.23504.3 (PR: [omnisharp-roslyn#2567](https://github.com/OmniSharp/omnisharp-roslyn/pull/2567)) + * Async diagnostics analyzer work queue (PR: [omnisharp-roslyn#2351](https://github.com/OmniSharp/omnisharp-roslyn/pull/2351)) + * Add InlayHint implementation to OmniSharp.LSP (PR: [omnisharp-roslyn#2566](https://github.com/OmniSharp/omnisharp-roslyn/pull/2566)) + * Include the project file name when invoking `dotnet build` (PR: [omnisharp-roslyn#2565](https://github.com/OmniSharp/omnisharp-roslyn/pull/2565)) + * feat: ignore diagnostics for generated code (PR: [omnisharp-roslyn#2509](https://github.com/OmniSharp/omnisharp-roslyn/pull/2509)) + * Update documentation to reflect --stdio flag deprecation (#2439) (PR: [omnisharp-roslyn#2554](https://github.com/OmniSharp/omnisharp-roslyn/pull/2554)) + * Update Roslyn to version 4.8.0-1.23374.10 (PR: [omnisharp-roslyn#2555](https://github.com/OmniSharp/omnisharp-roslyn/pull/2555)) + * Use double quote when quoting un script path (PR: [omnisharp-roslyn#2553](https://github.com/OmniSharp/omnisharp-roslyn/pull/2553)) + * Use core LSP TokenTypes where possible and validate token names (PR: [omnisharp-roslyn#2548](https://github.com/OmniSharp/omnisharp-roslyn/pull/2548)) +* Add Razor C# semantic tokens support in VS Code (PR: [#6489](https://github.com/dotnet/vscode-csharp/pull/6489)) +* Update Roslyn version to 4.9.0-1.23502.8 (PR: [#6447](https://github.com/dotnet/vscode-csharp/pull/6447)) + * Update Razor project configuration file name (PR: [#70156](https://github.com/dotnet/roslyn/pull/70156))* added support.md file (PR: [#6478](https://github.com/dotnet/vscode-csharp/pull/6478)) +* Debugger: Improve the display of various debug configurations and snippets (PR: [#6456](https://github.com/dotnet/vscode-csharp/pull/6456)) +* Initialize Razor even if Razor doc isn't opened yet (PR: [#6473](https://github.com/dotnet/vscode-csharp/pull/6473)) +* Debugger: better handle long strings ([#6496](https://github.com/dotnet/vscode-csharp/issues/6496)). Strings are truncated if they are longer than 1024 UTF-16 characters, but the full value up to 5,242,880 characters or 10 megabytes, is available using 'Copy Value' in the watch or variables window. Truncated strings will end with '...'. + +## 2.5.30 +* Add code action fix all support (PR: [#6310](https://github.com/dotnet/vscode-csharp/pull/6310)) +* Update Roslyn version to 4.9.0-1.23502.2 (PR: [#6463](https://github.com/dotnet/vscode-csharp/pull/6463)) + * Fix issue loading projects on .NET 8 RC2 (PR: [#70196](https://github.com/dotnet/roslyn/pull/70196)) + * Fix exception thrown by outdated version of ExternalAccess.RazorCompiler.dll (PR: [#70716](https://github.com/dotnet/roslyn/pull/70176)) + * Fix crash when navigating to .NET Framework reference assemblies (PR: [#69936](https://github.com/dotnet/roslyn/pull/69936)) + * Fix error when only the invariant culture is available (PR: [#70096](https://github.com/dotnet/roslyn/pull/70096)) +* Update Razor version to 7.0.0-preview.23475.5 (PR: [#6449](https://github.com/dotnet/vscode-csharp/pull/6449)) + * Add Razor language server telemetry when DevKit is installed (PR: [#9283](https://github.com/dotnet/razor/pull/9283)) + * Use message pack for project.razor.* configuration file (PR: [#9270](https://github.com/dotnet/razor/pull/9270)) +* Fix issues with Razor completion (PR: [#6441](https://github.com/dotnet/vscode-csharp/pull/6441)) +* Add option to collect crash dumps on language server crash (PR: [#6438](https://github.com/dotnet/vscode-csharp/pull/6438)) +* Add support for multilaunch for Blazorwasm (PR: [#6432](https://github.com/dotnet/vscode-csharp/pull/6432)) +* Fix issue in Razor new file formatting (PR: [#6429](https://github.com/dotnet/vscode-csharp/pull/6429)) +* Fix issue in debug tests where tests would complete before the debugger attached (PR: [#6415](https://github.com/dotnet/vscode-csharp/pull/6415)) +* Hide certain debugger launch configurations when devkit is installed (PR: [#6405](https://github.com/dotnet/vscode-csharp/pull/6405)) +* Fix issue where build errors were not parsed correctly in the problems list (PR: [#6340](https://github.com/dotnet/vscode-csharp/pull/6340)) +* Update debugger packages to 2.0.3 (PR: [#6401](https://github.com/dotnet/vscode-csharp/pull/6401)) + +## 2.4.4 +* Respect `dotnet.preferCSharpExtension` option (PR: [#6390](https://github.com/dotnet/vscode-csharp/pull/6390)) + +## 2.3.27 +* Update Roslyn version to 4.8.0-3.23470.7 (PR: [#6408](https://github.com/dotnet/vscode-csharp/pull/6408)) + * Update NuGet version to fix issues loading projects with .NET 8 RC2 (PR: [#70023](https://github.com/dotnet/roslyn/pull/70023)) + * Update MSBuildLocator version to fix issues loading projects when only .NET 6 is installed (PR: [#70038](https://github.com/dotnet/roslyn/pull/70038)) + * Remove diagnostic source name (PR: [#69939](https://github.com/dotnet/roslyn/pull/69939)) + * Fix fold all regions (PR: [#69817](https://github.com/dotnet/roslyn/pull/69817)) + * Fix escaping and wrapping in hover (PR: [#69893](https://github.com/dotnet/roslyn/pull/69893)) + * Fix error in override completion when containing type does not exist (PR: [#69855](https://github.com/dotnet/roslyn/pull/69855)) +* Fix issues generating assets in Omnisharp (PR: [#6380](https://github.com/dotnet/vscode-csharp/pull/6380)) +* Allow Razor to format new documents via Roslyn (PR: [#6329](https://github.com/dotnet/vscode-csharp/pull/6329)) +* Switch to named pipes for client <-> server communication (PR: [#6351](https://github.com/dotnet/vscode-csharp/pull/6351)) +* Only show clr debugger if on Windows (PR: [#6359](https://github.com/dotnet/vscode-csharp/pull/6359)) +* Update Razor version to 7.0.0-preview.23456.2 (PR: [#6304](https://github.com/dotnet/vscode-csharp/pull/6304)) + * Fixes regression where semantic colors for razor components appear as red +* Make completion complex text edits more robust (PR: [#6325](https://github.com/dotnet/vscode-csharp/pull/6325)) +* Fix dotnet info when the dotnet path contains spaces (PR: [#6334](https://github.com/dotnet/vscode-csharp/pull/6334)) +* Add support for specifying a .runsettings file when using Roslyn LSP (PR: [#6265](https://github.com/dotnet/vscode-csharp/pull/6265)) +* Update Roslyn version (PR: [#6265](https://github.com/dotnet/vscode-csharp/pull/6265)) + * Add server support for .runsettings in unit tests (PR: [#69792](https://github.com/dotnet/roslyn/pull/69792)) + * Log more information when we're unable to parse a URI (PR: [#69840](https://github.com/dotnet/roslyn/pull/69840)) + * Bump ICSharpCode.Decompiler to 8.1.0.745 (PR: [#69772](https://github.com/dotnet/roslyn/pull/69772)) + * Fix override completion erroring when framework assemblies are not found (PR: [#69795](https://github.com/dotnet/roslyn/pull/69795)) +* Remove test only files from vsix (PR: [#6332](https://github.com/dotnet/vscode-csharp/pull/6332)) +* Fix override completion when drive letter casing does not match (PR: [#6315](https://github.com/dotnet/vscode-csharp/pull/6315)) +* 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)) + +## 2.2.10 +* Update Roslyn version + * Includes better support for .NET 8 and .NET Framework-targeting projects (PR: [#69616](https://github.com/dotnet/roslyn/pull/69616)) + * 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. + * Fix issues where some projects fail to load being unable to find NuGet.Frameworks (PR: [#69824](https://github.com/dotnet/roslyn/pull/69824)) +* Update Razor to 7.0.0-preview.23455.5 (PR: [#6291](https://github.com/dotnet/vscode-csharp/pull/6291)) + * Fixes issue reading razor.format.enable and other options (PR: [dotnet/razor#9240](https://github.com/dotnet/razor/issues/9240)) +* Fix parsing of tasks.json with comments in certain locations (PR: [#6288](https://github.com/dotnet/vscode-csharp/pull/6288)) +* 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)) + +## 2.1.2 +* Update Roslyn version (PR: [#6264](https://github.com/dotnet/vscode-csharp/pull/6264)) + * Upgrade MSBuildLocator to fix homebrew dotnet resolution (PR: [#69769](https://github.com/dotnet/roslyn/pull/69769)) + * Fix reported ExeName / ExeVersion (PR: [#69771](https://github.com/dotnet/roslyn/pull/69771)) +* Add 1.x setting names to migrated settings descriptions (PR: [#6266](https://github.com/dotnet/vscode-csharp/pull/6266)) + +## 2.0.436 * Update Roslyn version (PR: [#6245](https://github.com/dotnet/vscode-csharp/pull/6245)) * Fix import completion (PR: [#69691](https://github.com/dotnet/roslyn/pull/69691)) * Reduce overhead on semantic token refresh requests (PR: [#69690](https://github.com/dotnet/roslyn/pull/69690)) @@ -36,7 +138,7 @@ * Fix issue resolving .NET 7 runtimes from path (PR: [#6175](https://github.com/dotnet/vscode-csharp/pull/6175)) * Fix URI issue when loading Razor files (PR: [#6168](https://github.com/dotnet/vscode-csharp/pull/6168)) * Bump Razor to 7.0.0-preview.23417.3 (PR: [#6165](https://github.com/dotnet/vscode-csharp/pull/6165)) - * Fix various textDocument/foldingRange issues (PR: [#9134](https://github.com/dotnet/razor/pull/9134)) + * Fix various textDocument/foldingRange issues (PR: [#9134](https://github.com/dotnet/razor/pull/9134)) * Clarify dotnet path option description (PR: [#6164](https://github.com/dotnet/vscode-csharp/pull/6164)) * Handle multiple dotnet on path and symlinks (PR: [#6152](https://github.com/dotnet/vscode-csharp/pull/6152)) * Localize Roslyn options (PR: [#6136](https://github.com/dotnet/vscode-csharp/pull/6136)) @@ -75,7 +177,7 @@ * Fix misleading LSP server logs (PR: [#69378](https://github.com/dotnet/roslyn/pull/69378)) * Add support for code lens enable/disable options to roslyn LSP (PR: [#6001](https://github.com/dotnet/vscode-csharp/pull/6001)) * Onboard Localization pipeline (PR: [#5990](https://github.com/dotnet/vscode-csharp/pull/5990)) -* Enable loading translated strings from razor TS code (PR: [#5962](https://github.com/dotnet/vscode-csharp/pull/5962)) +* Enable loading translated strings from Razor TS code (PR: [#5962](https://github.com/dotnet/vscode-csharp/pull/5962)) * Update typescript and eslint plugin to remove build warning (PR: [6002](https://github.com/dotnet/vscode-csharp/pull/6002)) * Report how the extension was activated (PR: [#6043](https://github.com/dotnet/vscode-csharp/pull/6043)) * Update Razor to 7.0.0-preview.23410.1 (PR: [#6105](https://github.com/dotnet/vscode-csharp/pull/6105)) @@ -96,9 +198,9 @@ We are switching to the new Roslyn language server as the default. We recognize ## 1.26.0 * Update OmniSharp to 1.39.7 (PR: [#5840](https://github.com/OmniSharp/omnisharp-vscode/pull/5840)) - * Respond to breaking change in VSCode 1.79.2 in completion (PR:[#2542](https://github.com/OmniSharp/omnisharp-roslyn/pull/2542)) - * Use dotnet-cake for build (PR:[#2537](https://github.com/OmniSharp/omnisharp-roslyn/pull/2537)) - * Implement LSP CodeAction resolve (PR:[#2467](https://github.com/OmniSharp/omnisharp-roslyn/pull/2467)) + * Respond to breaking change in VSCode 1.79.2 in completion (PR:[omnisharp-roslyn#2542](https://github.com/OmniSharp/omnisharp-roslyn/pull/2542)) + * Use dotnet-cake for build (PR:[omnisharp-roslyn#2537](https://github.com/OmniSharp/omnisharp-roslyn/pull/2537)) + * Implement LSP CodeAction resolve (PR:[omnisharp-roslyn#2467](https://github.com/OmniSharp/omnisharp-roslyn/pull/2467)) * Update debugger to 1.25.8 (PR: [#5706](https://github.com/OmniSharp/omnisharp-vscode/pull/5706)) * Updates to README, default branch and repo link (PR: [#5709](https://github.com/OmniSharp/omnisharp-vscode/pull/5709)) @@ -125,25 +227,26 @@ We are switching to the new Roslyn language server as the default. We recognize * Add C#/HTML folding range support ([razor#8309](https://github.com/dotnet/razor/pull/8309)) * Formatting fixes ([razor#8318](https://github.com/dotnet/razor/pull/8318)) * Update OmniSharp to 1.39.6 (PR: [#5625](https://github.com/OmniSharp/omnisharp-vscode/pull/5625)) - * Use new VS threading version to match with Razor (PR:[#2518](https://github.com/OmniSharp/omnisharp-roslyn/pull/2518)) + * Use new VS threading version to match with Razor (PR:[omnisharp-roslyn#2518](https://github.com/OmniSharp/omnisharp-roslyn/pull/2518)) * Update OmniSharp to 1.39.5 (PR: [#5618](https://github.com/OmniSharp/omnisharp-vscode/pull/5618)) - * Update to Roslyn `4.6.0-3.23153.5` (PR:[#2511](https://github.com/OmniSharp/omnisharp-roslyn/pull/2511)) - * Report to the client if the project being loaded is sdk style (PR:[#2502](https://github.com/OmniSharp/omnisharp-roslyn/pull/2502)) + * Update to Roslyn `4.6.0-3.23153.5` (PR:[omnisharp-roslyn#2511](https://github.com/OmniSharp/omnisharp-roslyn/pull/2511)) + * Report to the client if the project being loaded is sdk style (PR:[omnisharp-roslyn#2502](https://github.com/OmniSharp/omnisharp-roslyn/pull/2502)) * Automatically trust ASP.NET Core HTTPS development certificate (PR: [#5589](https://github.com/OmniSharp/omnisharp-vscode/pull/5589)) * Improve outline to be less verbose (PR: [#5536](https://github.com/OmniSharp/omnisharp-vscode/pull/5536)) * Update Razor TextMate grammar (PR: [#5570](https://github.com/OmniSharp/omnisharp-vscode/pull/5570)) ## 1.25.4 * Update OmniSharp to 1.39.4 (PR: [#5544](https://github.com/OmniSharp/omnisharp-vscode/pull/5544)) - * Disable snippets in sync completion (PR: [#2497](https://github.com/OmniSharp/omnisharp-roslyn/pull/2497)) + * Disable snippets in sync completion (PR: [omnisharp-roslyn#2497](https://github.com/OmniSharp/omnisharp-roslyn/pull/2497)) ## 1.25.3 * Update Razor to 7.0.0-preview.23067.5 (PR: [#5543](https://github.com/OmniSharp/omnisharp-vscode/pull/5543)) * Enables support for arm64 * Adds document color and color presentation features -* Update Roslyn to 4.5.0-2.22527.10 (PR: [#2486](https://github.com/OmniSharp/omnisharp-roslyn/pull/2486)) -* Update dotnet-script dependencies to 1.4.0 (PR: [#2477](https://github.com/OmniSharp/omnisharp-roslyn/pull/2477)) -* Register the LanguageServerLogger only once (PR: [#2473](https://github.com/OmniSharp/omnisharp-roslyn/pull/2473)) +* Update OmniSharp to 1.39.3 (PR: [#5520](https://github.com/OmniSharp/omnisharp-vscode/pull/5520)) + * Update Roslyn to 4.5.0-2.22527.10 (PR: [omnisharp-roslyn#2486](https://github.com/OmniSharp/omnisharp-roslyn/pull/2486)) + * Update dotnet-script dependencies to 1.4.0 (PR: [omnisharp-roslyn#2477](https://github.com/OmniSharp/omnisharp-roslyn/pull/2477)) + * Register the LanguageServerLogger only once (PR: [omnisharp-roslyn#2473](https://github.com/OmniSharp/omnisharp-roslyn/pull/2473)) * Fix extension not finding mono. ([#5454](https://github.com/OmniSharp/omnisharp-vscode/issues/5454), PR: [#5484](https://github.com/OmniSharp/omnisharp-vscode/pull/5484)) * Update debugger to 1.25.3. ([#5460](https://github.com/OmniSharp/omnisharp-vscode/issues/5460), PR: [#5489](https://github.com/OmniSharp/omnisharp-vscode/pull/5489)) * Fix missing fix all commands. ([#5474](https://github.com/OmniSharp/omnisharp-vscode/issues/5474), PR: [#5475](https://github.com/OmniSharp/omnisharp-vscode/pull/5475)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 304d70dcc..a17f2a452 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,7 +49,7 @@ VSIXs can be created using the gulp command `gulp vsix:release:package`. This w To update the version of the roslyn server used by the extension do the following: 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. -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. +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. 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. -4. Build and test the change (make sure to run `gulp installDependencies` to get the new version!). If everything looks good, submit a PR. - * 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. +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. +5. Build and test the change. If everything looks good, submit a PR. \ No newline at end of file diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 000000000..c13db59d4 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,11 @@ +# Support + +## How to file issues and get help + +This project uses GitHub Issues to track bugs and feature requests. Please search the [existing issues](https://github.com/dotnet/vscode-csharp/issues) before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new Issue. + +For help and questions about using this project, please see the [README](https://github.com/dotnet/vscode-csharp/blob/main/README.md). + +## Microsoft Support Policy + +Support for this project is limited to the resources listed above. diff --git a/azure-pipelines-official.yml b/azure-pipelines-official.yml index 098024988..0eef386d9 100644 --- a/azure-pipelines-official.yml +++ b/azure-pipelines-official.yml @@ -5,23 +5,16 @@ trigger: - release pr: none -variables: - ${{ if eq(variables['Build.SourceBranchName'], 'release') }}: - prereleaseFlag: '' - ${{ else }}: - prereleaseFlag: '--prerelease' +parameters: + # Allows the version number to be set manually for a specific build. + # Useful when we need to create an updated extension version with no changes (for example to fix a bad partial release). + - name: versionNumberOverride + type: string + default: 'default' stages: -- stage: Build - dependsOn: [] - jobs: - - job: Build - steps: - - template: azure-pipelines/build.yml - parameters: - prereleaseFlag: $(prereleaseFlag) - pool: - name: NetCore1ESPool-Internal - demands: ImageOverride -equals Build.Ubuntu.2204.Amd64 +- template: azure-pipelines/build.yml + parameters: + versionNumberOverride: ${{ parameters.versionNumberOverride }} # TODO: add compliance, signing. \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0203dcc54..7dc26e45c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,53 +11,44 @@ pr: - release - main -variables: - ${{ if eq(variables['Build.SourceBranchName'], 'release') }}: - prereleaseFlag: '' - ${{ else }}: - prereleaseFlag: '--prerelease' - stages: -- stage: Build - dependsOn: [] - jobs: - - job: Build - steps: - - template: azure-pipelines/build.yml - parameters: - prereleaseFlag: $(prereleaseFlag) - pool: - name: NetCore-Public - demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open +- template: azure-pipelines/build.yml - stage: Test displayName: Test dependsOn: [] jobs: - - job: Test - strategy: - matrix: - linux: - demandsName: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open - windows: - demandsName: ImageOverride -equals 1es-windows-2022-open - pool: - name: NetCore-Public - demands: $(demandsName) - steps: - - template: azure-pipelines/test.yml + - template: azure-pipelines/test.yml + parameters: + jobName: Linux + poolName: NetCore-Public + demandsName: 1es-ubuntu-2004-open + + - template: azure-pipelines/test.yml + parameters: + jobName: Windows + poolName: NetCore-Public + demandsName: 1es-windows-2022-open -- stage: Test_Omnisharp - displayName: Test Omnisharp + - template: azure-pipelines/test.yml + parameters: + jobName: MacOS + poolName: Azure Pipelines + vmImageName: macOS-13 + +- stage: Test_OmniSharp + displayName: Test OmniSharp dependsOn: [] jobs: - job: Test strategy: matrix: linux: - demandsName: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open + demandsName: 1es-ubuntu-2004-open + windows: + demandsName: 1es-windows-2022-open pool: name: NetCore-Public - demands: $(demandsName) + demands: ImageOverride -equals $(demandsName) steps: - template: azure-pipelines/test-omnisharp.yml diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index fb54c630e..729f163c8 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -1,26 +1,63 @@ parameters: -- name: prereleaseFlag +- name: versionNumberOverride type: string + default: 'default' -steps: -- checkout: self - clean: true - submodules: true - fetchTags: false - fetchDepth: 0 +stages: +- stage: Build + displayName: 'Build VSIXs' + jobs: + - job: + displayName: 'Build Prerelease VSIXs' + steps: + - checkout: self + clean: true + submodules: true + fetchTags: false + fetchDepth: 0 -- template: prereqs.yml + - template: prereqs.yml + parameters: + versionNumberOverride: ${{ parameters.versionNumberOverride }} -- script: gulp 'vsix:release:package' ${{ parameters.prereleaseFlag }} - displayName: 'Build VSIXs' + - script: gulp 'vsix:release:package' --prerelease + displayName: 'Build VSIXs' + + - task: PublishPipelineArtifact@1 + # Run the publish step so we have vsix's even if the tests fail. + condition: succeededOrFailed() + displayName: 'Publish VSIXs' + inputs: + targetPath: '$(Build.SourcesDirectory)/vsix' + artifactName: 'VSIX_Prerelease_$(System.JobAttempt)' + + - script: npm run omnisharptest:artifacts + displayName: 'Run artifacts tests' + + - job: + displayName: 'Build Release VSIXs' + steps: + - checkout: self + clean: true + submodules: true + fetchTags: false + fetchDepth: 0 + + - template: prereqs.yml + parameters: + versionNumberOverride: ${{ parameters.versionNumberOverride }} + + - script: gulp 'vsix:release:package' + displayName: 'Build VSIXs' -- task: PublishPipelineArtifact@1 - # Run the publish step so we have vsix's even if the tests fail. - condition: succeededOrFailed() - displayName: 'Publish VSIXs' - inputs: - targetPath: '$(Build.SourcesDirectory)/vsix' - artifactName: 'VSIXs - Attempt $(System.JobAttempt)' + - task: PublishPipelineArtifact@1 + # Run the publish step so we have vsix's even if the tests fail. + condition: succeededOrFailed() + displayName: 'Publish VSIXs' + inputs: + targetPath: '$(Build.SourcesDirectory)/vsix' + artifactName: 'VSIX_Release_$(System.JobAttempt)' -- script: npm run omnisharptest:artifacts - displayName: 'Run artifacts tests' + - script: npm run omnisharptest:artifacts + displayName: 'Run artifacts tests' + \ No newline at end of file diff --git a/azure-pipelines/prereqs.yml b/azure-pipelines/prereqs.yml index 23160601b..8531d9341 100644 --- a/azure-pipelines/prereqs.yml +++ b/azure-pipelines/prereqs.yml @@ -1,3 +1,8 @@ +parameters: + - name: versionNumberOverride + type: string + default: 'default' + steps: # The server package is downloaded from NuGet @@ -13,12 +18,20 @@ steps: inputs: version: '7.x' -# Set the CI build number to the VSIX version we're creating from this build. - script: | dotnet tool install --tool-path $(Agent.BuildDirectory) nbgv - $(Agent.BuildDirectory)/nbgv cloud displayName: Install nbgv +# If we want to override the version, update the version.json here - vsix packaging will see this value +# and use it to set the version number in the package.json. +- ${{ if ne(parameters.versionNumberOverride, 'default') }}: + - script: $(Agent.BuildDirectory)/nbgv set-version ${{ parameters.versionNumberOverride }} + displayName: 'Override version number' + +# Set the CI build number to the VSIX version we're creating from this build. +- script: $(Agent.BuildDirectory)/nbgv cloud + displayName: Set pipeline build number + - script: | npm ci npm i -g gulp @@ -26,6 +39,3 @@ steps: - script: npm run compile displayName: 'Compile' - -- script: npm run vscode:prepublish - displayName: 'Prepublish VSIXs' diff --git a/azure-pipelines/release.yml b/azure-pipelines/release.yml index ee2c8561d..dc040c813 100644 --- a/azure-pipelines/release.yml +++ b/azure-pipelines/release.yml @@ -11,6 +11,9 @@ parameters: - name: test type: boolean default: true + - name: uploadPrerelease + type: boolean + default: true variables: # This is expected to provide VisualStudioMarketplacePAT to the release (https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token) @@ -44,8 +47,15 @@ stages: npm install --global vsce displayName: 'Install vsce' - pwsh: | + $artifactFolderPrefix = "VSIX_Release_" + if ("${{ parameters.uploadPrerelease }}" -eq "true") { + $artifactFolderPrefix = "VSIX_Prerelease_" + } + + Write-Host "Using artifacts from $artifactFolderPrefix" + # Our build pipeline would generated build based on attempt number. Publishing the latest attempt. - $allArtifacts = Get-ChildItem -Path "VSIXs - Attempt*" | Sort-Object -Descending + $allArtifacts = Get-ChildItem -Path "$artifactFolderPrefix*" | Sort-Object -Descending if ($allArtifacts.Length -eq 0) { throw "No Artifacts is downloaded." } @@ -54,14 +64,11 @@ stages: Write-Host "All artifacts: $($allArtifacts). Publishing $($publishArtifacts)." $basePublishArgs = , "publish" - # Artifacts are published to either pre-release or release based on the build branch, https://code.visualstudio.com/api/working-with-extensions/publishing-extension#prerelease-extensions - If ("$(resources.pipeline.officialBuildCI.sourceBranch)" -eq "refs/heads/main") { + If ("${{ parameters.uploadPrerelease }}" -eq "true") { $basePublishArgs += "--pre-release" Write-Host "Publish to pre-release channel." - } ElseIf ("$(resources.pipeline.officialBuildCI.sourceBranch)" -eq "refs/heads/release") { - Write-Host "Publish to release channel." } Else { - throw "Unexpected branch name: $(resources.pipeline.officialBuildCI.sourceBranch)." + Write-Host "Publish to release channel." } $basePublishArgs += '--packagePath' @@ -92,7 +99,7 @@ stages: - stage: 'TagRelease' displayName: 'Tag release of vscode-csharp' dependsOn: 'PublishStage' - condition: and(succeeded('PublishStage'), eq(variables['resources.pipeline.officialBuildCI.sourceBranch'], 'refs/heads/release')) + condition: succeeded('PublishStage') jobs: - job: 'Tag' pool: @@ -109,7 +116,7 @@ stages: fetchDepth: 0 - pwsh: | git checkout $(resources.pipeline.officialBuildCI.sourceCommit) - displayName: 'Checkout to release branch' + displayName: 'Checkout build source branch' - pwsh: | npm ci npm install diff --git a/azure-pipelines/test-omnisharp.yml b/azure-pipelines/test-omnisharp.yml index a651a698a..fefcc52e4 100644 --- a/azure-pipelines/test-omnisharp.yml +++ b/azure-pipelines/test-omnisharp.yml @@ -7,20 +7,16 @@ steps: - template: prereqs.yml -- pwsh: | - if ($IsLinux) { - Write-Host "Activating screen emulation" - /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - $env:DISPLAY=':99.0' - Write-Host "Now running tests" - } +- template: test-prereqs.yml - npm run omnisharptest +- script: npm run omnisharptest displayName: 🧪 Run unit and integration tests + env: + DISPLAY: :99.0 - task: PublishPipelineArtifact@1 condition: failed() displayName: 'Upload integration test logs' inputs: targetPath: '$(Build.SourcesDirectory)/.vscode-test/user-data/logs' - artifactName: 'VSCode Test Logs ($(Agent.JobName)-$(System.JobAttempt))' + artifactName: 'VSCode Test OmniSharp Logs ($(Agent.JobName)-$(System.JobAttempt))' diff --git a/azure-pipelines/test-prereqs.yml b/azure-pipelines/test-prereqs.yml new file mode 100644 index 000000000..c86649a34 --- /dev/null +++ b/azure-pipelines/test-prereqs.yml @@ -0,0 +1,12 @@ +steps: + +- script: npm run vscode:prepublish + displayName: 'Prepublish VSIXs' + +# We need to download the roslyn language server for the current platform to run integration tests against it. +- script: gulp installDependencies + displayName: 'Install Roslyn Language Server' + +- script: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + displayName: 'Activate screen emulation' + condition: eq(variables['Agent.OS'], 'Linux') diff --git a/azure-pipelines/test.yml b/azure-pipelines/test.yml index 90d9c6e36..22b589d2a 100644 --- a/azure-pipelines/test.yml +++ b/azure-pipelines/test.yml @@ -1,26 +1,44 @@ -steps: -- checkout: self - clean: true - submodules: true - fetchTags: false - fetchDepth: 1 +parameters: + - name: jobName + type: string + - name: poolName + type: string + - name: demandsName + type: string + default: '' + - name: vmImageName + type: string + default: '' -- template: prereqs.yml +jobs: +- job: Test_${{ parameters.jobName }} + displayName: 'Test ${{ parameters.jobName }}' + pool: + ${{ if ne(parameters.poolName, '') }}: + name: ${{ parameters.poolName }} + ${{ if ne(parameters.demandsName, '') }}: + demands: ImageOverride -equals ${{ parameters.demandsName }} + ${{ if ne(parameters.vmImageName, '') }}: + vmImage: ${{ parameters.vmImageName }} + steps: + - checkout: self + clean: true + submodules: true + fetchTags: false + fetchDepth: 1 -- pwsh: | - if ($IsLinux) { - Write-Host "Activating screen emulation" - /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & - $env:DISPLAY=':99.0' - Write-Host "Now running tests" - } + - template: prereqs.yml - npm run test - displayName: 🧪 Run unit and integration tests + - template: test-prereqs.yml -- task: PublishPipelineArtifact@1 - condition: failed() - displayName: 'Upload integration test logs' - inputs: - targetPath: '$(Build.SourcesDirectory)/.vscode-test/user-data/logs' - artifactName: 'VSCode Test Logs ($(Agent.JobName)-$(System.JobAttempt))' + - script: npm run test + displayName: 🧪 Run unit and integration tests + env: + DISPLAY: :99.0 + + - task: PublishPipelineArtifact@1 + condition: failed() + displayName: 'Upload integration test logs' + inputs: + targetPath: '$(Build.SourcesDirectory)/.vscode-test/user-data/logs' + artifactName: 'VSCode Test Logs ($(Agent.JobName)-$(System.JobAttempt))' diff --git a/baseJestConfig.ts b/baseJestConfig.ts new file mode 100644 index 000000000..5b7935c76 --- /dev/null +++ b/baseJestConfig.ts @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import type { Config } from 'jest'; + +/** + * Defines a base project config that we can re-use across the project specific jest configs. + * We do this because jest generally does not inherit project configuration settings. + */ +export const baseProjectConfig: Config = { + preset: 'ts-jest', + testEnvironment: 'node', + transformIgnorePatterns: ['/dist/.+\\.js'], +}; diff --git a/gulpfile.ts b/gulpfile.ts index 391bbb80f..fde148e02 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -3,25 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as gulp from 'gulp'; -import * as optionsSchemaGenerator from './src/tools/generateOptionsSchema'; -import * as packageDependencyUpdater from './src/tools/updatePackageDependencies'; - require('./tasks/testTasks'); require('./tasks/offlinePackagingTasks'); require('./tasks/backcompatTasks'); require('./tasks/localizationTasks'); require('./tasks/createTagsTasks'); - -// Disable warning about wanting an async function -// tslint:disable-next-line -gulp.task('generateOptionsSchema', async (): Promise => { - optionsSchemaGenerator.GenerateOptionsSchema(); - return Promise.resolve(); -}); - -// Disable warning about wanting an async function -// tslint:disable-next-line -gulp.task('updatePackageDependencies', async (): Promise => { - return packageDependencyUpdater.updatePackageDependencies(); -}); +require('./tasks/debuggerTasks'); diff --git a/jest.config.ts b/jest.config.ts index 73632cb3e..38657fb42 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -5,17 +5,13 @@ import type { Config } from 'jest'; const config: Config = { - verbose: true, - preset: 'ts-jest', - testEnvironment: 'node', - transformIgnorePatterns: ['/dist/.+\\.js'], - // We need to explicity ignore the out directory for modules - otherwise we'll get duplicate vscode module, - // the TS version from the __mocks__ directory and the compiled js version from the out directory. - modulePathIgnorePatterns: ['out'], - // Specify jest to only run tests in jest folders. - // We also have to include the __mocks__ folder. That folder must be next to node_modules so we can't move it, - // but if we specify roots, jest won't automatically pick it up. So we have to specify it here. - roots: ['/test/unitTests', '/omnisharptest/omnisharpJestTests', '/__mocks__'], + projects: [ + '/test/unitTests/jest.config.ts', + '/test/integrationTests/jest.config.ts', + '/test/razorIntegrationTests/jest.config.ts', + '/test/razorTests/jest.config.ts', + '/omnisharptest/omnisharpUnitTests/jest.config.ts', + ], }; export default config; diff --git a/l10n/bundle.l10n.cs.json b/l10n/bundle.l10n.cs.json index 30113e31f..5ea209374 100644 --- a/l10n/bundle.l10n.cs.json +++ b/l10n/bundle.l10n.cs.json @@ -42,10 +42,11 @@ "Extension": "Rozšíření", "Extensions": "Rozšíření", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "Nepovedlo se dokončit instalaci rozšíření C#. Podívejte se na chybu v okně výstupu níže.", - "Failed to parse tasks.json file": "Nepovedlo se parsovat soubor tasks.json.", + "Failed to parse tasks.json file: {0}": "Nepovedlo se parsovat soubor tasks.json: {0}", "Failed to set debugadpter directory": "Nepovedlo se nastavit adresář debugadpter.", "Failed to set extension directory": "Nepovedlo se nastavit adresář rozšíření.", "Failed to set install complete file path": "Nepovedlo se nastavit úplnou cestu k souboru instalace", + "Fix All Code Action": "Opravit všechny akce kódu", "For further information visit {0}": "Další informace najdete na {0}", "For further information visit {0}.": "Další informace najdete na {0}.", "For more information about the 'console' field, see {0}": "Další informace o poli „console“ najdete v tématu {0}", @@ -72,6 +73,7 @@ "Open envFile": "Otevřít soubor envFile", "Operating system \"{0}\" not supported.": "Operační systém {0} se nepodporuje.", "Perform the actions (or no action) that resulted in your Razor issue": "Proveďte činnost (nebo zopakujte nečinnost), která vedla k problémům s Razorem.", + "Pick a fix all scope": "Výběr opravy všech oborů", "Pipe transport failed to get OS and processes.": "Operaci přenosu přes kanál se nepovedlo získat operační systém a procesy.", "Please fill in this section": "Vyplňte prosím tento oddíl.", "Press {0}": "Stiskněte {0}.", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "V „{0}“ chybí požadované prostředky pro sestavení a ladění. Chcete je přidat?", "Restart": "Restartovat", "Restart Language Server": "Restartovat jazykový server", - "Run and Debug: A valid browser is not installed": "Spustit a ladit: Není nainstalovaný platný prohlížeč.", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Spustit a ladit: Není nainstalovaný platný prohlížeč. Nainstalujte si prosím Edge nebo Chrome.", "Run and Debug: auto-detection found {0} for a launch browser": "Spustit a ladit: Automatická detekce našla {0} pro spouštěný prohlížeč.", "See {0} output": "Zobrazit výstup {0}", "Select the process to attach to": "Vyberte proces, ke kterému se má program připojit.", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[CHYBA]: Rozšíření jazyka C# se nepodařilo nainstalovat balíček ladicího programu.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "Možnost dotnet.server.useOmharharp se změnila. Pokud chcete změnu použít, načtěte prosím znovu okno.", "pipeArgs must be a string or a string array type": "pipeArgs musí být řetězec nebo typ pole řetězců", + "{0} Keyword": "Klíčové slovo {0}", "{0} references": "Počet odkazů: {0}", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, vložte obsah problému jako text problému. Nezapomeňte vyplnit všechny podrobnosti, které ještě vyplněné nejsou." } \ No newline at end of file diff --git a/l10n/bundle.l10n.de.json b/l10n/bundle.l10n.de.json index 6eb0cc120..9d8de36f0 100644 --- a/l10n/bundle.l10n.de.json +++ b/l10n/bundle.l10n.de.json @@ -42,10 +42,11 @@ "Extension": "Erweiterung", "Extensions": "Erweiterungen", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "Fehler beim Abschließen der Installation der C#-Erweiterung. Den Fehler finden Sie unten im Ausgabefenster.", - "Failed to parse tasks.json file": "Fehler beim Analysieren der Datei \"tasks.json\".", + "Failed to parse tasks.json file: {0}": "Fehler beim Analysieren der Datei \"tasks.json\": {0}", "Failed to set debugadpter directory": "Fehler beim Festlegen des Debugadapterverzeichnisses", "Failed to set extension directory": "Fehler beim Festlegen des Erweiterungsverzeichnisses", "Failed to set install complete file path": "Fehler beim Festlegen des Vollständigen Installationsdateipfads.", + "Fix All Code Action": "Korrigieren der gesamten Codeaktion", "For further information visit {0}": "Weitere Informationen finden Sie unter {0}", "For further information visit {0}.": "Weitere Informationen finden Sie unter {0}.", "For more information about the 'console' field, see {0}": "Weitere Informationen zum Feld \"Konsole\" finden Sie unter {0}", @@ -72,6 +73,7 @@ "Open envFile": "envFile öffnen", "Operating system \"{0}\" not supported.": "Das Betriebssystem \"{0}\" wird nicht unterstützt.", "Perform the actions (or no action) that resulted in your Razor issue": "Führen Sie die Aktionen (oder keine Aktion) aus, die zu Ihrem Razor-Problem geführt haben.", + "Pick a fix all scope": "Wählen Sie eine Korrektur für den gesamten Bereich aus", "Pipe transport failed to get OS and processes.": "Der Pipetransport konnte das Betriebssystem und die Prozesse nicht abrufen.", "Please fill in this section": "Füllen Sie diesen Abschnitt aus.", "Press {0}": "Drücken Sie {0}", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "Erforderliche Ressourcen zum Erstellen und Debuggen fehlen in \"{0}\". Sie hinzufügen?", "Restart": "Neu starten", "Restart Language Server": "Sprachserver neu starten", - "Run and Debug: A valid browser is not installed": "Ausführen und Debuggen: Es ist kein gültiger Browser installiert.", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Ausführen und Debuggen: Es ist kein gültiger Browser installiert. Installieren Sie Edge oder Chrome.", "Run and Debug: auto-detection found {0} for a launch browser": "Ausführen und Debuggen: Die automatische Erkennung hat {0} für einen Startbrowser gefunden.", "See {0} output": "{0}-Ausgabe anzeigen", "Select the process to attach to": "Prozess auswählen, an den angefügt werden soll", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[FEHLER]: Fehler beim Installieren des Debuggerpakets durch die C#-Erweiterung.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "Die Option \"dotnet.server.useOmnisharp\" wurde geändert. Laden Sie das Fenster neu, um die Änderung anzuwenden.", "pipeArgs must be a string or a string array type": "pipeArgs muss eine Zeichenfolge oder ein Zeichenfolgenarraytyp sein.", + "{0} Keyword": "{0}-Schlüsselwort", "{0} references": "{0} Verweise", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, fügen Sie den Inhalt des Problems als Textkörper des Problems ein. Vergessen Sie nicht, alle nicht ausgefüllten Details auszufüllen." } \ No newline at end of file diff --git a/l10n/bundle.l10n.es.json b/l10n/bundle.l10n.es.json index 212be3951..b3886eb73 100644 --- a/l10n/bundle.l10n.es.json +++ b/l10n/bundle.l10n.es.json @@ -42,10 +42,11 @@ "Extension": "Extension", "Extensions": "Extensiones", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "No se pudo completar la instalación de la extensión de C#. Vea el error en la ventana de salida siguiente.", - "Failed to parse tasks.json file": "No se pudo analizar el archivo tasks.json", + "Failed to parse tasks.json file: {0}": "No se pudo analizar el archivo tasks.json: {0}", "Failed to set debugadpter directory": "No se pudo establecer el directorio debugadpter", "Failed to set extension directory": "No se pudo establecer el directorio de la extensión", "Failed to set install complete file path": "No se pudo establecer la ruta de acceso completa del archivo de instalación", + "Fix All Code Action": "Corregir toda la acción de código", "For further information visit {0}": "Para obtener más información, visite {0}", "For further information visit {0}.": "Para obtener más información, visite {0}.", "For more information about the 'console' field, see {0}": "Para obtener más información sobre el campo \"consola\", consulte {0}", @@ -72,6 +73,7 @@ "Open envFile": "Abrir envFile", "Operating system \"{0}\" not supported.": "No se admite el sistema operativo \"{0}\".", "Perform the actions (or no action) that resulted in your Razor issue": "Realizar las acciones (o ninguna acción) que provocaron el problema de Razor", + "Pick a fix all scope": "Seleccionar una corrección de todo el ámbito", "Pipe transport failed to get OS and processes.": "El transporte de canalización no pudo obtener el sistema operativo y los procesos.", "Please fill in this section": "Rellene esta sección", "Press {0}": "Presionar {0}", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "Faltan los recursos en '{0}' necesarios para compilar y depurar. ¿Quiere agregarlos?", "Restart": "Reiniciar", "Restart Language Server": "Reiniciar servidor de lenguaje", - "Run and Debug: A valid browser is not installed": "Ejecutar y depurar: no hay instalado un explorador válido", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Ejecutar y depurar: no hay instalado un explorador válido. Instale Edge o Chrome.", "Run and Debug: auto-detection found {0} for a launch browser": "Ejecución y depuración: detección automática encontrada {0} para un explorador de inicio", "See {0} output": "Ver salida {0}", "Select the process to attach to": "Seleccione el proceso al que debe asociarse", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[ERROR]: la extensión de C# no pudo instalar el paquete del depurador.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "La opción dotnet.server.useOmnrp ha cambiado. Vuelva a cargar la ventana para aplicar el cambio.", "pipeArgs must be a string or a string array type": "pipeArgs debe ser una cadena o un tipo de matriz de cadena", + "{0} Keyword": "{0} Palabra clave", "{0} references": "{0} referencias", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, pegue el contenido del problema como el cuerpo del problema. No olvide rellenar los detalles que no se han rellenado." } \ No newline at end of file diff --git a/l10n/bundle.l10n.fr.json b/l10n/bundle.l10n.fr.json index a911b9ef7..85079328d 100644 --- a/l10n/bundle.l10n.fr.json +++ b/l10n/bundle.l10n.fr.json @@ -42,10 +42,11 @@ "Extension": "Extension", "Extensions": "Extensions", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "Échec de l’installation de l’extension C#. Consultez l’erreur dans la fenêtre sortie ci-dessous.", - "Failed to parse tasks.json file": "Échec de l’analyse du fichier tasks.json", + "Failed to parse tasks.json file: {0}": "Échec de l'analyse du fichier Tasks.json : {0}", "Failed to set debugadpter directory": "Échec de la définition du répertoire debugadpter", "Failed to set extension directory": "Échec de la définition du répertoire d’extensions", "Failed to set install complete file path": "Échec de la définition du chemin d’accès complet à l’installation", + "Fix All Code Action": "Corriger toutes les actions de code", "For further information visit {0}": "Pour plus d’informations, consultez {0}", "For further information visit {0}.": "Pour plus d’informations, consultez {0}.", "For more information about the 'console' field, see {0}": "Pour plus d’informations sur le champ « console », consultez {0}", @@ -72,6 +73,7 @@ "Open envFile": "Ouvrir envFile", "Operating system \"{0}\" not supported.": "Système d'exploitation \"{0}\" non pris en charge.", "Perform the actions (or no action) that resulted in your Razor issue": "Effectuez les actions (ou aucune action) ayant entraîné votre problème Razor", + "Pick a fix all scope": "Choisir un correctif pour toutes les étendues", "Pipe transport failed to get OS and processes.": "Le transport de canal n'a pas pu obtenir le système d'exploitation et les processus.", "Please fill in this section": "Veuillez remplir cette section", "Press {0}": "Appuyez sur {0}", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "Les ressources requises pour la génération et le débogage sont manquantes dans « {0} ». Les ajouter ?", "Restart": "Redémarrer", "Restart Language Server": "Redémarrer le serveur de langue", - "Run and Debug: A valid browser is not installed": "Exécuter et déboguer : aucun navigateur valide n’est installé", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Exécuter et déboguer : aucun navigateur valide n’est installé. Installez Edge ou Chrome.", "Run and Debug: auto-detection found {0} for a launch browser": "Exécuter et déboguer : détection automatique détectée {0} pour un navigateur de lancement", "See {0} output": "Voir la sortie {0}", "Select the process to attach to": "Sélectionner le processus à attacher", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[ERREUR] : l’extension C# n’a pas pu installer le package du débogueur.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "l’option dotnet.server.useOmnzurp a changé. Rechargez la fenêtre pour appliquer la modification", "pipeArgs must be a string or a string array type": "pipeArgs doit être une chaîne ou un type de tableau de chaînes", + "{0} Keyword": "Mot clé {0}", "{0} references": "{0} références", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, collez le contenu de votre problème en tant que corps du problème. N’oubliez pas de remplir tous les détails qui n’ont pas été remplis." } \ No newline at end of file diff --git a/l10n/bundle.l10n.it.json b/l10n/bundle.l10n.it.json index 8213ff96b..4ae100836 100644 --- a/l10n/bundle.l10n.it.json +++ b/l10n/bundle.l10n.it.json @@ -42,10 +42,11 @@ "Extension": "Estensione", "Extensions": "Estensioni", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "Non è stato possibile completare l'installazione dell'estensione C#. Vedere l'errore nella finestra di output seguente.", - "Failed to parse tasks.json file": "Non è stato possibile analizzare il file tasks.json", + "Failed to parse tasks.json file: {0}": "Non è stato possibile analizzare il file tasks.json: {0}", "Failed to set debugadpter directory": "Non è stato possibile impostare la directory dell'elenco di debug", "Failed to set extension directory": "Non è stato possibile impostare la directory delle estensioni", "Failed to set install complete file path": "Non è stato possibile impostare il percorso completo del file di installazione", + "Fix All Code Action": "Correzione di tutte le azioni del codice", "For further information visit {0}": "Per ulteriori informazioni, visitare {0}", "For further information visit {0}.": "Per ulteriori informazioni, visitare {0}.", "For more information about the 'console' field, see {0}": "Per ulteriori informazioni sul campo 'console', vedere {0}", @@ -72,6 +73,7 @@ "Open envFile": "Apri envFile", "Operating system \"{0}\" not supported.": "Il sistema operativo \"{0}\" non è supportato.", "Perform the actions (or no action) that resulted in your Razor issue": "Eseguire le azioni (o nessuna azione) che hanno generato il problema Razor", + "Pick a fix all scope": "Seleziona una correzione per tutti gli ambiti", "Pipe transport failed to get OS and processes.": "Il trasporto pipe non è riuscito a ottenere il sistema operativo e i processi.", "Please fill in this section": "Compila questa sezione", "Press {0}": "Premere {0}", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "Le risorse necessarie per la compilazione e il debug non sono presenti in '{0}'. Aggiungerli?", "Restart": "Riavvia", "Restart Language Server": "Riavviare il server di linguaggio", - "Run and Debug: A valid browser is not installed": "Esecuzione e debug: non è installato un browser valido", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Esecuzione e debug: non è installato un browser valido. Installa Edge o Chrome.", "Run and Debug: auto-detection found {0} for a launch browser": "Esecuzione e debug: il rilevamento automatico ha trovato {0} per un browser di avvio", "See {0} output": "Vedi output {0}", "Select the process to attach to": "Selezionare il processo a cui collegarsi", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[ERROR]: l'estensione C# non è riuscita a installare il pacchetto del debugger.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "L'opzione dotnet.server.useOmnisharp è stata modificata. Ricaricare la finestra per applicare la modifica", "pipeArgs must be a string or a string array type": "pipeArgs deve essere un tipo stringa o matrice di stringhe", + "{0} Keyword": "Parola chiave di {0}", "{0} references": "{0} riferimenti", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, incollare il contenuto del problema come corpo del problema. Non dimenticare di compilare i dettagli rimasti che non sono stati compilati." } \ No newline at end of file diff --git a/l10n/bundle.l10n.ja.json b/l10n/bundle.l10n.ja.json index c77edd9c0..7fb9bd5fb 100644 --- a/l10n/bundle.l10n.ja.json +++ b/l10n/bundle.l10n.ja.json @@ -42,10 +42,11 @@ "Extension": "拡張機能", "Extensions": "拡張機能", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "C# 拡張機能のインストールを完了できませんでした。以下の出力ウィンドウでエラーを確認してください。", - "Failed to parse tasks.json file": "tasks.json ファイルを解析できませんでした", + "Failed to parse tasks.json file: {0}": "tasks.json ファイルを解析できませんでした: {0}", "Failed to set debugadpter directory": "debugadpter ディレクトリを設定できませんでした", "Failed to set extension directory": "拡張機能ディレクトリを設定できませんでした", "Failed to set install complete file path": "インストール完了ファイル パスを設定できませんでした", + "Fix All Code Action": "すべてのコードアクションを修正する", "For further information visit {0}": "詳細については、{0} を参照してください", "For further information visit {0}.": "詳細については、{0} を参照してください。", "For more information about the 'console' field, see {0}": "'console' フィールドの詳細については、{0} を参照してください", @@ -72,6 +73,7 @@ "Open envFile": "envFile を開く", "Operating system \"{0}\" not supported.": "オペレーティング システム \"{0}\" はサポートされていません。", "Perform the actions (or no action) that resulted in your Razor issue": "Razor の問題の原因となったアクションを実行します (またはアクションを実行しません)", + "Pick a fix all scope": "すべてのスコープの修正を選択する", "Pipe transport failed to get OS and processes.": "パイプ トランスポートで OS とプロセスを取得できませんでした。", "Please fill in this section": "このセクションに入力してください", "Press {0}": "{0} を押す", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "ビルドおよびデバッグに必要な資産が '{0}' にありません。追加しますか?", "Restart": "再起動", "Restart Language Server": "言語サーバーの再起動", - "Run and Debug: A valid browser is not installed": "実行とデバッグ: 有効なブラウザーがインストールされていません", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "実行とデバッグ: 有効なブラウザーがインストールされていません。Edge または Chrome をインストールしてください。", "Run and Debug: auto-detection found {0} for a launch browser": "実行とデバッグ: 起動ブラウザーの自動検出で {0} が見つかりました", "See {0} output": "{0} 出力を参照", "Select the process to attach to": "アタッチするプロセスを選択する", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[エラー]: C# 拡張機能でデバッガー パッケージをインストールできませんでした。", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "dotnet.server.useOmnisharp オプションが変更されました。変更を適用するために、ウィンドウを再読み込みしてください", "pipeArgs must be a string or a string array type": "pipeArgs は文字列型または文字列配列型である必要があります", + "{0} Keyword": "{0} キーワード", "{0} references": "{0} 個の参照", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}、問題の内容を問題の本文として貼り付けます。未記入の詳細があれば忘れずに記入してください。" } \ No newline at end of file diff --git a/l10n/bundle.l10n.json b/l10n/bundle.l10n.json index 41112fb7f..859647485 100644 --- a/l10n/bundle.l10n.json +++ b/l10n/bundle.l10n.json @@ -30,7 +30,7 @@ "For more information about the 'console' field, see {0}": "For more information about the 'console' field, see {0}", "WARNING": "WARNING", "The C# extension was unable to automatically decode projects in the current workspace to create a runnable launch.json file. A template launch.json file has been created as a placeholder.\n\nIf the server is currently unable to load your project, you can attempt to resolve this by restoring any missing project dependencies (example: run 'dotnet restore') and by fixing any reported errors from building the projects in your workspace.\nIf this allows the server to now load your project then --\n * Delete this file\n * Open the Visual Studio Code command palette (View->Command Palette)\n * run the command: '.NET: Generate Assets for Build and Debug'.\n\nIf your project requires a more complex launch configuration, you may wish to delete this configuration and pick a different template using the 'Add Configuration...' button at the bottom of this file.": "The C# extension was unable to automatically decode projects in the current workspace to create a runnable launch.json file. A template launch.json file has been created as a placeholder.\n\nIf the server is currently unable to load your project, you can attempt to resolve this by restoring any missing project dependencies (example: run 'dotnet restore') and by fixing any reported errors from building the projects in your workspace.\nIf this allows the server to now load your project then --\n * Delete this file\n * Open the Visual Studio Code command palette (View->Command Palette)\n * run the command: '.NET: Generate Assets for Build and Debug'.\n\nIf your project requires a more complex launch configuration, you may wish to delete this configuration and pick a different template using the 'Add Configuration...' button at the bottom of this file.", - "Failed to parse tasks.json file": "Failed to parse tasks.json file", + "Failed to parse tasks.json file: {0}": "Failed to parse tasks.json file: {0}", "Don't Ask Again": "Don't Ask Again", "Required assets to build and debug are missing from '{0}'. Add them?": "Required assets to build and debug are missing from '{0}'. Add them?", "Cancel": "Cancel", @@ -110,6 +110,7 @@ "Unexpected error when attaching to C# preview window.": "Unexpected error when attaching to C# preview window.", "Razor C# copied to clipboard": "Razor C# copied to clipboard", "Copy C#": "Copy C#", + "{0} Keyword": "{0} Keyword", "Unexpected completion trigger kind: {0}": "Unexpected completion trigger kind: {0}", "1 reference": "1 reference", "{0} references": "{0} references", @@ -117,7 +118,7 @@ "There was an unexpected error while launching your debugging session. Check the console for helpful logs and visit the debugging docs for more info.": "There was an unexpected error while launching your debugging session. Check the console for helpful logs and visit the debugging docs for more info.", "View Debug Docs": "View Debug Docs", "Ignore": "Ignore", - "Run and Debug: A valid browser is not installed": "Run and Debug: A valid browser is not installed", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change", "Reload Window": "Reload Window", "C# configuration has changed. Would you like to relaunch the Language Server with your changes?": "C# configuration has changed. Would you like to relaunch the Language Server with your changes?", @@ -127,6 +128,8 @@ "Choose and set default": "Choose and set default", "Do not load any": "Do not load any", "C# configuration has changed. Would you like to reload the window to apply your changes?": "C# configuration has changed. Would you like to reload the window to apply your changes?", + "Pick a fix all scope": "Pick a fix all scope", + "Fix All Code Action": "Fix All Code Action", "pipeArgs must be a string or a string array type": "pipeArgs must be a string or a string array type", "Name not defined in current configuration.": "Name not defined in current configuration.", "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.", diff --git a/l10n/bundle.l10n.ko.json b/l10n/bundle.l10n.ko.json index fc8ea0337..8e9c562b8 100644 --- a/l10n/bundle.l10n.ko.json +++ b/l10n/bundle.l10n.ko.json @@ -42,10 +42,11 @@ "Extension": "확장", "Extensions": "확장", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "C# 확장 설치를 완료하지 못했습니다. 아래 출력 창에서 오류를 확인하세요.", - "Failed to parse tasks.json file": "tasks.json 파일을 구문 분석하지 못했습니다.", + "Failed to parse tasks.json file: {0}": "tasks.json 파일을 구문 분석하지 못했습니다: {0}", "Failed to set debugadpter directory": "debugadpter 디렉터리를 설정하지 못했습니다.", "Failed to set extension directory": "확장 디렉터리를 설정하지 못했습니다.", "Failed to set install complete file path": "설치 완료 파일 경로를 설정하지 못했습니다.", + "Fix All Code Action": "모든 코드 동작 수정", "For further information visit {0}": "자세한 내용은 {0}을(를) 방문하세요.", "For further information visit {0}.": "자세한 내용은 {0}을(를) 방문하세요.", "For more information about the 'console' field, see {0}": "'콘솔' 필드에 대한 자세한 내용은 {0}을(를) 참조하세요.", @@ -72,6 +73,7 @@ "Open envFile": "환경 파일 열기", "Operating system \"{0}\" not supported.": "운영 체제 \"{0}\"은(는) 지원되지 않습니다.", "Perform the actions (or no action) that resulted in your Razor issue": "Razor 문제의 원인이 된 작업 수행(또는 아무 작업도 수행하지 않음)", + "Pick a fix all scope": "모든 범위 수정 선택", "Pipe transport failed to get OS and processes.": "파이프 전송이 OS 및 프로세스를 가져오지 못했습니다.", "Please fill in this section": "이 섹션을 작성하세요.", "Press {0}": "{0} 누르기", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "빌드 및 디버그에 필요한 자산이 '{0}'에서 누락되었습니다. 추가하시겠습니까?", "Restart": "다시 시작", "Restart Language Server": "언어 서버 다시 시작", - "Run and Debug: A valid browser is not installed": "실행 및 디버그: 올바른 브라우저가 설치되어 있지 않습니다", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "실행 및 디버그:유효한 브라우저가 설치되어 있지 않습니다. Edge나 Chrome을 설치하세요.", "Run and Debug: auto-detection found {0} for a launch browser": "실행 및 디버그: 자동 검색에서 시작 브라우저에 대한 {0} 발견", "See {0} output": "{0} 출력 보기", "Select the process to attach to": "연결할 프로세스 선택", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[오류]: C# 확장이 디버거 패키지를 설치하지 못했습니다.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "dotnet.server.useOmnisharp 옵션이 변경되었습니다. 변경 내용을 적용하려면 창을 다시 로드하세요.", "pipeArgs must be a string or a string array type": "pipeArgs는 문자열 또는 문자열 배열 유형이어야 합니다.", + "{0} Keyword": "{0} 키워드", "{0} references": "참조 {0}개", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, 문제 내용을 문제의 본문으로 붙여넣습니다. 작성하지 않은 세부 정보를 잊지 말고 입력합니다." } \ No newline at end of file diff --git a/l10n/bundle.l10n.pl.json b/l10n/bundle.l10n.pl.json index 39d33d98f..0085b1be2 100644 --- a/l10n/bundle.l10n.pl.json +++ b/l10n/bundle.l10n.pl.json @@ -42,10 +42,11 @@ "Extension": "Rozszerzenie", "Extensions": "Rozszerzenia", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "Nie można ukończyć instalacji rozszerzenia języka C#. Zobacz błąd w poniższym oknie danych wyjściowych.", - "Failed to parse tasks.json file": "Nie można przeanalizować pliku tasks.json", + "Failed to parse tasks.json file: {0}": "Nie można przeanalizować pliku tasks.json: {0}", "Failed to set debugadpter directory": "Nie można ustawić katalogu debugadpter", "Failed to set extension directory": "Nie można ustawić katalogu rozszerzenia", "Failed to set install complete file path": "Nie można ustawić pełnej ścieżki pliku instalacji", + "Fix All Code Action": "Napraw całą akcję kodu", "For further information visit {0}": "Aby uzyskać więcej informacji, odwiedź witrynę {0}", "For further information visit {0}.": "Aby uzyskać więcej informacji, odwiedź witrynę {0}.", "For more information about the 'console' field, see {0}": "Aby uzyskać więcej informacji o polu „console”, zobacz {0}", @@ -72,6 +73,7 @@ "Open envFile": "Otwórz plik envFile", "Operating system \"{0}\" not supported.": "System operacyjny „{0}” nie jest obsługiwany.", "Perform the actions (or no action) that resulted in your Razor issue": "Wykonaj akcje (lub brak akcji), które spowodowały problem z aparatem Razor", + "Pick a fix all scope": "Wybierz poprawkę dla całego zakresu", "Pipe transport failed to get OS and processes.": "Transport potokowy nie może pobrać systemu operacyjnego i procesów.", "Please fill in this section": "Wypełnij tę sekcję", "Press {0}": "Naciśnij {0}", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "Brak wymaganych zasobów do kompilowania i debugowania z „{0}”. Dodać je?", "Restart": "Uruchom ponownie", "Restart Language Server": "Ponownie uruchom serwer języka", - "Run and Debug: A valid browser is not installed": "Uruchom i debuguj: prawidłowa przeglądarka nie jest zainstalowana", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Uruchom i debuguj: nie zainstalowano prawidłowej przeglądarki. Zainstaluj przeglądarkę Edge lub Chrome.", "Run and Debug: auto-detection found {0} for a launch browser": "Uruchamianie i debugowanie: automatyczne wykrywanie znalazło {0} dla przeglądarki uruchamiania", "See {0} output": "Zobacz dane wyjściowe {0}", "Select the process to attach to": "Wybierz docelowy proces dołączania", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[BŁĄD]: Rozszerzenie języka C# nie może zainstalować pakietu debugera.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "Opcja dotnet.server.useOmnisharp została zmieniona. Załaduj ponownie okno, aby zastosować zmianę", "pipeArgs must be a string or a string array type": "Argument pipeArgs musi być ciągiem lub typem tablicy ciągów", + "{0} Keyword": "Słowo kluczowe {0}", "{0} references": "Odwołania: {0}", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, wklej zawartość problemu jako treść problemu. Nie zapomnij wypełnić wszystkich szczegółów, które pozostały niewypełnione." } \ No newline at end of file diff --git a/l10n/bundle.l10n.pt-br.json b/l10n/bundle.l10n.pt-br.json index b274a6611..25f471da5 100644 --- a/l10n/bundle.l10n.pt-br.json +++ b/l10n/bundle.l10n.pt-br.json @@ -42,10 +42,11 @@ "Extension": "Extensão", "Extensions": "Extensões", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "Falha ao concluir a instalação da extensão C#. Confira o erro na janela de saída abaixo.", - "Failed to parse tasks.json file": "Falha ao analisar o arquivo tasks.json", + "Failed to parse tasks.json file: {0}": "Falha ao analisar o arquivo task.json: {0}", "Failed to set debugadpter directory": "Falha ao definir o diretório de depuração", "Failed to set extension directory": "Falha ao configurar o diretório da extensão", "Failed to set install complete file path": "Falha ao configurar o caminho do arquivo para concluir a instalação", + "Fix All Code Action": "Corrigir Todas as Ações de Código", "For further information visit {0}": "Para obter mais informações, acesse {0}", "For further information visit {0}.": "Para obter mais informações, visite {0}.", "For more information about the 'console' field, see {0}": "Para obter mais informações sobre o campo \"console\", confira {0}", @@ -72,6 +73,7 @@ "Open envFile": "Abrir o envFile", "Operating system \"{0}\" not supported.": "Não há suporte para o sistema operacional \"{0}\".", "Perform the actions (or no action) that resulted in your Razor issue": "Execute as ações (ou nenhuma ação) que resultaram no problema do seu Razor", + "Pick a fix all scope": "Escolher uma correção para todo o escopo", "Pipe transport failed to get OS and processes.": "O transporte de pipe falhou ao obter o SO e os processos.", "Please fill in this section": "Preencha esta seção", "Press {0}": "Pressione {0}", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "Os ativos necessários para compilar e depurar estão ausentes de \"{0}\". Deseja adicioná-los?", "Restart": "Reiniciar", "Restart Language Server": "Reiniciar o Servidor de Linguagem", - "Run and Debug: A valid browser is not installed": "Executar e depurar: um navegador válido não está instalado", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Executar e depurar: um navegador válido não está instalado. Instale o Edge ou o Chrome.", "Run and Debug: auto-detection found {0} for a launch browser": "Executar e depurar: detecção automática encontrada {0} para um navegador de inicialização", "See {0} output": "Ver a saída de {0}", "Select the process to attach to": "Selecione o processo ao qual anexar", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[ERRO]: a extensão C# falhou ao instalar o pacote do depurador.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "A opção dotnet.server.useOmnisharp foi alterada. Atualize a janela para aplicar a alteração", "pipeArgs must be a string or a string array type": "pipeArgs deve ser uma cadeia de caracteres ou um tipo de matriz de cadeia de caracteres", + "{0} Keyword": "{0} Palavra-chave", "{0} references": "{0} referências", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, cole o conteúdo do problema como o corpo do problema. Não se esqueça de preencher todos os detalhes que não foram preenchidos." } \ No newline at end of file diff --git a/l10n/bundle.l10n.ru.json b/l10n/bundle.l10n.ru.json index f0827570c..896ffd3e3 100644 --- a/l10n/bundle.l10n.ru.json +++ b/l10n/bundle.l10n.ru.json @@ -42,10 +42,11 @@ "Extension": "Расширение", "Extensions": "Расширения", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "Не удалось завершить установку расширения C#. См. ошибку в окне вывода ниже.", - "Failed to parse tasks.json file": "Не удалось проанализировать файл tasks.json.", + "Failed to parse tasks.json file: {0}": "Не удалось проанализировать файл tasks.json: {0}", "Failed to set debugadpter directory": "Не удалось установить каталог отладчика", "Failed to set extension directory": "Не удалось установить каталог расширений", "Failed to set install complete file path": "Не удалось установить полный путь к файлу установки", + "Fix All Code Action": "Исправить все действия с кодом", "For further information visit {0}": "Для получения дополнительных сведений посетите {0}", "For further information visit {0}.": "Для получения дополнительных сведений посетите {0}.", "For more information about the 'console' field, see {0}": "Дополнительные сведения о поле \"console\" см. в {0}", @@ -72,6 +73,7 @@ "Open envFile": "Открыть envFile", "Operating system \"{0}\" not supported.": "Операционная система \"{0}\" не поддерживается.", "Perform the actions (or no action) that resulted in your Razor issue": "Выполните действия (или воспроизведите условия), которые вызвали проблему Razor", + "Pick a fix all scope": "Выбрать исправление для всей области", "Pipe transport failed to get OS and processes.": "Транспорту канала не удалось получить ОС и процессы.", "Please fill in this section": "Заполните этот раздел", "Press {0}": "Нажмите {0}", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "Необходимые ресурсы для сборки и отладки отсутствуют в \"{0}\". Добавить их?", "Restart": "Перезапустить", "Restart Language Server": "Перезапустить языковой сервер", - "Run and Debug: A valid browser is not installed": "Запуск и отладка: не установлен допустимый браузер", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Запуск и отладка: не установлен допустимый браузер. Установите Microsoft Edge или Chrome.", "Run and Debug: auto-detection found {0} for a launch browser": "Запуск и отладка: для браузера запуска автоматически обнаружено {0}", "See {0} output": "Просмотреть выходные данные {0}", "Select the process to attach to": "Выберите процесс, к которому нужно выполнить подключение", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[ОШИБКА]: расширению C# не удалось установить пакет отладчика.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "Параметр dotnet.server.useOmnisharp изменен. Перезагрузите окно, чтобы применить изменение", "pipeArgs must be a string or a string array type": "pipeArgs должен быть строкой или строковым массивом", + "{0} Keyword": "Ключевое слово: {0}", "{0} references": "Ссылок: {0}", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, вставьте описание проблемы в соответствующее поле. Не забудьте указать все необходимые сведения." } \ No newline at end of file diff --git a/l10n/bundle.l10n.tr.json b/l10n/bundle.l10n.tr.json index c1c2342aa..f55d1e93e 100644 --- a/l10n/bundle.l10n.tr.json +++ b/l10n/bundle.l10n.tr.json @@ -42,10 +42,11 @@ "Extension": "Uzantı", "Extensions": "Uzantılar", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "C# uzantısının yüklenmesi tamamlanamadı. Lütfen aşağıdaki çıkış penceresindeki hataya bakın.", - "Failed to parse tasks.json file": "tasks.json dosyası ayrıştırılamadı", + "Failed to parse tasks.json file: {0}": "tasks.json dosyası ayrıştırılamadı: {0}", "Failed to set debugadpter directory": "Hata ayıklayıcı dizini ayarlanamadı", "Failed to set extension directory": "Uzantı dizini ayarlanamadı", "Failed to set install complete file path": "Tam dosya yolu yüklemesi ayarlanamadı", + "Fix All Code Action": "Tümünü Düzelt Kod Eylemi", "For further information visit {0}": "Daha fazla bilgi için bkz. {0}", "For further information visit {0}.": "Daha fazla bilgi için bkz. {0}.", "For more information about the 'console' field, see {0}": "'Konsol' alanı hakkında daha fazla bilgi için bkz. {0}", @@ -72,6 +73,7 @@ "Open envFile": "envFile’ı aç", "Operating system \"{0}\" not supported.": "\"{0}\" işletim sistemi desteklenmiyor.", "Perform the actions (or no action) that resulted in your Razor issue": "Razor sorunuzla sonuçlanan eylemleri gerçekleştirin (veya eylem gerçekleştirmeyin)", + "Pick a fix all scope": "Tümünü düzelt kapsamı seçin", "Pipe transport failed to get OS and processes.": "Kanal aktarımı, işletim sistemini ve işlemleri alamadı.", "Please fill in this section": "Lütfen bu bölümü doldurun", "Press {0}": "{0} tuşuna basın", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "'{0}' derleme ve hata ayıklama için gerekli varlıklara sahip değil. Eklensin mi?", "Restart": "Yeniden Başlat", "Restart Language Server": "Dil Sunucusunu Yeniden Başlat", - "Run and Debug: A valid browser is not installed": "Çalıştır ve Hata Ayıkla: Geçerli bir tarayıcı yüklü değil", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Çalıştır ve Hata Ayıkla: Geçerli bir tarayıcı yüklü değil. Lütfen Edge veya Chrome tarayıcısını yükleyin.", "Run and Debug: auto-detection found {0} for a launch browser": "Çalıştır ve Hata Ayıkla: otomatik algılama bir başlatma tarayıcısı için {0} buldu", "See {0} output": "{0} çıktısını göster", "Select the process to attach to": "Eklenilecek işlemi seçin", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[HATA]: C# Uzantısı hata ayıklayıcı paketini yükleyemedi.", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "dotnet.server.useOmnisharp seçeneği değiştirildi. Değişikliği uygulamak için lütfen pencereyi yeniden yükleyin", "pipeArgs must be a string or a string array type": "pipeArgs bir dize veya dize dizisi türü olmalıdır", + "{0} Keyword": "{0} Anahtar Sözcüğü", "{0} references": "{0} başvuru", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, sorun içeriklerinizi sorunun gövdesi olarak yapıştırın. Daha sonrasında doldurulmamış olan ayrıntıları sağlamayı unutmayın." } \ No newline at end of file diff --git a/l10n/bundle.l10n.zh-cn.json b/l10n/bundle.l10n.zh-cn.json index c1fca461a..c33b83d97 100644 --- a/l10n/bundle.l10n.zh-cn.json +++ b/l10n/bundle.l10n.zh-cn.json @@ -42,10 +42,11 @@ "Extension": "扩展", "Extensions": "扩展", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "无法完成 C# 扩展的安装。请在下面的输出窗口中查看错误。", - "Failed to parse tasks.json file": "未能分析 tasks.json 文件", + "Failed to parse tasks.json file: {0}": "未能分析 tasks.json 文件: {0}", "Failed to set debugadpter directory": "未能设置调试程序目录", "Failed to set extension directory": "无法设置扩展目录", "Failed to set install complete file path": "无法设置安装完成文件路径", + "Fix All Code Action": "修复所有代码操作", "For further information visit {0}": "有关详细信息,请访问 {0}", "For further information visit {0}.": "有关详细信息,请访问 {0}。", "For more information about the 'console' field, see {0}": "有关“控制台”字段的详细信息,请参阅 {0}", @@ -72,6 +73,7 @@ "Open envFile": "打开 envFile", "Operating system \"{0}\" not supported.": "不支持操作系统“{0}”。", "Perform the actions (or no action) that resulted in your Razor issue": "执行导致出现 Razor 问题的操作(或不执行任何操作)", + "Pick a fix all scope": "选取所有范围的修补程序", "Pipe transport failed to get OS and processes.": "管道传输未能获取 OS 和进程。", "Please fill in this section": "请填写此部分", "Press {0}": "按 {0}", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "\"{0}\" 中缺少生成和调试所需的资产。添加它们?", "Restart": "重启", "Restart Language Server": "重启语言服务器", - "Run and Debug: A valid browser is not installed": "运行和调试: 未安装有效的浏览器", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "运行和调试: 未安装有效的浏览器。请安装 Microsoft Edge 或 Chrome。", "Run and Debug: auto-detection found {0} for a launch browser": "运行和调试: 为启动浏览器找到 {0} 自动检测", "See {0} output": "查看 {0} 输出", "Select the process to attach to": "选择要附加到的进程", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[错误]: C# 扩展无法安装调试器包。", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "dotnet.server.useOmnisharp 选项已更改。请重新加载窗口以应用更改", "pipeArgs must be a string or a string array type": "pipeArgs 必须是字符串或字符串数组类型", + "{0} Keyword": "{0} 关键字", "{0} references": "{0} 个引用", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0},将问题内容粘贴为问题的正文。请记得填写任何未填充的详细信息。" } \ No newline at end of file diff --git a/l10n/bundle.l10n.zh-tw.json b/l10n/bundle.l10n.zh-tw.json index 4257fe9c3..26ab8d3d7 100644 --- a/l10n/bundle.l10n.zh-tw.json +++ b/l10n/bundle.l10n.zh-tw.json @@ -42,10 +42,11 @@ "Extension": "延伸模組", "Extensions": "延伸模組", "Failed to complete the installation of the C# extension. Please see the error in the output window below.": "無法完成 C# 延伸模組的安裝。請參閱下列輸出視窗中的錯誤。", - "Failed to parse tasks.json file": "無法剖析 tasks.json 檔案", + "Failed to parse tasks.json file: {0}": "無法剖析 tasks.json 檔案: {0}", "Failed to set debugadpter directory": "無法設定 debugadpter 目錄", "Failed to set extension directory": "無法設定延伸模組目錄", "Failed to set install complete file path": "無法設定安裝完整檔案路徑", + "Fix All Code Action": "修正所有程式碼動作", "For further information visit {0}": "如需詳細資訊,請造訪 {0}", "For further information visit {0}.": "如需詳細資訊,請造訪 {0}。", "For more information about the 'console' field, see {0}": "如需 [主控台] 欄位的詳細資訊,請參閱 {0}", @@ -72,6 +73,7 @@ "Open envFile": "開啟 envFile", "Operating system \"{0}\" not supported.": "不支援作業系統 \"{0}\"。", "Perform the actions (or no action) that resulted in your Razor issue": "執行導致 Razor 問題的動作 (或不執行動作)", + "Pick a fix all scope": "選擇修正所有範圍", "Pipe transport failed to get OS and processes.": "管道傳輸無法取得 OS 和處理序。", "Please fill in this section": "請填寫此區段", "Press {0}": "按 {0}", @@ -99,7 +101,7 @@ "Required assets to build and debug are missing from '{0}'. Add them?": "'{0}' 缺少建置和偵錯所需的資產。要新增嗎?", "Restart": "重新啟動", "Restart Language Server": "重新啟動語言伺服器", - "Run and Debug: A valid browser is not installed": "執行並偵錯: 未安裝有效的瀏覽器", + "Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "執行和偵錯工具: 未安裝有效的瀏覽器。請安裝 Edge 或 Chrome。", "Run and Debug: auto-detection found {0} for a launch browser": "執行並偵錯: 針對啟動瀏覽器找到 {0} 自動偵測", "See {0} output": "查看 {0} 輸出", "Select the process to attach to": "選取要附加至的目標處理序", @@ -150,6 +152,7 @@ "[ERROR]: C# Extension failed to install the debugger package.": "[錯誤]: C# 延伸模組無法安裝偵錯工具套件。", "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "dotnet.server.useOmnisharp 選項已變更。請重新載入視窗以套用變更", "pipeArgs must be a string or a string array type": "pipeArgs 必須是字串或字串陣列類型", + "{0} Keyword": "{0} 關鍵字", "{0} references": "{0} 個參考", "{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0},將您的問題內容貼上作為問題的本文。別忘了填寫任何未填入的詳細資料。" } \ No newline at end of file diff --git a/omnisharptest/omnisharpFeatureTests/assets.test.ts b/omnisharptest/omnisharpFeatureTests/assets.test.ts index 5c44e8012..84121077a 100644 --- a/omnisharptest/omnisharpFeatureTests/assets.test.ts +++ b/omnisharptest/omnisharpFeatureTests/assets.test.ts @@ -78,7 +78,7 @@ suite('Asset generation: csproj', () => { // We do not check the watch task since this parameter can break hot reload scenarios. tasksJson.tasks .filter((task) => task.label !== 'watch') - .forEach((task) => task.args!.should.contain('/consoleloggerparameters:NoSummary')); + .forEach((task) => task.args!.should.contain('/consoleloggerparameters:NoSummary;ForceNoAlign')); }); test("Generated 'watch' task does not have the property GenerateFullPaths set to true ", () => { @@ -111,7 +111,7 @@ suite('Asset generation: csproj', () => { const watchTask = tasksJson.tasks!.find((task) => task.label === 'watch'); isNotNull(watchTask?.args); - watchTask.args.should.not.contain('/consoleloggerparameters:NoSummary'); + watchTask.args.should.not.contain('/consoleloggerparameters:NoSummary;ForceNoAlign'); }); test('Create tasks.json for nested project opened in workspace', () => { diff --git a/omnisharptest/omnisharpIntegrationTests/advisor.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/advisor.integration.test.ts index d8a0aba92..a8845a1dc 100644 --- a/omnisharptest/omnisharpIntegrationTests/advisor.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/advisor.integration.test.ts @@ -8,7 +8,7 @@ import * as vscode from 'vscode'; import { expect, should } from 'chai'; import * as path from 'path'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { Advisor } from '../../src/features/diagnosticsProvider'; diff --git a/omnisharptest/omnisharpIntegrationTests/codeActionRename.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/codeActionRename.integration.test.ts index d8b9dff2a..bb0484903 100644 --- a/omnisharptest/omnisharpIntegrationTests/codeActionRename.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/codeActionRename.integration.test.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import { should, expect } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import * as path from 'path'; import { assertWithPoll } from './poll'; import { isNotNull } from '../testUtil'; diff --git a/omnisharptest/omnisharpIntegrationTests/codeLensProvider.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/codeLensProvider.integration.test.ts index 6ce594408..5eb764de2 100644 --- a/omnisharptest/omnisharpIntegrationTests/codeLensProvider.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/codeLensProvider.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, expect } from 'chai'; import { activateCSharpExtension, isSlnWithCsproj, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { isNotNull } from '../testUtil'; suite(`CodeLensProvider: ${testAssetWorkspace.description}`, function () { @@ -117,7 +117,7 @@ suite(`CodeLensProvider options: ${testAssetWorkspace.description}`, function () await csharpConfig.update('codeLens.enableTestsCodeLens', false); const codeLenses = await GetCodeLenses(fileUri, 100); - expect(codeLenses.length).to.equal(2); + expect(codeLenses.length).to.equal(3); for (const codeLens of codeLenses) { expect(codeLens.isResolved).to.be.true; diff --git a/omnisharptest/omnisharpIntegrationTests/completionProvider.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/completionProvider.integration.test.ts index 87ea52127..b96c7130e 100644 --- a/omnisharptest/omnisharpIntegrationTests/completionProvider.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/completionProvider.integration.test.ts @@ -5,7 +5,7 @@ import OmniSharpCompletionProvider from '../../src/features/completionProvider'; import * as vscode from 'vscode'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import * as path from 'path'; import { use, expect, should } from 'chai'; import * as chaiArray from 'chai-arrays'; @@ -93,7 +93,7 @@ suite(`${OmniSharpCompletionProvider.name}: Returns the completion items`, () => sawAdditionalTextEdits = true; expect(i.additionalTextEdits).to.be.array(); expect(i.additionalTextEdits.length).to.equal(1); - expect(i.additionalTextEdits[0].newText).to.equal('using singleCsproj2;\n'); + expect(normalizeNewlines(i.additionalTextEdits[0].newText)).to.equal('using singleCsproj2;\n'); expect(i.additionalTextEdits[0].range.start.line).to.equal(1); expect(i.additionalTextEdits[0].range.start.character).to.equal(0); expect(i.additionalTextEdits[0].range.end.line).to.equal(1); @@ -107,4 +107,10 @@ suite(`${OmniSharpCompletionProvider.name}: Returns the completion items`, () => expect(sawAdditionalTextEdits).to.be.true; expect(sawEmptyAdditionalTextEdits).to.be.true; }); + + function normalizeNewlines(text: string) { + // using directives are now added with the line ending used by other + // using directives in the file instead of the formatting option end_of_line. + return text.replaceAll('\r\n', '\n'); + } }); diff --git a/omnisharptest/omnisharpIntegrationTests/definitionProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/definitionProvider.test.ts index a8daa92af..6683038f7 100644 --- a/omnisharptest/omnisharpIntegrationTests/definitionProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/definitionProvider.test.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import OmniSharpDefinitionProvider from '../../src/features/definitionProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { expect, should } from 'chai'; import { activateCSharpExtension, diff --git a/omnisharptest/omnisharpIntegrationTests/diagnostics.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/diagnostics.integration.test.ts index c3c0a7386..d1eda9ab3 100644 --- a/omnisharptest/omnisharpIntegrationTests/diagnostics.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/diagnostics.integration.test.ts @@ -13,7 +13,7 @@ import { isSlnWithGenerator, restartOmniSharpServer, } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { poll, assertWithPoll, pollDoesNotHappen } from './poll'; import { isNotNull } from '../testUtil'; diff --git a/omnisharptest/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts index cf3fe0b4b..eca66ae76 100644 --- a/omnisharptest/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, expect } from 'chai'; import * as integrationHelpers from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; suite(`DocumentSymbolProvider: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/omnisharptest/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts index 902c83896..f5fa7a1de 100644 --- a/omnisharptest/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts @@ -8,7 +8,7 @@ import * as chaiArray from 'chai-arrays'; import * as vscode from 'vscode'; import * as path from 'path'; import { isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; use(chaiArray); diff --git a/omnisharptest/omnisharpIntegrationTests/dotnetTest.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/dotnetTest.integration.test.ts index 4bbd5f4b3..894c2f1b2 100644 --- a/omnisharptest/omnisharpIntegrationTests/dotnetTest.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/dotnetTest.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, expect } from 'chai'; import { activateCSharpExtension, isSlnWithCsproj } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { EventStream } from '../../src/eventStream'; import { EventType } from '../../src/omnisharp/eventType'; import { OmnisharpRequestMessage } from '../../src/omnisharp/loggingEvents'; @@ -47,8 +47,8 @@ suite(`DotnetTest: ${testAssetWorkspace.description}`, function () { }); test('Undefined runsettings path is unchanged', async function () { - const omnisharpConfig = vscode.workspace.getConfiguration('omnisharp'); - await omnisharpConfig.update('testRunSettings', undefined); + const omnisharpConfig = vscode.workspace.getConfiguration('dotnet'); + await omnisharpConfig.update('unitTests.runSettingsPath', undefined); const eventWaiter = testAssetWorkspace.waitForEvent( eventStream, @@ -69,8 +69,8 @@ suite(`DotnetTest: ${testAssetWorkspace.description}`, function () { const relativeRunSettingsPath = `.\\settings\\TestSettings.runsettings`.replace('\\', path.sep); const absoluteRunSettingsPath = path.join(process.cwd(), relativeRunSettingsPath); - const omnisharpConfig = vscode.workspace.getConfiguration('omnisharp'); - await omnisharpConfig.update('testRunSettings', absoluteRunSettingsPath); + const omnisharpConfig = vscode.workspace.getConfiguration('dotnet'); + await omnisharpConfig.update('unitTests.runSettingsPath', absoluteRunSettingsPath); const eventWaiter = testAssetWorkspace.waitForEvent( eventStream, @@ -91,8 +91,8 @@ suite(`DotnetTest: ${testAssetWorkspace.description}`, function () { const endingPath = 'settings\\TestSettings.runsettings'.replace('\\', path.sep); const relativeRunSettingPath = `.\\${endingPath}`.replace('\\', path.sep); - const omnisharpConfig = vscode.workspace.getConfiguration('omnisharp'); - await omnisharpConfig.update('testRunSettings', relativeRunSettingPath); + const omnisharpConfig = vscode.workspace.getConfiguration('dotnet'); + await omnisharpConfig.update('unitTests.runSettingsPath', relativeRunSettingPath); const eventWaiter = testAssetWorkspace.waitForEvent( eventStream, diff --git a/omnisharptest/omnisharpIntegrationTests/hoverProvider.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/hoverProvider.integration.test.ts index f835fe8b5..1b5273e12 100644 --- a/omnisharptest/omnisharpIntegrationTests/hoverProvider.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/hoverProvider.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, expect } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; export type Test = 'a' | 'b' | ['c', any]; diff --git a/omnisharptest/omnisharpIntegrationTests/implementationProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/implementationProvider.test.ts index 570530ce6..8582905ec 100644 --- a/omnisharptest/omnisharpIntegrationTests/implementationProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/implementationProvider.test.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import OmniSharpImplementationProvider from '../../src/features/implementationProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { expect, should } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; diff --git a/omnisharptest/omnisharpIntegrationTests/inlayHints.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/inlayHints.integration.test.ts index 2b01d5019..c6d0023d7 100644 --- a/omnisharptest/omnisharpIntegrationTests/inlayHints.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/inlayHints.integration.test.ts @@ -12,7 +12,7 @@ import { isSlnWithGenerator, restartOmniSharpServer, } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import * as path from 'path'; import { InlayHint, LinePositionSpanTextChange } from '../../src/omnisharp/protocol'; import { isNotNull } from '../testUtil'; diff --git a/omnisharptest/omnisharpIntegrationTests/languageMiddleware.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/languageMiddleware.integration.test.ts index b85c2dbf8..b5c7204ba 100644 --- a/omnisharptest/omnisharpIntegrationTests/languageMiddleware.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/languageMiddleware.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { expect, should } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; import { LanguageMiddleware, LanguageMiddlewareFeature } from '../../src/omnisharp/languageMiddlewareFeature'; diff --git a/omnisharptest/omnisharpIntegrationTests/launchConfiguration.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/launchConfiguration.integration.test.ts index 4259da579..1b8249bfa 100644 --- a/omnisharptest/omnisharpIntegrationTests/launchConfiguration.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/launchConfiguration.integration.test.ts @@ -8,7 +8,7 @@ import * as vscode from 'vscode'; import { should, expect } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { poll } from './poll'; import { isNotNull } from '../testUtil'; diff --git a/omnisharptest/omnisharpIntegrationTests/reAnalyze.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/reAnalyze.integration.test.ts index d265040f0..e03541bad 100644 --- a/omnisharptest/omnisharpIntegrationTests/reAnalyze.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/reAnalyze.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, expect } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { poll, assertWithPoll } from './poll'; import { EventStream } from '../../src/eventStream'; import { EventType } from '../../src/omnisharp/eventType'; diff --git a/omnisharptest/omnisharpIntegrationTests/referenceProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/referenceProvider.test.ts index 35cc1f567..71bc637ea 100644 --- a/omnisharptest/omnisharpIntegrationTests/referenceProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/referenceProvider.test.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import OmniSharpReferenceProvider from '../../src/features/referenceProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { expect, should } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; diff --git a/omnisharptest/omnisharpIntegrationTests/semanticTokensProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/semanticTokensProvider.test.ts index 419e17a9f..c8aabbb49 100644 --- a/omnisharptest/omnisharpIntegrationTests/semanticTokensProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/semanticTokensProvider.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { should, assert } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; interface ExpectedToken { startLine: number; diff --git a/omnisharptest/omnisharpIntegrationTests/signatureHelp.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/signatureHelp.integration.test.ts index a501c619d..3e16d1268 100644 --- a/omnisharptest/omnisharpIntegrationTests/signatureHelp.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/signatureHelp.integration.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { expect, should } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; suite(`SignatureHelp: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/omnisharptest/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts index eedde2600..4585c3df7 100644 --- a/omnisharptest/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts @@ -9,7 +9,7 @@ import * as path from 'path'; import OmniSharpDefinitionProvider from '../../src/features/definitionProvider'; import { activateCSharpExtension, isSlnWithGenerator, restartOmniSharpServer } from './integrationHelpers'; import { assertWithPoll, sleep } from './poll'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; suite(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/omnisharptest/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts b/omnisharptest/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts new file mode 100644 index 000000000..2bf613dc0 --- /dev/null +++ b/omnisharptest/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as path from 'path'; +import * as vscode from 'vscode'; + +import { ITestAssetWorkspace } from '../../../test/integrationTests/testAssets/testAssets'; + +import singleCsproj from '../../../test/integrationTests/testAssets/singleCsproj'; +import slnWithCsproj from '../../../test/integrationTests/testAssets/slnWithCsproj'; +import slnFilterWithCsproj from '../../../test/integrationTests/testAssets/slnFilterWithCsproj'; +import BasicRazorApp2_1 from '../../../test/integrationTests/testAssets/basicRazorApp21'; +import slnWithGenerator from '../../../test/integrationTests/testAssets/slnWithGenerator'; +import { OmnisharpTestAssetWorkspace } from './omnisharpTestAssetWorkspace'; + +const testAssetWorkspaces: { [x: string]: ITestAssetWorkspace } = { + singleCsproj, + slnWithCsproj, + slnFilterWithCsproj, + BasicRazorApp2_1, + slnWithGenerator, +}; + +const workspaceName = vscode.workspace.workspaceFolders![0].uri.fsPath.split(path.sep).pop(); + +const activeTestAssetWorkspace = new OmnisharpTestAssetWorkspace(testAssetWorkspaces[workspaceName!]); + +export default activeTestAssetWorkspace; diff --git a/omnisharptest/omnisharpIntegrationTests/testAssets/testAssets.ts b/omnisharptest/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts similarity index 54% rename from omnisharptest/omnisharpIntegrationTests/testAssets/testAssets.ts rename to omnisharptest/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts index 07ef976a3..a41fe54bf 100644 --- a/omnisharptest/omnisharpIntegrationTests/testAssets/testAssets.ts +++ b/omnisharptest/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts @@ -3,40 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as fs from 'async-file'; -import * as path from 'path'; import * as vscode from 'vscode'; import { EventStream } from '../../../src/eventStream'; import { EventType } from '../../../src/omnisharp/eventType'; import { BaseEvent } from '../../../src/omnisharp/loggingEvents'; -import { ActivationResult } from '../integrationHelpers'; import { poll } from '../poll'; -import spawnGit from './spawnGit'; - -export class TestAssetProject { - constructor(project: ITestAssetProject) { - this.relativeFilePath = project.relativeFilePath; - } - - relativeFilePath: string; - - get projectDirectoryPath(): string { - return path.join(vscode.workspace.workspaceFolders![0].uri.fsPath, path.dirname(this.relativeFilePath)); - } - - async addFileWithContents(fileName: string, contents: string): Promise { - const dir = this.projectDirectoryPath; - const loc = path.join(dir, fileName); - await fs.writeTextFile(loc, contents); - return vscode.Uri.file(loc); - } -} +import { ITestAssetWorkspace, TestAssetWorkspace } from '../../../test/integrationTests/testAssets/testAssets'; +import { ActivationResult } from '../integrationHelpers'; -export class TestAssetWorkspace { +export class OmnisharpTestAssetWorkspace extends TestAssetWorkspace { constructor(workspace: ITestAssetWorkspace) { - this.projects = workspace.projects.map((w) => new TestAssetProject(w)); - - this.description = workspace.description; + super(workspace); } async restore(): Promise { @@ -103,48 +80,4 @@ export class TestAssetWorkspace { subscription.unsubscribe(); } - - get vsCodeDirectoryPath(): string { - return path.join(vscode.workspace.workspaceFolders![0].uri.fsPath, '.vscode'); - } - - get launchJsonPath(): string { - return path.join(this.vsCodeDirectoryPath, 'launch.json'); - } - - get tasksJsonPath(): string { - return path.join(this.vsCodeDirectoryPath, 'tasks.json'); - } - - async cleanupWorkspace(): Promise { - const workspaceRootPath = vscode.workspace.workspaceFolders![0].uri.fsPath; - const cleanUpRoutine = async () => { - await vscode.commands.executeCommand('workbench.action.closeAllEditors'); - await spawnGit(['clean', '-xdf', '.'], { cwd: workspaceRootPath }); - await spawnGit(['checkout', '--', '.'], { cwd: workspaceRootPath }); - }; - - const sleep = async () => new Promise((resolve) => setTimeout(resolve, 2 * 1000)); - - try { - await cleanUpRoutine(); - } catch (error) { - // Its possible that cleanup fails for locked files etc, for this reason retry is added. - await sleep(); - await cleanUpRoutine(); - } - } - - description: string; - - projects: TestAssetProject[]; -} - -export interface ITestAssetProject { - relativeFilePath: string; -} - -export interface ITestAssetWorkspace { - description: string; - projects: ITestAssetProject[]; } diff --git a/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithCsproj/a_FirstInOrder_SlnFile.sln b/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithCsproj/a_FirstInOrder_SlnFile.sln deleted file mode 100644 index 96b8b7c42..000000000 --- a/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithCsproj/a_FirstInOrder_SlnFile.sln +++ /dev/null @@ -1,85 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31321.278 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D28FC441-C95D-47D2-8D5C-E401ABAD7C64}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "app", "src\app\app.csproj", "{D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "lib", "src\lib\lib.csproj", "{717BE881-D74C-45FC-B55D-2085499E1BF8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "test", "test\test.csproj", "{4679428B-0CA0-4228-B8C0-B676B34A1B30}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "generator", "generator\generator.csproj", "{DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Debug|x64.ActiveCfg = Debug|x64 - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Debug|x64.Build.0 = Debug|x64 - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Debug|x86.ActiveCfg = Debug|x86 - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Debug|x86.Build.0 = Debug|x86 - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Release|Any CPU.Build.0 = Release|Any CPU - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Release|x64.ActiveCfg = Release|x64 - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Release|x64.Build.0 = Release|x64 - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Release|x86.ActiveCfg = Release|x86 - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3}.Release|x86.Build.0 = Release|x86 - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Debug|x64.ActiveCfg = Debug|x64 - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Debug|x64.Build.0 = Debug|x64 - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Debug|x86.ActiveCfg = Debug|x86 - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Debug|x86.Build.0 = Debug|x86 - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Release|Any CPU.Build.0 = Release|Any CPU - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Release|x64.ActiveCfg = Release|x64 - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Release|x64.Build.0 = Release|x64 - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Release|x86.ActiveCfg = Release|x86 - {717BE881-D74C-45FC-B55D-2085499E1BF8}.Release|x86.Build.0 = Release|x86 - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Debug|x64.ActiveCfg = Debug|x64 - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Debug|x64.Build.0 = Debug|x64 - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Debug|x86.ActiveCfg = Debug|x86 - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Debug|x86.Build.0 = Debug|x86 - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Release|Any CPU.Build.0 = Release|Any CPU - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Release|x64.ActiveCfg = Release|x64 - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Release|x64.Build.0 = Release|x64 - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Release|x86.ActiveCfg = Release|x86 - {4679428B-0CA0-4228-B8C0-B676B34A1B30}.Release|x86.Build.0 = Release|x86 - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Debug|x64.ActiveCfg = Debug|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Debug|x64.Build.0 = Debug|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Debug|x86.ActiveCfg = Debug|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Debug|x86.Build.0 = Debug|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Release|Any CPU.Build.0 = Release|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Release|x64.ActiveCfg = Release|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Release|x64.Build.0 = Release|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Release|x86.ActiveCfg = Release|Any CPU - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {D36E1CC9-62CA-45A3-8BD0-6ADC2767FFB3} = {D28FC441-C95D-47D2-8D5C-E401ABAD7C64} - {717BE881-D74C-45FC-B55D-2085499E1BF8} = {D28FC441-C95D-47D2-8D5C-E401ABAD7C64} - {DCFDBE2E-0540-4A9F-AFB7-4CF1F3854440} = {D28FC441-C95D-47D2-8D5C-E401ABAD7C64} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7E415A9E-6E39-41C7-A400-051ADE582087} - EndGlobalSection -EndGlobal diff --git a/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithCsproj/test/test.csproj b/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithCsproj/test/test.csproj deleted file mode 100644 index 9f52c5381..000000000 --- a/omnisharptest/omnisharpIntegrationTests/testAssets/slnWithCsproj/test/test.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - netcoreapp3.1 - - false - - - - - - - - - diff --git a/omnisharptest/omnisharpIntegrationTests/typeDefinitionProvider.test.ts b/omnisharptest/omnisharpIntegrationTests/typeDefinitionProvider.test.ts index 7ae1aa03b..121a67ad1 100644 --- a/omnisharptest/omnisharpIntegrationTests/typeDefinitionProvider.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/typeDefinitionProvider.test.ts @@ -6,7 +6,7 @@ import * as vscode from 'vscode'; import OmniSharpDefinitionProvider from '../../src/features/definitionProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { expect, should } from 'chai'; import { activateCSharpExtension, diff --git a/omnisharptest/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts index d2a726418..64df57f10 100644 --- a/omnisharptest/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import { expect, should } from 'chai'; import { activateCSharpExtension, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import { IDisposable } from '../../src/disposable'; suite(`Virtual Document Tracking ${testAssetWorkspace.description}`, function () { diff --git a/omnisharptest/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts b/omnisharptest/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts index 6ef129bce..fd14cd18c 100644 --- a/omnisharptest/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts +++ b/omnisharptest/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import { expect, should } from 'chai'; import { activateCSharpExtension, isRazorWorkspace, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; suite(`WorkspaceSymbolProvider: ${testAssetWorkspace.description}`, function () { suiteSetup(async function () { diff --git a/omnisharptest/omnisharpUnitTests/absolutePath.test.ts b/omnisharptest/omnisharpUnitTests/absolutePath.test.ts index ae4126b48..9706a2dc8 100644 --- a/omnisharptest/omnisharpUnitTests/absolutePath.test.ts +++ b/omnisharptest/omnisharpUnitTests/absolutePath.test.ts @@ -3,28 +3,28 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { expect } from 'chai'; +import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import { AbsolutePath } from '../../src/packageManager/absolutePath'; import { TmpAsset, CreateTmpFile } from '../../src/createTmpAsset'; import { join } from 'path'; -suite(AbsolutePath.name, () => { +describe(AbsolutePath.name, () => { let tmpPath: TmpAsset; - setup(async () => { + beforeEach(async () => { tmpPath = await CreateTmpFile(); }); - teardown(() => { + afterEach(() => { tmpPath.dispose(); }); test('Throws error when the passed value is not an absolute path', () => { - expect(() => new AbsolutePath('somePath')).to.throw(Error); + expect(() => new AbsolutePath('somePath')).toThrow(Error); }); test(`${AbsolutePath.getAbsolutePath.name}: Returns an absolute path based by resolving the path with the value to prepend`, () => { const absolutePath = AbsolutePath.getAbsolutePath(tmpPath.name, 'somePath'); - expect(absolutePath.value).to.be.equal(join(tmpPath.name, 'somePath')); + expect(absolutePath.value).toEqual(join(tmpPath.name, 'somePath')); }); }); diff --git a/omnisharptest/omnisharpUnitTests/common.test.ts b/omnisharptest/omnisharpUnitTests/common.test.ts index 2f2684f9d..7a669de93 100644 --- a/omnisharptest/omnisharpUnitTests/common.test.ts +++ b/omnisharptest/omnisharpUnitTests/common.test.ts @@ -3,82 +3,79 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { describe, test, expect } from '@jest/globals'; import * as path from 'path'; import { isSubfolderOf, safeLength, sum } from '../../src/common'; -import { should, expect } from 'chai'; - -suite('Common', () => { - suiteSetup(() => should()); - - suite('safeLength', () => { +describe('Common', () => { + describe('safeLength', () => { test('return 0 for empty array', () => { const array: any[] = []; const result = safeLength(array); - result.should.equal(0); + expect(result).toBe(0); }); test('returns 5 for array of 5 elements', () => { const array = [1, 2, 3, 4, 5]; const result = safeLength(array); - result.should.equal(5); + expect(result).toBe(5); }); test('returns 0 for undefined', () => { const array = undefined; const result = safeLength(array); - result.should.equal(0); + expect(result).toBe(0); }); }); - suite('sum', () => { + describe('sum', () => { test('produce total from numbers', () => { const array = [1, 2, 3, 4, 5]; const result = sum(array, (i) => i); - result.should.equal(15); + expect(result).toBe(15); }); test('produce total from lengths of arrays', () => { const array = [[1, 2], [3], [], [4, 5, 6]]; const result = sum(array, (i) => i.length); - result.should.equal(6); + expect(result).toBe(6); }); test('produce total of true values from array of booleans', () => { const array = [true, false, false, true, true, true, false, true]; const result = sum(array, (b) => (b ? 1 : 0)); - result.should.equal(5); + expect(result).toBe(5); }); }); - suite('isSubfolderOf', () => { + describe('isSubfolderOf', () => { test('same paths', () => { const subfolder: string = ['C:', 'temp', 'VS', 'dotnetProject'].join(path.sep); const folder: string = ['C:', 'temp', 'VS', 'dotnetProject'].join(path.sep); - expect(isSubfolderOf(subfolder, folder)).to.be.true; + expect(isSubfolderOf(subfolder, folder)).toBe(true); }); test('correct subfolder', () => { - const subfolder: string = ['C:', 'temp', 'VS'].join(path.sep); - const folder: string = ['C:', 'temp', 'VS', 'dotnetProject'].join(path.sep); + const folder: string = ['C:', 'temp', 'VS'].join(path.sep); + const subfolder: string = ['C:', 'temp', 'VS', 'dotnetProject'].join(path.sep); - expect(isSubfolderOf(subfolder, folder)).to.be.true; + expect(isSubfolderOf(subfolder, folder)).toBe(true); }); - test('longer subfolder', () => { - const subfolder: string = ['C:', 'temp', 'VS', 'a', 'b', 'c'].join(path.sep); - const folder: string = ['C:', 'temp', 'VS'].join(path.sep); + test('longer folder', () => { + const folder: string = ['C:', 'temp', 'VS', 'a', 'b', 'c'].join(path.sep); + const subfolder: string = ['C:', 'temp', 'VS'].join(path.sep); - expect(isSubfolderOf(subfolder, folder)).to.be.false; + expect(isSubfolderOf(subfolder, folder)).toBe(false); }); test('Different drive', () => { const subfolder: string = ['C:', 'temp', 'VS'].join(path.sep); const folder: string = ['E:', 'temp', 'VS'].join(path.sep); - expect(isSubfolderOf(subfolder, folder)).to.be.false; + expect(isSubfolderOf(subfolder, folder)).toBe(false); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/fakes/fakeOptions.ts b/omnisharptest/omnisharpUnitTests/fakes/fakeOptions.ts deleted file mode 100644 index 0c42a9837..000000000 --- a/omnisharptest/omnisharpUnitTests/fakes/fakeOptions.ts +++ /dev/null @@ -1,76 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { Options } from '../../../src/shared/options'; - -export function getEmptyOptions(): Options { - return new Options( - { - dotnetPath: '', - waitForDebugger: false, - serverPath: '', - useOmnisharpServer: true, - excludePaths: [], - defaultSolution: '', - unitTestDebuggingOptions: {}, - }, - { - useModernNet: false, - monoPath: '', - loggingLevel: '', - autoStart: false, - projectFilesExcludePattern: '', - projectLoadTimeout: 0, - maxProjectResults: 0, - useEditorFormattingSettings: false, - enableRoslynAnalyzers: false, - enableEditorConfigSupport: false, - enableDecompilationSupport: false, - enableImportCompletion: false, - enableAsyncCompletion: false, - analyzeOpenDocumentsOnly: false, - organizeImportsOnFormat: false, - disableMSBuildDiagnosticWarning: false, - showOmnisharpLogOnError: false, - minFindSymbolsFilterLength: 0, - maxFindSymbolsItems: 0, - enableMsBuildLoadProjectsOnDemand: false, - sdkPath: '', - sdkVersion: '', - sdkIncludePrereleases: false, - testRunSettings: '', - dotNetCliPaths: [], - useFormatting: false, - showReferencesCodeLens: false, - showTestsCodeLens: false, - filteredSymbolsCodeLens: [], - disableCodeActions: false, - useSemanticHighlighting: false, - inlayHintsEnableForParameters: false, - inlayHintsForLiteralParameters: false, - inlayHintsForObjectCreationParameters: false, - inlayHintsForIndexerParameters: false, - inlayHintsForOtherParameters: false, - inlayHintsSuppressForParametersThatDifferOnlyBySuffix: false, - inlayHintsSuppressForParametersThatMatchMethodIntent: false, - inlayHintsSuppressForParametersThatMatchArgumentName: false, - inlayHintsEnableForTypes: false, - inlayHintsForImplicitVariableTypes: false, - inlayHintsForLambdaParameterTypes: false, - inlayHintsForImplicitObjectCreation: false, - maxProjectFileCountForDiagnosticAnalysis: 1000, - suppressDotnetRestoreNotification: false, - }, - { - logLevel: '', - documentSelector: ['csharp'], - extensionsPaths: null, - }, - { - razorDevMode: false, - razorPluginPath: '', - } - ); -} diff --git a/omnisharptest/omnisharpUnitTests/features/reportIssue.test.ts b/omnisharptest/omnisharpUnitTests/features/reportIssue.test.ts index 018d979e0..13b730615 100644 --- a/omnisharptest/omnisharpUnitTests/features/reportIssue.test.ts +++ b/omnisharptest/omnisharpUnitTests/features/reportIssue.test.ts @@ -3,21 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as vscode from 'vscode'; import reportIssue from '../../../src/shared/reportIssue'; -import { expect } from 'chai'; -import { vscode } from '../../../src/vscodeAdapter'; -import { Options } from '../../../src/shared/options'; -import { FakeMonoResolver, fakeMonoInfo } from '../fakes/fakeMonoResolver'; -import { FakeDotnetResolver } from '../fakes/fakeDotnetResolver'; +import { FakeMonoResolver, fakeMonoInfo } from '../../omnisharpUnitTests/fakes/fakeMonoResolver'; +import { FakeDotnetResolver } from '../../omnisharpUnitTests/fakes/fakeDotnetResolver'; import { DotnetInfo } from '../../../src/shared/utils/dotnetInfo'; -import { getEmptyOptions } from '../fakes/fakeOptions'; -import { getFakeVsCode } from '../../../test/unitTests/fakes'; +import { jest, describe, test, expect, beforeEach } from '@jest/globals'; -suite(`${reportIssue.name}`, () => { +describe(`${reportIssue.name}`, () => { const vscodeVersion = 'myVersion'; const csharpExtVersion = 'csharpExtVersion'; const isValidForMono = true; - let vscode: vscode; const extension1 = { packageJSON: { name: 'name1', @@ -27,7 +23,7 @@ suite(`${reportIssue.name}`, () => { }, id: 'id1', extensionPath: 'c:/extensions/abc-x64', - }; + } as vscode.Extension; const extension2 = { packageJSON: { @@ -38,7 +34,7 @@ suite(`${reportIssue.name}`, () => { }, id: 'id2', extensionPath: 'c:/extensions/xyz-x64', - }; + } as vscode.Extension; const fakeDotnetInfo: DotnetInfo = { FullInfo: 'myDotnetInfo', @@ -50,119 +46,72 @@ suite(`${reportIssue.name}`, () => { let fakeMonoResolver: FakeMonoResolver; let fakeDotnetResolver: FakeDotnetResolver; const getDotnetInfo = async () => Promise.resolve(fakeDotnetInfo); - let options: Options; let issueBody: string; - setup(() => { - vscode = getFakeVsCode(); - vscode.commands.executeCommand = async (command: string, ...rest: any[]) => { + beforeEach(() => { + jest.spyOn(vscode.workspace, 'getConfiguration').mockReturnValue({ + get: jest.fn((_config: string) => { + return undefined; + }), + has: jest.fn(), + inspect: jest.fn(), + update: jest.fn(), + } as vscode.WorkspaceConfiguration); + + jest.spyOn(vscode.commands, 'executeCommand').mockImplementation(async (command: string, ...rest: any[]) => { issueBody = rest[0].issueBody; - return undefined; - }; + return {} as any; + }); + jest.replaceProperty(vscode, 'extensions', { + all: [extension1, extension2], + getExtension: jest.fn(), + onDidChange: jest.fn(), + } as typeof vscode.extensions); - vscode.version = vscodeVersion; - vscode.extensions.all = [extension1, extension2]; fakeMonoResolver = new FakeMonoResolver(); fakeDotnetResolver = new FakeDotnetResolver(); - options = getEmptyOptions(); }); - suite('The body is passed to the vscode clipboard and', () => { + describe('The body is passed to the vscode clipboard and', () => { test('it contains the vscode version', async () => { - await reportIssue( - vscode, - csharpExtVersion, - getDotnetInfo, - isValidForMono, - options, - fakeDotnetResolver, - fakeMonoResolver - ); - expect(issueBody).to.include(`**VSCode version**: ${vscodeVersion}`); + await reportIssue(csharpExtVersion, getDotnetInfo, isValidForMono, fakeDotnetResolver, fakeMonoResolver); + expect(issueBody).toContain(`**VSCode version**: ${vscodeVersion}`); }); test('it contains the csharp extension version', async () => { - await reportIssue( - vscode, - csharpExtVersion, - getDotnetInfo, - isValidForMono, - options, - fakeDotnetResolver, - fakeMonoResolver - ); - expect(issueBody).to.include(`**C# Extension**: ${csharpExtVersion}`); + await reportIssue(csharpExtVersion, getDotnetInfo, isValidForMono, fakeDotnetResolver, fakeMonoResolver); + expect(issueBody).toContain(`**C# Extension**: ${csharpExtVersion}`); }); test('it contains dotnet info', async () => { - await reportIssue( - vscode, - csharpExtVersion, - getDotnetInfo, - isValidForMono, - options, - fakeDotnetResolver, - fakeMonoResolver - ); - expect(issueBody).to.contain(fakeDotnetInfo.FullInfo); + await reportIssue(csharpExtVersion, getDotnetInfo, isValidForMono, fakeDotnetResolver, fakeMonoResolver); + expect(issueBody).toContain(fakeDotnetInfo.FullInfo); }); test('mono information is obtained when it is a valid mono platform', async () => { - await reportIssue( - vscode, - csharpExtVersion, - getDotnetInfo, - isValidForMono, - options, - fakeDotnetResolver, - fakeMonoResolver - ); - expect(fakeMonoResolver.getMonoCalled).to.be.equal(true); + await reportIssue(csharpExtVersion, getDotnetInfo, isValidForMono, fakeDotnetResolver, fakeMonoResolver); + expect(fakeMonoResolver.getMonoCalled).toEqual(true); }); test('mono version is put in the body when it is a valid mono platform', async () => { - await reportIssue( - vscode, - csharpExtVersion, - getDotnetInfo, - isValidForMono, - options, - fakeDotnetResolver, - fakeMonoResolver - ); - expect(fakeMonoResolver.getMonoCalled).to.be.equal(true); - expect(issueBody).to.contain(fakeMonoInfo.version); + await reportIssue(csharpExtVersion, getDotnetInfo, isValidForMono, fakeDotnetResolver, fakeMonoResolver); + expect(fakeMonoResolver.getMonoCalled).toEqual(true); + expect(issueBody).toContain(fakeMonoInfo.version); }); test('mono information is not obtained when it is not a valid mono platform', async () => { - await reportIssue( - vscode, - csharpExtVersion, - getDotnetInfo, - false, - options, - fakeDotnetResolver, - fakeMonoResolver - ); - expect(fakeMonoResolver.getMonoCalled).to.be.equal(false); + await reportIssue(csharpExtVersion, getDotnetInfo, false, fakeDotnetResolver, fakeMonoResolver); + expect(fakeMonoResolver.getMonoCalled).toEqual(false); }); test('The url contains the name, publisher and version for all the extensions that are not builtin', async () => { - await reportIssue( - vscode, - csharpExtVersion, - getDotnetInfo, - isValidForMono, - options, - fakeDotnetResolver, - fakeMonoResolver - ); - expect(issueBody).to.contain(extension2.packageJSON.name); - expect(issueBody).to.contain(extension2.packageJSON.publisher); - expect(issueBody).to.contain(extension2.packageJSON.version); - expect(issueBody).to.not.contain(extension1.packageJSON.name); - expect(issueBody).to.not.contain(extension1.packageJSON.publisher); - expect(issueBody).to.not.contain(extension1.packageJSON.version); + await reportIssue(csharpExtVersion, getDotnetInfo, isValidForMono, fakeDotnetResolver, fakeMonoResolver); + expect(issueBody).toContain(extension2.packageJSON.name); + expect(issueBody).toContain(extension2.packageJSON.publisher); + expect(issueBody).toContain(extension2.packageJSON.version); + expect(issueBody).not.toContain(extension1.packageJSON.name); + expect(issueBody).not.toContain(extension1.packageJSON.publisher); + expect(issueBody).not.toContain(extension1.packageJSON.version); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/informationMessageObserver.test.ts b/omnisharptest/omnisharpUnitTests/informationMessageObserver.test.ts new file mode 100644 index 000000000..52cbfb91f --- /dev/null +++ b/omnisharptest/omnisharpUnitTests/informationMessageObserver.test.ts @@ -0,0 +1,111 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { jest, describe, test, expect, beforeEach } from '@jest/globals'; +import { InformationMessageObserver } from '../../src/observers/informationMessageObserver'; +import { getUnresolvedDependenices, getWorkspaceConfiguration } from '../../test/unitTests/fakes'; +import { Subject, from as observableFrom } from 'rxjs'; +import { timeout } from 'rxjs/operators'; + +describe('InformationMessageObserver', () => { + let doClickOk: () => void; + let doClickCancel: () => void; + let signalCommandDone: () => void; + let commandDone: Promise | undefined; + const optionObservable = new Subject(); + let infoMessage: string | undefined; + let invokedCommand: string | undefined; + const observer: InformationMessageObserver = new InformationMessageObserver(vscode); + + beforeEach(() => { + infoMessage = undefined; + invokedCommand = undefined; + commandDone = new Promise((resolve) => { + signalCommandDone = () => { + resolve(); + }; + }); + + jest.spyOn(vscode.workspace, 'getConfiguration').mockReturnValue(getWorkspaceConfiguration()); + jest.spyOn(vscode.window, 'showInformationMessage').mockImplementation( + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + //@ts-ignore + async (message: string, ...items: T[]) => { + infoMessage = message; + return new Promise((resolve) => { + doClickCancel = () => { + resolve(undefined); + }; + + doClickOk = () => { + resolve(items[0]); + }; + + return undefined; + }); + } + ); + jest.spyOn(vscode.commands, 'executeCommand').mockImplementation(async (command: string, ..._: any[]) => { + invokedCommand = command; + signalCommandDone(); + return undefined; + }); + }); + + [ + { + event: getUnresolvedDependenices('someFile'), + expectedCommand: 'dotnet.restore.all', + }, + ].forEach((elem) => { + describe(elem.event.constructor.name, () => { + describe('Suppress Dotnet Restore Notification is true', () => { + beforeEach(() => { + vscode.workspace.getConfiguration().update('csharp.suppressDotnetRestoreNotification', true); + optionObservable.next(); + }); + + test('The information message is not shown', () => { + observer.post(elem.event); + expect(infoMessage).toBeUndefined(); + }); + }); + + describe('Suppress Dotnet Restore Notification is false', () => { + beforeEach(() => { + vscode.workspace.getConfiguration().update('csharp.suppressDotnetRestoreNotification', false); + optionObservable.next(); + }); + + test('The information message is shown', async () => { + observer.post(elem.event); + expect(infoMessage?.length).toBeGreaterThan(0); + doClickOk(); + await commandDone; + expect(invokedCommand).toEqual(elem.expectedCommand); + }); + + test('Given an information message if the user clicks Restore, the command is executed', async () => { + observer.post(elem.event); + doClickOk(); + await commandDone; + expect(invokedCommand).toEqual(elem.expectedCommand); + }); + + test('Given an information message if the user clicks cancel, the command is not executed', async () => { + observer.post(elem.event); + doClickCancel(); + await expect(observableFrom(commandDone!).pipe(timeout(1)).toPromise()).rejects.toThrow(); + expect(invokedCommand).toBeUndefined(); + }); + }); + }); + }); + + afterEach(() => { + commandDone = undefined; + }); +}); diff --git a/omnisharptest/omnisharpUnitTests/installRuntimeDependencies.test.ts b/omnisharptest/omnisharpUnitTests/installRuntimeDependencies.test.ts index 853f04053..55409e471 100644 --- a/omnisharptest/omnisharpUnitTests/installRuntimeDependencies.test.ts +++ b/omnisharptest/omnisharpUnitTests/installRuntimeDependencies.test.ts @@ -3,19 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { describe, test, expect, beforeEach } from '@jest/globals'; import { installRuntimeDependencies } from '../../src/installRuntimeDependencies'; import IInstallDependencies from '../../src/packageManager/IInstallDependencies'; import { EventStream } from '../../src/eventStream'; import { PlatformInformation } from '../../src/shared/platform'; -import * as chai from 'chai'; -import TestEventBus from './testAssets/testEventBus'; +import TestEventBus from '../omnisharpUnitTests/testAssets/testEventBus'; import { AbsolutePathPackage } from '../../src/packageManager/absolutePathPackage'; import { Package } from '../../src/packageManager/package'; import { isNotNull } from '../testUtil'; -const expect = chai.expect; - -suite(`${installRuntimeDependencies.name}`, () => { +describe(`${installRuntimeDependencies.name}`, () => { let packageJSON = { runtimeDependencies: [] as Package[], }; @@ -27,14 +25,14 @@ suite(`${installRuntimeDependencies.name}`, () => { const platformInfo = new PlatformInformation('linux', 'architecture1'); const useFramework = true; - setup(() => { + beforeEach(() => { eventStream = new EventStream(); eventBus = new TestEventBus(eventStream); installDependencies = async () => Promise.resolve(true); }); - suite('When all the dependencies already exist', () => { - suiteSetup(() => { + describe('When all the dependencies already exist', () => { + beforeEach(() => { packageJSON = { runtimeDependencies: [], }; @@ -50,7 +48,7 @@ suite(`${installRuntimeDependencies.name}`, () => { useFramework, ['Debugger', 'Omnisharp', 'Razor'] ); - expect(installed).to.be.true; + expect(installed).toBe(true); }); test("Doesn't log anything to the eventStream", async () => { @@ -67,11 +65,11 @@ suite(`${installRuntimeDependencies.name}`, () => { useFramework, ['Debugger', 'Omnisharp', 'Razor'] ); - expect(eventBus.getEvents()).to.be.empty; + expect(eventBus.getEvents()).toHaveLength(0); }); }); - suite('When there is a dependency to install', () => { + describe('When there is a dependency to install', () => { const packageToInstall: Package = { id: 'myPackage', description: 'somePackage', @@ -82,7 +80,7 @@ suite(`${installRuntimeDependencies.name}`, () => { architectures: [platformInfo.architecture], }; - setup(() => { + beforeEach(() => { packageJSON = { runtimeDependencies: [packageToInstall], }; @@ -104,10 +102,10 @@ suite(`${installRuntimeDependencies.name}`, () => { useFramework, ['myPackage'] ); - expect(installed).to.be.true; + expect(installed).toBe(true); isNotNull(inputPackage!); - expect(inputPackage).to.have.length(1); - expect(inputPackage[0]).to.be.deep.equal( + expect(inputPackage).toHaveLength(1); + expect(inputPackage[0]).toStrictEqual( AbsolutePathPackage.getAbsolutePathPackage(packageToInstall, extensionPath) ); }); @@ -123,7 +121,7 @@ suite(`${installRuntimeDependencies.name}`, () => { useFramework, ['myPackage'] ); - expect(installed).to.be.false; + expect(installed).toBe(false); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/jest.config.ts b/omnisharptest/omnisharpUnitTests/jest.config.ts new file mode 100644 index 000000000..b913f9a25 --- /dev/null +++ b/omnisharptest/omnisharpUnitTests/jest.config.ts @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import type { Config } from 'jest'; +import { baseProjectConfig } from '../../baseJestConfig'; + +export const jestOmniSharpUnitTestProjectName = 'OmniSharp Unit Tests'; + +/** + * Defines a jest project configuration for O# jest tests. + */ +const omnisharpConfig: Config = { + ...baseProjectConfig, + displayName: jestOmniSharpUnitTestProjectName, + // We need to explicity ignore the out directory for modules - otherwise we'll get duplicate vscode module, + // the TS version from the __mocks__ directory and the compiled js version from the out directory. + modulePathIgnorePatterns: ['out'], + // Specify jest to only run tests in jest folders. + // We also have to include the __mocks__ folder. That folder must be next to node_modules so we can't move it, + // but if we specify roots, jest won't automatically pick it up. So we have to specify it here. + roots: ['', '/../../__mocks__'], +}; + +export default omnisharpConfig; diff --git a/omnisharptest/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts index 4927a47aa..a30c7c0ab 100644 --- a/omnisharptest/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts @@ -3,15 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { expect, should } from 'chai'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { StatusBarItem } from '../../../src/vscodeAdapter'; import { OmnisharpBackgroundDiagnosticStatus } from '../../../src/omnisharp/loggingEvents'; import { BackgroundWorkStatusBarObserver } from '../../../src/observers/backgroundWorkStatusBarObserver'; import { BackgroundDiagnosticStatus } from '../../../src/omnisharp/protocol'; -suite('BackgroundWorkStatusBarObserver', () => { - suiteSetup(() => should()); - +describe('BackgroundWorkStatusBarObserver', () => { let showCalled: boolean; let hideCalled: boolean; const statusBarItem = { @@ -24,7 +22,7 @@ suite('BackgroundWorkStatusBarObserver', () => { }; const observer = new BackgroundWorkStatusBarObserver(statusBarItem); - setup(() => { + beforeEach(() => { showCalled = false; hideCalled = false; }); @@ -37,9 +35,9 @@ suite('BackgroundWorkStatusBarObserver', () => { NumberProjects: 0, }); observer.post(event); - expect(hideCalled).to.be.false; - expect(showCalled).to.be.true; - expect(statusBarItem.text).to.contain('Analyzing'); + expect(hideCalled).toBe(false); + expect(showCalled).toBe(true); + expect(statusBarItem.text).toContain('Analyzing'); }); test('OmnisharpBackgroundDiagnosticStatus.Ready: Hide processing message', () => { @@ -50,8 +48,8 @@ suite('BackgroundWorkStatusBarObserver', () => { NumberProjects: 0, }); observer.post(event); - expect(hideCalled).to.be.true; - expect(showCalled).to.be.false; - expect(statusBarItem.text).to.be.equal(''); + expect(hideCalled).toBe(true); + expect(showCalled).toBe(false); + expect(statusBarItem.text).toEqual(''); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/csharpChannelObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/csharpChannelObserver.test.ts index aafae2126..5c8291098 100644 --- a/omnisharptest/omnisharpUnitTests/logging/csharpChannelObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/csharpChannelObserver.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { should, expect } from 'chai'; +import { describe, test, expect } from '@jest/globals'; import { getNullChannel } from '../../../test/unitTests/fakes'; import { CsharpChannelObserver } from '../../../src/shared/observers/csharpChannelObserver'; import { @@ -16,8 +16,7 @@ import { IntegrityCheckFailure, } from '../../../src/omnisharp/loggingEvents'; -suite('CsharpChannelObserver', () => { - suiteSetup(() => should()); +describe('CsharpChannelObserver', () => { [ new InstallationFailure('someStage', 'someError'), new DebuggerNotInstalledFailure(), @@ -38,8 +37,8 @@ suite('CsharpChannelObserver', () => { }); observer.post(event); - expect(hasShown).to.be.true; - expect(preserveFocus).to.be.true; + expect(hasShown).toBe(true); + expect(preserveFocus).toBe(true); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/csharpLoggerObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/csharpLoggerObserver.test.ts index 87af2f3ad..b09c42649 100644 --- a/omnisharptest/omnisharpUnitTests/logging/csharpLoggerObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/csharpLoggerObserver.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { should, expect } from 'chai'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { getNullChannel } from '../../../test/unitTests/fakes'; import { CsharpLoggerObserver } from '../../../src/shared/observers/csharpLoggerObserver'; import { PlatformInformation } from '../../../src/shared/platform'; @@ -11,9 +11,7 @@ import * as Event from '../../../src/omnisharp/loggingEvents'; import { PackageError } from '../../../src/packageManager/packageError'; import { Package } from '../../../src/packageManager/package'; -suite('CsharpLoggerObserver', () => { - suiteSetup(() => should()); - +describe('CsharpLoggerObserver', () => { let logOutput = ''; const observer = new CsharpLoggerObserver({ ...getNullChannel(), @@ -29,30 +27,30 @@ suite('CsharpLoggerObserver', () => { architectures: [], }; - setup(() => { + beforeEach(() => { logOutput = ''; }); test('PlatformInfo: Logs contain the Platform and Architecture', () => { const event = new Event.LogPlatformInfo(new PlatformInformation('linux', 'MyArchitecture')); observer.post(event); - expect(logOutput).to.contain('linux'); - expect(logOutput).to.contain('MyArchitecture'); + expect(logOutput).toContain('linux'); + expect(logOutput).toContain('MyArchitecture'); }); - suite('InstallationFailure', () => { + describe('InstallationFailure', () => { test('Stage and Error is logged if not a PackageError', () => { const event = new Event.InstallationFailure('someStage', new Error('someError')); observer.post(event); - expect(logOutput).to.contain(event.stage); - expect(logOutput).to.contain(event.error.toString()); + expect(logOutput).toContain(event.stage); + expect(logOutput).toContain(event.error.toString()); }); test('Stage and Error is logged if a PackageError without inner error', () => { const event = new Event.InstallationFailure('someStage', new PackageError('someError', pkg, undefined)); observer.post(event); - expect(logOutput).to.contain(event.stage); - expect(logOutput).to.contain(event.error.message); + expect(logOutput).toContain(event.stage); + expect(logOutput).toContain(event.error.message); }); test('Stage and Inner error is logged if a PackageError without inner error', () => { @@ -61,12 +59,12 @@ suite('CsharpLoggerObserver', () => { new PackageError('someError', pkg, new Error('innerError')) ); observer.post(event); - expect(logOutput).to.contain(event.stage); - expect(logOutput).to.contain(event.error.innerError.toString()); + expect(logOutput).toContain(event.stage); + expect(logOutput).toContain(event.error.innerError.toString()); }); }); - suite('Download', () => { + describe('Download', () => { const packageName = 'somePackage'; [ { @@ -155,7 +153,7 @@ suite('CsharpLoggerObserver', () => { }); element.events.forEach((message: Event.BaseEvent) => observer.post(message)); - expect(logOutput).to.be.equal(element.expected); + expect(logOutput).toEqual(element.expected); }); }); }); @@ -172,44 +170,44 @@ suite('CsharpLoggerObserver', () => { ].forEach((element) => test(`${element.message.constructor.name} is shown`, () => { observer.post(element.message); - expect(logOutput).to.contain(element.expected); + expect(logOutput).toContain(element.expected); }) ); test(`ActivationFailure: Some message is logged`, () => { const event = new Event.ActivationFailure(); observer.post(event); - expect(logOutput).to.not.be.empty; + expect(logOutput).toBeTruthy(); }); test(`ProjectJsonDeprecatedWarning: Some message is logged`, () => { const event = new Event.ProjectJsonDeprecatedWarning(); observer.post(event); - expect(logOutput).to.not.be.empty; + expect(logOutput).toBeTruthy(); }); test(`InstallationSuccess: Some message is logged`, () => { const event = new Event.InstallationSuccess(); observer.post(event); - expect(logOutput).to.not.be.empty; + expect(logOutput).toBeTruthy(); }); test(`InstallationProgress: Progress message is logged`, () => { const event = new Event.InstallationStart('somPackage'); observer.post(event); - expect(logOutput).to.contain(event.packageDescription); + expect(logOutput).toContain(event.packageDescription); }); test('PackageInstallation: Package name is logged', () => { const event = new Event.PackageInstallation('somePackage'); observer.post(event); - expect(logOutput).to.contain(event.packageInfo); + expect(logOutput).toContain(event.packageInfo); }); test('DownloadFallBack: The fallbackurl is logged', () => { const event = new Event.DownloadFallBack('somrurl'); observer.post(event); - expect(logOutput).to.contain(event.fallbackUrl); + expect(logOutput).toContain(event.fallbackUrl); }); test(`${Event.IntegrityCheckFailure.name}: Package Description is logged when we are retrying`, () => { @@ -217,7 +215,7 @@ suite('CsharpLoggerObserver', () => { const url = 'someUrl'; const event = new Event.IntegrityCheckFailure(description, url, true); observer.post(event); - expect(logOutput).to.contain(description); + expect(logOutput).toContain(description); }); test(`${Event.IntegrityCheckFailure.name}: Package Description and url are logged when we are not retrying`, () => { @@ -225,13 +223,13 @@ suite('CsharpLoggerObserver', () => { const url = 'someUrl'; const event = new Event.IntegrityCheckFailure(description, url, false); observer.post(event); - expect(logOutput).to.contain(description); - expect(logOutput).to.contain(url); + expect(logOutput).toContain(description); + expect(logOutput).toContain(url); }); test(`${Event.IntegrityCheckSuccess.name}: Some message is logged`, () => { const event = new Event.IntegrityCheckSuccess(); observer.post(event); - expect(logOutput).to.not.be.empty; + expect(logOutput).toBeTruthy(); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts index 17fb26210..88b7b569d 100644 --- a/omnisharptest/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts @@ -3,13 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { should, expect } from 'chai'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { DotNetChannelObserver } from '../../../src/observers/dotnetChannelObserver'; import { getNullChannel } from '../../../test/unitTests/fakes'; import { CommandDotNetRestoreStart } from '../../../src/omnisharp/loggingEvents'; -suite('DotnetChannelObserver', () => { - suiteSetup(() => should()); +describe('DotnetChannelObserver', () => { let hasShown: boolean; let hasCleared: boolean; @@ -23,7 +22,7 @@ suite('DotnetChannelObserver', () => { }, }); - setup(() => { + beforeEach(() => { hasShown = false; hasCleared = false; }); @@ -31,7 +30,7 @@ suite('DotnetChannelObserver', () => { test(`CommandDotNetRestoreStart : Clears and shows the channel`, () => { const event = new CommandDotNetRestoreStart(); observer.post(event); - expect(hasCleared).to.be.true; - expect(hasShown).to.be.true; + expect(hasCleared).toBe(true); + expect(hasShown).toBe(true); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts index 03f2a7b42..529c9d1f1 100644 --- a/omnisharptest/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { should, expect } from 'chai'; +import { describe, test, expect } from '@jest/globals'; import { getNullChannel } from '../../../test/unitTests/fakes'; import { DotnetLoggerObserver } from '../../../src/observers/dotnetLoggerObserver'; import { @@ -13,9 +13,7 @@ import { EventWithMessage, } from '../../../src/omnisharp/loggingEvents'; -suite('DotnetLoggerObserver', () => { - suiteSetup(() => should()); - +describe('DotnetLoggerObserver', () => { [ new CommandDotNetRestoreProgress('Some message'), new CommandDotNetRestoreSucceeded('Some message'), @@ -31,7 +29,7 @@ suite('DotnetLoggerObserver', () => { }); observer.post(event); - expect(appendedMessage).to.contain(event.message); + expect(appendedMessage).toContain(event.message); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts index 5e510d067..ed0a47348 100644 --- a/omnisharptest/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { expect } from 'chai'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { getNullChannel } from '../../../test/unitTests/fakes'; import { BaseEvent, @@ -15,7 +15,7 @@ import { } from '../../../src/omnisharp/loggingEvents'; import DotnetTestChannelObserver from '../../../src/observers/dotnetTestChannelObserver'; -suite('DotnetTestChannelObserver', () => { +describe('DotnetTestChannelObserver', () => { let hasShown: boolean; let preserveFocus: boolean; @@ -27,7 +27,7 @@ suite('DotnetTestChannelObserver', () => { }, }); - setup(() => { + beforeEach(() => { hasShown = false; }); @@ -39,10 +39,10 @@ suite('DotnetTestChannelObserver', () => { new DotNetTestsInClassDebugStart('someclass'), ].forEach((event: BaseEvent) => { test(`${event.constructor.name}: Channel is shown and preserve focus is set to true`, () => { - expect(hasShown).to.be.false; + expect(hasShown).toBe(false); observer.post(event); - expect(hasShown).to.be.true; - expect(preserveFocus).to.be.true; + expect(hasShown).toBe(true); + expect(preserveFocus).toBe(true); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts index 81b9d2432..a5b74ae40 100644 --- a/omnisharptest/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts @@ -3,8 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as chai from 'chai'; -import * as chaiString from 'chai-string'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { getNullChannel } from '../../../test/unitTests/fakes'; import { EventWithMessage, @@ -24,10 +23,7 @@ import { import DotNetTestLoggerObserver from '../../../src/observers/dotnetTestLoggerObserver'; import * as protocol from '../../../src/omnisharp/protocol'; -const expect = chai.expect; -chai.use(chaiString); - -suite(`${DotNetTestLoggerObserver.name}`, () => { +describe(`${DotNetTestLoggerObserver.name}`, () => { let appendedMessage: string; const observer = new DotNetTestLoggerObserver({ ...getNullChannel(), @@ -36,7 +32,7 @@ suite(`${DotNetTestLoggerObserver.name}`, () => { }, }); - setup(() => { + beforeEach(() => { appendedMessage = ''; }); @@ -44,33 +40,35 @@ suite(`${DotNetTestLoggerObserver.name}`, () => { (event: EventWithMessage) => { test(`${event.constructor.name}: Message is logged`, () => { observer.post(event); - expect(appendedMessage).to.contain(event.message); + expect(appendedMessage).toContain(event.message); }); } ); [new DotNetTestDebugStart('foo'), new DotNetTestRunStart('foo')].forEach((event: BaseEvent) => { test(`${event.constructor.name}: Test method is logged`, () => { - expect(appendedMessage).to.be.empty; + expect(appendedMessage).toBeFalsy(); observer.post(event); - expect(appendedMessage).to.contain('foo'); + expect(appendedMessage).toContain('foo'); }); }); [new DotNetTestsInClassDebugStart('foo'), new DotNetTestsInClassRunStart('foo')].forEach((event: BaseEvent) => { test(`${event.constructor.name}: Class name is logged`, () => { - expect(appendedMessage).to.be.empty; + expect(appendedMessage).toBeFalsy(); observer.post(event); - expect(appendedMessage).to.contain('foo'); + expect(appendedMessage).toContain('foo'); }); }); [new DotNetTestRunInContextStart('foo', 1, 2), new DotNetTestDebugInContextStart('foo', 1, 2)].forEach( (event: BaseEvent) => { test(`${event.constructor.name}: File name and line/column are logged`, () => { - expect(appendedMessage).to.be.empty; + expect(appendedMessage).toBeFalsy; observer.post(event); - expect(appendedMessage).to.contain('foo').and.contain('2').and.contain('3'); + expect(appendedMessage).toContain('foo'); + expect(appendedMessage).toContain('2'); + expect(appendedMessage).toContain('3'); }); } ); @@ -78,16 +76,16 @@ suite(`${DotNetTestLoggerObserver.name}`, () => { test(`${DotNetTestDebugProcessStart.name}: Target process id is logged`, () => { const event = new DotNetTestDebugProcessStart(111); observer.post(event); - expect(appendedMessage).to.contain(event.targetProcessId); + expect(appendedMessage).toContain(event.targetProcessId.toString()); }); test(`${DotNetTestDebugComplete.name}: Message is logged`, () => { const event = new DotNetTestDebugComplete(); observer.post(event); - expect(appendedMessage).to.not.be.empty; + expect(appendedMessage).toBeTruthy(); }); - suite(`${ReportDotNetTestResults.name}`, () => { + describe(`${ReportDotNetTestResults.name}`, () => { const event = new ReportDotNetTestResults([ getDotNetTestResults( 'foo', @@ -105,21 +103,23 @@ suite(`${DotNetTestLoggerObserver.name}`, () => { test(`Displays the outcome of each test`, () => { observer.post(event); event.results!.forEach((result) => { - expect(appendedMessage).to.containIgnoreCase(`${result.MethodName}:\n Outcome: ${result.Outcome}`); + expect(appendedMessage.toUpperCase()).toContain( + `${result.MethodName}:\n Outcome: ${result.Outcome}`.toUpperCase() + ); }); }); test(`Displays the total outcome`, () => { observer.post(event); - expect(appendedMessage).to.contain(`Total tests: 4. Passed: 1. Failed: 2. Skipped: 1`); + expect(appendedMessage).toContain(`Total tests: 4. Passed: 1. Failed: 2. Skipped: 1`); }); test('Displays the error message and error stack trace if any is present', () => { observer.post(event); - expect(appendedMessage).to.contain( + expect(appendedMessage).toContain( 'foo:\n Outcome: Failed\n Error Message:\n assertion failed\n Stack Trace:\n stacktrace1' ); - expect(appendedMessage).to.contain( + expect(appendedMessage).toContain( 'failinator:\n Outcome: Failed\n Error Message:\n error occurred\n Stack Trace:\n stacktrace2' ); }); @@ -127,20 +127,20 @@ suite(`${DotNetTestLoggerObserver.name}`, () => { test(`Displays the standard output messages if any`, () => { observer.post(event); event.results!.forEach((result) => { - result.StandardOutput.forEach((message) => expect(appendedMessage).to.contain(message)); + result.StandardOutput.forEach((message) => expect(appendedMessage).toContain(message)); }); }); test(`Displays the standard error messages if any`, () => { observer.post(event); event.results!.forEach((result) => { - result.StandardError.forEach((message) => expect(appendedMessage).to.contain(message)); + result.StandardError.forEach((message) => expect(appendedMessage).toContain(message)); }); }); test(`Can handle malformed results`, () => { observer.post(new ReportDotNetTestResults([])); - expect(appendedMessage).to.contain( + expect(appendedMessage).toContain( '----- Test Execution Summary -----\n\nTotal tests: 0. Passed: 0. Failed: 0. Skipped: 0' ); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/errorMessageObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/errorMessageObserver.test.ts index f1bcd1c0e..be5566621 100644 --- a/omnisharptest/omnisharpUnitTests/logging/errorMessageObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/errorMessageObserver.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { expect, should } from 'chai'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { vscode } from '../../../src/vscodeAdapter'; import { ErrorMessageObserver } from '../../../src/observers/errorMessageObserver'; @@ -16,9 +16,7 @@ import { } from '../../../src/omnisharp/loggingEvents'; import { getFakeVsCode } from '../../../test/unitTests/fakes'; -suite('ErrorMessageObserver', () => { - suiteSetup(() => should()); - +describe('ErrorMessageObserver', () => { const vscode: vscode = getFakeVsCode(); let errorMessage: string | undefined; const observer = new ErrorMessageObserver(vscode); @@ -28,7 +26,7 @@ suite('ErrorMessageObserver', () => { return Promise.resolve('Done'); }; - setup(() => { + beforeEach(() => { errorMessage = undefined; }); @@ -39,18 +37,18 @@ suite('ErrorMessageObserver', () => { ].forEach((event: EventWithMessage) => { test(`${event.constructor.name}: Error message is shown`, () => { observer.post(event); - expect(errorMessage).to.be.contain(event.message); + expect(errorMessage).toContain(event.message); }); }); - suite(`${IntegrityCheckFailure.name}`, () => { + describe(`${IntegrityCheckFailure.name}`, () => { test('Package Description and url are logged when we are not retrying', () => { const description = 'someDescription'; const url = 'someUrl'; const event = new IntegrityCheckFailure(description, url, false); observer.post(event); - expect(errorMessage).to.contain(description); - expect(errorMessage).to.contain(url); + expect(errorMessage).toContain(description); + expect(errorMessage).toContain(url); }); test('Nothing is shown if we are retrying', () => { @@ -58,7 +56,7 @@ suite('ErrorMessageObserver', () => { const url = 'someUrl'; const event = new IntegrityCheckFailure(description, url, true); observer.post(event); - expect(errorMessage).to.be.undefined; + expect(errorMessage).toBe(undefined); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/informationMessageObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/informationMessageObserver.test.ts deleted file mode 100644 index 76f9f45b5..000000000 --- a/omnisharptest/omnisharpUnitTests/logging/informationMessageObserver.test.ts +++ /dev/null @@ -1,115 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { InformationMessageObserver } from '../../../src/observers/informationMessageObserver'; -import OptionProvider from '../../../src/shared/observers/optionProvider'; -import { expect, should } from 'chai'; -import { getUnresolvedDependenices, updateConfig, getVSCodeWithConfig } from '../../../test/unitTests/fakes'; -import { Subject, from as observableFrom } from 'rxjs'; -import { timeout } from 'rxjs/operators'; -import { Options } from '../../../src/shared/options'; - -suite('InformationMessageObserver', () => { - suiteSetup(() => should()); - - let doClickOk: () => void; - let doClickCancel: () => void; - let signalCommandDone: () => void; - let commandDone: Promise | undefined; - const vscode = getVsCode(); - const optionObservable = new Subject(); - const optionProvider = new OptionProvider(optionObservable); - let infoMessage: string | undefined; - let invokedCommand: string | undefined; - const observer: InformationMessageObserver = new InformationMessageObserver(vscode, optionProvider); - - setup(() => { - infoMessage = undefined; - invokedCommand = undefined; - commandDone = new Promise((resolve) => { - signalCommandDone = () => { - resolve(); - }; - }); - }); - - [ - { - event: getUnresolvedDependenices('someFile'), - expectedCommand: 'dotnet.restore.all', - }, - ].forEach((elem) => { - suite(elem.event.constructor.name, () => { - suite('Suppress Dotnet Restore Notification is true', () => { - setup(() => { - updateConfig(vscode, 'csharp', 'suppressDotnetRestoreNotification', true); - optionObservable.next(Options.Read(vscode)); - }); - - test('The information message is not shown', () => { - observer.post(elem.event); - expect(infoMessage).to.be.undefined; - }); - }); - - suite('Suppress Dotnet Restore Notification is false', () => { - setup(() => { - updateConfig(vscode, 'csharp', 'suppressDotnetRestoreNotification', false); - optionObservable.next(Options.Read(vscode)); - }); - - test('The information message is shown', async () => { - observer.post(elem.event); - expect(infoMessage).to.not.be.empty; - doClickOk(); - await commandDone; - expect(invokedCommand).to.be.equal(elem.expectedCommand); - }); - - test('Given an information message if the user clicks Restore, the command is executed', async () => { - observer.post(elem.event); - doClickOk(); - await commandDone; - expect(invokedCommand).to.be.equal(elem.expectedCommand); - }); - - test('Given an information message if the user clicks cancel, the command is not executed', async () => { - observer.post(elem.event); - doClickCancel(); - await expect(observableFrom(commandDone!).pipe(timeout(1)).toPromise()).to.be.rejected; - expect(invokedCommand).to.be.undefined; - }); - }); - }); - }); - - teardown(() => { - commandDone = undefined; - }); - - function getVsCode() { - const vscode = getVSCodeWithConfig(); - vscode.window.showInformationMessage = async (message: string, ...items: T[]) => { - infoMessage = message; - return new Promise((resolve) => { - doClickCancel = () => { - resolve(undefined); - }; - - doClickOk = () => { - resolve(items[0]); - }; - }); - }; - - vscode.commands.executeCommand = async (command: string, ..._: any[]) => { - invokedCommand = command; - signalCommandDone(); - return undefined; - }; - - return vscode; - } -}); diff --git a/omnisharptest/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts index c09f615b7..3a88349ca 100644 --- a/omnisharptest/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts @@ -2,9 +2,10 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { expect } from 'chai'; -import { vscode } from '../../../src/vscodeAdapter'; -import { getNullChannel, updateConfig, getVSCodeWithConfig } from '../../../test/unitTests/fakes'; + +import * as vscode from 'vscode'; +import { jest, describe, test, expect, beforeEach } from '@jest/globals'; +import { getNullChannel, getWorkspaceConfiguration } from '../../../test/unitTests/fakes'; import { OmnisharpChannelObserver } from '../../../src/observers/omnisharpChannelObserver'; import { OmnisharpFailure, @@ -13,40 +14,34 @@ import { OmnisharpRestart, OmnisharpServerOnStdErr, } from '../../../src/omnisharp/loggingEvents'; -import OptionProvider from '../../../src/shared/observers/optionProvider'; import { Subject } from 'rxjs'; -import { Options } from '../../../src/shared/options'; -suite('OmnisharpChannelObserver', () => { +describe('OmnisharpChannelObserver', () => { let hasShown: boolean; let hasCleared: boolean; let preserveFocus: boolean | undefined; - let vscode: vscode; - const optionObservable = new Subject(); - const optionProvider = new OptionProvider(optionObservable); + const optionObservable = new Subject(); let observer: OmnisharpChannelObserver; - setup(() => { + beforeEach(() => { hasShown = false; hasCleared = false; preserveFocus = false; - vscode = getVSCodeWithConfig(); - observer = new OmnisharpChannelObserver( - { - ...getNullChannel(), - show: (preserve) => { - hasShown = true; - preserveFocus = preserve; - }, - clear: () => { - hasCleared = true; - }, + observer = new OmnisharpChannelObserver({ + ...getNullChannel(), + show: (preserve) => { + hasShown = true; + preserveFocus = preserve; + }, + clear: () => { + hasCleared = true; }, - optionProvider - ); + }); + + jest.spyOn(vscode.workspace, 'getConfiguration').mockReturnValue(getWorkspaceConfiguration()); - updateConfig(vscode, 'csharp', 'showOmnisharpLogOnError', true); - optionObservable.next(Options.Read(vscode)); + vscode.workspace.getConfiguration().update('csharp.showOmnisharpLogOnError', true); + optionObservable.next(); }); [ @@ -55,28 +50,28 @@ suite('OmnisharpChannelObserver', () => { new OmnisharpServerOnStdErr('std err'), ].forEach((event: BaseEvent) => { test(`${event.constructor.name}: Channel is shown and preserveFocus is set to true`, () => { - expect(hasShown).to.be.false; + expect(hasShown).toEqual(false); observer.post(event); - expect(hasShown).to.be.true; - expect(preserveFocus).to.be.true; + expect(hasShown).toEqual(true); + expect(preserveFocus).toEqual(true); }); }); test(`OmnisharpServerOnStdErr: Channel is not shown when disabled in configuration`, () => { - updateConfig(vscode, 'csharp', 'showOmnisharpLogOnError', false); - optionObservable.next(Options.Read(vscode)); + vscode.workspace.getConfiguration().update('csharp.showOmnisharpLogOnError', false); + optionObservable.next(); - expect(hasShown).to.be.false; + expect(hasShown).toEqual(false); observer.post(new OmnisharpServerOnStdErr('std err')); - expect(hasShown).to.be.false; - expect(preserveFocus).to.be.false; + expect(hasShown).toEqual(false); + expect(preserveFocus).toEqual(false); }); [new OmnisharpRestart()].forEach((event: BaseEvent) => { test(`${event.constructor.name}: Channel is cleared`, () => { - expect(hasCleared).to.be.false; + expect(hasCleared).toEqual(false); observer.post(event); - expect(hasCleared).to.be.true; + expect(hasCleared).toEqual(true); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts index de2c5d5fe..c5e3fee7d 100644 --- a/omnisharptest/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts @@ -2,8 +2,7 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { use, should, expect } from 'chai'; -import * as chaiString from 'chai-string'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { getNullChannel } from '../../../test/unitTests/fakes'; import { OmnisharpServerVerboseMessage, @@ -18,10 +17,7 @@ import { } from '../../../src/omnisharp/loggingEvents'; import { OmnisharpDebugModeLoggerObserver } from '../../../src/observers/omnisharpDebugModeLoggerObserver'; -use(chaiString); - -suite('OmnisharpDebugModeLoggerObserver', () => { - suiteSetup(() => should()); +describe('OmnisharpDebugModeLoggerObserver', () => { let logOutput = ''; const observer = new OmnisharpDebugModeLoggerObserver({ ...getNullChannel(), @@ -30,45 +26,45 @@ suite('OmnisharpDebugModeLoggerObserver', () => { }, }); - setup(() => { + beforeEach(() => { logOutput = ''; }); [new OmnisharpServerVerboseMessage('server verbose message')].forEach((event: EventWithMessage) => { test(`${event.constructor.name}: Message is logged`, () => { observer.post(event); - expect(logOutput).to.contain(event.message); + expect(logOutput).toContain(event.message); }); }); test(`OmnisharpServerEnqueueRequest: Name and Command is logged`, () => { const event = new OmnisharpServerEnqueueRequest('foo', 'someCommand'); observer.post(event); - expect(logOutput).to.contain(event.queueName); - expect(logOutput).to.contain(event.command); + expect(logOutput).toContain(event.queueName); + expect(logOutput).toContain(event.command); }); test(`OmnisharpServerDequeueRequest: QueueName, QueueStatus, Command and Id is logged`, () => { const event = new OmnisharpServerDequeueRequest('foo', 'pending', 'someCommand', 1); observer.post(event); - expect(logOutput).to.contain(event.queueName); - expect(logOutput).to.contain(event.queueStatus); - expect(logOutput).to.contain(event.command); - expect(logOutput).to.contain(event.id); + expect(logOutput).toContain(event.queueName); + expect(logOutput).toContain(event.queueStatus); + expect(logOutput).toContain(event.command); + expect(logOutput).toContain(event.id?.toString()); }); test(`OmnisharpProcessRequestStart: Name and slots is logged`, () => { const event = new OmnisharpServerProcessRequestStart('foobar', 2); observer.post(event); - expect(logOutput).to.contain(event.name); - expect(logOutput).to.contain(event.availableRequestSlots); + expect(logOutput).toContain(event.name); + expect(logOutput).toContain(event.availableRequestSlots.toString()); }); test(`OmnisharpServerRequestCancelled: Name and Id is logged`, () => { const event = new OmnisharpServerRequestCancelled('foobar', 23); observer.post(event); - expect(logOutput).to.contain(event.command); - expect(logOutput).to.contain(event.id); + expect(logOutput).toContain(event.command); + expect(logOutput).toContain(event.id?.toString()); }); test(`OmnisharpServer messages increase and decrease indent`, () => { @@ -78,12 +74,12 @@ suite('OmnisharpDebugModeLoggerObserver', () => { observer.post(new OmnisharpServerProcessRequestComplete()); observer.post(new OmnisharpServerVerboseMessage('!indented_2')); - expect(logOutput).to.startWith(' !indented_1'); - expect(logOutput).to.contain('\n indented'); - expect(logOutput).to.contain('\n !indented_2'); + expect(logOutput.startsWith(' !indented_1')).toBe(true); + expect(logOutput).toContain('\n indented'); + expect(logOutput).toContain('\n !indented_2'); }); - suite('OmnisharpEventPacketReceived', () => { + describe('OmnisharpEventPacketReceived', () => { test(`Information messages with name OmniSharp.Middleware.LoggingMiddleware and follow pattern /^/[/w]+: 200 d+ms/ are logged`, () => { const event = new OmnisharpEventPacketReceived( 'INFORMATION', @@ -91,8 +87,8 @@ suite('OmnisharpDebugModeLoggerObserver', () => { '/codecheck: 200 339ms' ); observer.post(event); - expect(logOutput).to.contain(event.message); - expect(logOutput).to.contain(event.name); + expect(logOutput).toContain(event.message); + expect(logOutput).toContain(event.name); }); [ @@ -105,12 +101,12 @@ suite('OmnisharpDebugModeLoggerObserver', () => { ].forEach((event: OmnisharpEventPacketReceived) => { test(`${event.logLevel} messages are not logged`, () => { observer.post(event); - expect(logOutput).to.be.empty; + expect(logOutput).toBeFalsy(); }); }); }); - suite('OmnisharpRequestMessage', () => { + describe('OmnisharpRequestMessage', () => { test(`Request Command and Id is logged`, () => { const event = new OmnisharpRequestMessage( { @@ -125,8 +121,8 @@ suite('OmnisharpDebugModeLoggerObserver', () => { 1 ); observer.post(event); - expect(logOutput).to.contain(event.id); - expect(logOutput).to.contain(event.request.command); + expect(logOutput).toContain(event.id?.toString()); + expect(logOutput).toContain(event.request.command); }); test(`Request Data is logged when it is not empty`, () => { @@ -144,7 +140,7 @@ suite('OmnisharpDebugModeLoggerObserver', () => { 1 ); observer.post(event); - expect(logOutput).to.contain(event.request.data); + expect(logOutput).toContain(event.request.data); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts index a27282258..2945d9d84 100644 --- a/omnisharptest/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts @@ -2,8 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { should, expect } from 'chai'; import { getNullChannel } from '../../../test/unitTests/fakes'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { OmnisharpLoggerObserver } from '../../../src/observers/omnisharpLoggerObserver'; import { OmnisharpServerMsBuildProjectDiagnostics, @@ -20,9 +20,7 @@ import { import { OutputChannel } from 'vscode'; import { PlatformInformation } from '../../../src/shared/platform'; -suite('OmnisharpLoggerObserver', () => { - suiteSetup(() => should()); - +describe('OmnisharpLoggerObserver', () => { let logOutput = ''; const channel = { ...getNullChannel(), @@ -35,11 +33,11 @@ suite('OmnisharpLoggerObserver', () => { platform: 'TestOS', }); - setup(() => { + beforeEach(() => { logOutput = ''; }); - suite('OmnisharpServerMsBuildProjectDiagnostics', () => { + describe('OmnisharpServerMsBuildProjectDiagnostics', () => { test('Logged message is empty if there are no warnings and erros', () => { const event = new OmnisharpServerMsBuildProjectDiagnostics({ FileName: 'someFile', @@ -47,7 +45,7 @@ suite('OmnisharpLoggerObserver', () => { Errors: [], }); observer.post(event); - expect(logOutput).to.be.empty; + expect(logOutput).toBe(''); }); test(`Logged message contains the Filename if there is atleast one error or warning`, () => { @@ -67,7 +65,7 @@ suite('OmnisharpLoggerObserver', () => { Errors: [], }); observer.post(event); - expect(logOutput).to.contain(event.diagnostics.FileName); + expect(logOutput).toContain(event.diagnostics.FileName); }); [ @@ -100,20 +98,20 @@ suite('OmnisharpLoggerObserver', () => { test(`Logged message contains the Filename, StartColumn, StartLine and Text for the diagnostic warnings`, () => { observer.post(event); event.diagnostics.Warnings.forEach((element) => { - expect(logOutput).to.contain(element.FileName); - expect(logOutput).to.contain(element.StartLine); - expect(logOutput).to.contain(element.StartColumn); - expect(logOutput).to.contain(element.Text); + expect(logOutput).toContain(element.FileName); + expect(logOutput).toContain(element.StartLine.toString()); + expect(logOutput).toContain(element.StartColumn.toString()); + expect(logOutput).toContain(element.Text); }); }); test(`Logged message contains the Filename, StartColumn, StartLine and Text for the diagnostics errors`, () => { observer.post(event); event.diagnostics.Errors.forEach((element) => { - expect(logOutput).to.contain(element.FileName); - expect(logOutput).to.contain(element.StartLine); - expect(logOutput).to.contain(element.StartColumn); - expect(logOutput).to.contain(element.Text); + expect(logOutput).toContain(element.FileName); + expect(logOutput).toContain(element.StartLine.toString()); + expect(logOutput).toContain(element.StartColumn.toString()); + expect(logOutput).toContain(element.Text); }); }); }); @@ -123,7 +121,7 @@ suite('OmnisharpLoggerObserver', () => { (event: EventWithMessage) => { test(`${event.constructor.name}: Message is logged`, () => { observer.post(event); - expect(logOutput).to.contain(event.message); + expect(logOutput).toContain(event.message); }); } ); @@ -131,24 +129,24 @@ suite('OmnisharpLoggerObserver', () => { test(`OmnisharpServerOnServerError: Message is logged`, () => { const event = new OmnisharpServerOnServerError('on server error message'); observer.post(event); - expect(logOutput).to.contain(event.err); + expect(logOutput).toContain(event.err); }); [new OmnisharpInitialisation([], new Date(5), 'somePath')].forEach((event: OmnisharpInitialisation) => { test(`${event.constructor.name}: TimeStamp and SolutionPath are logged`, () => { observer.post(event); - expect(logOutput).to.contain(event.timeStamp.toLocaleString()); - expect(logOutput).to.contain(event.solutionPath); + expect(logOutput).toContain(event.timeStamp.toLocaleString()); + expect(logOutput).toContain(event.solutionPath); }); }); test('OmnisharpFailure: Failure message is logged', () => { const event = new OmnisharpFailure('failureMessage', new Error('errorMessage')); observer.post(event); - expect(logOutput).to.contain(event.message); + expect(logOutput).toContain(event.message); }); - suite('OmnisharpEventPacketReceived', () => { + describe('OmnisharpEventPacketReceived', () => { [ new OmnisharpEventPacketReceived('TRACE', 'foo', 'someMessage'), new OmnisharpEventPacketReceived('DEBUG', 'foo', 'someMessage'), @@ -159,8 +157,8 @@ suite('OmnisharpLoggerObserver', () => { ].forEach((event: OmnisharpEventPacketReceived) => { test(`${event.logLevel} messages are logged with name and the message`, () => { observer.post(event); - expect(logOutput).to.contain(event.name); - expect(logOutput).to.contain(event.message); + expect(logOutput).toContain(event.name); + expect(logOutput).toContain(event.message); }); }); @@ -169,7 +167,7 @@ suite('OmnisharpLoggerObserver', () => { const fn = function () { observer.post(event); }; - expect(fn).to.throw(Error); + expect(fn).toThrow(Error); }); test(`Information messages with name OmniSharp.Middleware.LoggingMiddleware and follow pattern /^/[/w]+: 200 d+ms/ are not logged`, () => { @@ -179,11 +177,11 @@ suite('OmnisharpLoggerObserver', () => { '/codecheck: 200 339ms' ); observer.post(event); - expect(logOutput).to.be.empty; + expect(logOutput).toBe(''); }); }); - suite('OmnisharpLaunch', () => { + describe('OmnisharpLaunch', () => { [ { event: new OmnisharpLaunch('5.8.0', undefined, true, 'someCommand', 4), @@ -222,39 +220,39 @@ suite('OmnisharpLoggerObserver', () => { test(`Command and Pid are displayed`, () => { observer.post(event); - expect(logOutput).to.contain(event.command); - expect(logOutput).to.contain(event.pid); + expect(logOutput).toContain(event.command); + expect(logOutput).toContain(event.pid.toString()); }); test(`Message is displayed depending on hostVersion and hostPath value`, () => { observer.post(event); - expect(logOutput).to.contain(data.expected); + expect(logOutput).toContain(data.expected); }); }); }); - suite('OmnisharpServerOnError', () => { + describe('OmnisharpServerOnError', () => { test(`Doesnot throw error if FileName is null`, () => { const event = new OmnisharpServerOnError({ Text: 'someText', FileName: null!, Line: 1, Column: 2 }); const fn = function () { observer.post(event); }; - expect(fn).to.not.throw(Error); + expect(fn).not.toThrow(Error); }); [new OmnisharpServerOnError({ Text: 'someText', FileName: 'someFile', Line: 1, Column: 2 })].forEach( (event: OmnisharpServerOnError) => { test(`Contains the error message text`, () => { observer.post(event); - expect(logOutput).to.contain(event.errorMessage.Text); + expect(logOutput).toContain(event.errorMessage.Text); }); test(`Contains the error message FileName, Line and column if FileName is not null`, () => { observer.post(event); if (event.errorMessage.FileName) { - expect(logOutput).to.contain(event.errorMessage.FileName); - expect(logOutput).to.contain(event.errorMessage.Line); - expect(logOutput).to.contain(event.errorMessage.Column); + expect(logOutput).toContain(event.errorMessage.FileName); + expect(logOutput).toContain(event.errorMessage.Line.toString()); + expect(logOutput).toContain(event.errorMessage.Column.toString()); } }); } diff --git a/omnisharptest/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts index 9e729936e..5db4b97cf 100644 --- a/omnisharptest/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { describe, test, expect, beforeEach } from '@jest/globals'; import { StatusBarItem } from '../../../src/vscodeAdapter'; import { OmnisharpOnBeforeServerInstall, @@ -17,15 +18,13 @@ import { BaseEvent, InstallationSuccess, } from '../../../src/omnisharp/loggingEvents'; -import { expect, should } from 'chai'; import { OmnisharpStatusBarObserver, StatusBarColors } from '../../../src/observers/omnisharpStatusBarObserver'; -suite('OmnisharpStatusBarObserver', () => { - suiteSetup(() => should()); +describe('OmnisharpStatusBarObserver', () => { let showCalled: boolean; let hideCalled: boolean; - setup(() => { + beforeEach(() => { statusBarItem.text = ''; statusBarItem.color = undefined; statusBarItem.command = undefined; @@ -48,79 +47,79 @@ suite('OmnisharpStatusBarObserver', () => { [new OmnisharpServerOnServerError('someError')].forEach((event: BaseEvent) => { test(`${event.constructor.name}: Status bar is shown with the error text`, () => { observer.post(event); - expect(showCalled).to.be.true; - expect(statusBarItem.text).to.equal(`$(flame)`); - expect(statusBarItem.command).to.equal('o.showOutput'); - expect(statusBarItem.tooltip).to.equal('Error starting OmniSharp'); - expect(statusBarItem.color).to.equal(StatusBarColors.Red); + expect(showCalled).toBe(true); + expect(statusBarItem.text).toEqual(`$(flame)`); + expect(statusBarItem.command).toEqual('o.showOutput'); + expect(statusBarItem.tooltip).toEqual('Error starting OmniSharp'); + expect(statusBarItem.color).toEqual(StatusBarColors.Red); }); }); test(`${OmnisharpServerOnStdErr.name}: Status bar is shown with the error text`, () => { const event = new OmnisharpServerOnStdErr('std error'); observer.post(event); - expect(showCalled).to.be.true; - expect(statusBarItem.color).to.equal(StatusBarColors.Red); - expect(statusBarItem.text).to.equal(`$(flame)`); - expect(statusBarItem.command).to.equal('o.showOutput'); - expect(statusBarItem.tooltip).to.contain(event.message); + expect(showCalled).toBe(true); + expect(statusBarItem.color).toEqual(StatusBarColors.Red); + expect(statusBarItem.text).toEqual(`$(flame)`); + expect(statusBarItem.command).toEqual('o.showOutput'); + expect(statusBarItem.tooltip).toContain(event.message); }); test('OnBeforeServerInstall: Status bar is shown with the installation text', () => { const event = new OmnisharpOnBeforeServerInstall(); observer.post(event); - expect(showCalled).to.be.true; - expect(statusBarItem.text).to.be.equal('$(flame) Installing OmniSharp...'); - expect(statusBarItem.command).to.equal('o.showOutput'); + expect(showCalled).toBe(true); + expect(statusBarItem.text).toEqual('$(flame) Installing OmniSharp...'); + expect(statusBarItem.command).toEqual('o.showOutput'); }); test('OnBeforeServerStart: Status bar is shown with the starting text', () => { const event = new OmnisharpOnBeforeServerStart(); observer.post(event); - expect(showCalled).to.be.true; - expect(statusBarItem.color).to.equal(StatusBarColors.Yellow); - expect(statusBarItem.text).to.be.equal('$(flame)'); - expect(statusBarItem.command).to.equal('o.showOutput'); - expect(statusBarItem.tooltip).to.equal('Starting OmniSharp server'); + expect(showCalled).toBe(true); + expect(statusBarItem.color).toEqual(StatusBarColors.Yellow); + expect(statusBarItem.text).toEqual('$(flame)'); + expect(statusBarItem.command).toEqual('o.showOutput'); + expect(statusBarItem.tooltip).toEqual('Starting OmniSharp server'); }); test('OnServerStart: Status bar is shown with the flame and "Running" text', () => { const event = new OmnisharpServerOnStart(); observer.post(event); - expect(showCalled).to.be.true; - expect(statusBarItem.text).to.be.equal('$(flame)'); - expect(statusBarItem.command).to.equal('o.showOutput'); - expect(statusBarItem.tooltip).to.be.equal('OmniSharp server is running'); + expect(showCalled).toBe(true); + expect(statusBarItem.text).toEqual('$(flame)'); + expect(statusBarItem.command).toEqual('o.showOutput'); + expect(statusBarItem.tooltip).toEqual('OmniSharp server is running'); }); test('OnServerStop: Status bar is hidden and the attributes are set to undefined', () => { const event = new OmnisharpServerOnStop(); observer.post(event); - expect(hideCalled).to.be.true; - expect(statusBarItem.text).to.be.equal(''); - expect(statusBarItem.command).to.be.undefined; - expect(statusBarItem.color).to.be.undefined; + expect(hideCalled).toBe(true); + expect(statusBarItem.text).toEqual(''); + expect(statusBarItem.command).toBe(undefined); + expect(statusBarItem.color).toBe(undefined); }); test('DownloadStart: Text and tooltip are set ', () => { const event = new DownloadStart('somePackage'); observer.post(event); - expect(statusBarItem.text).to.contain('Downloading packages'); - expect(statusBarItem.tooltip).to.contain(event.packageDescription); + expect(statusBarItem.text).toContain('Downloading packages'); + expect(statusBarItem.tooltip).toContain(event.packageDescription); }); test('InstallationProgress: Text and tooltip are set', () => { const event = new InstallationStart('somePackage'); observer.post(event); - expect(statusBarItem.text).to.contain('Installing packages'); - expect(statusBarItem.tooltip).to.contain(event.packageDescription); + expect(statusBarItem.text).toContain('Installing packages'); + expect(statusBarItem.tooltip).toContain(event.packageDescription); }); test('DownloadProgress: Tooltip contains package description and download percentage', () => { const event = new DownloadProgress(50, 'somePackage'); observer.post(event); - expect(statusBarItem.tooltip).to.contain(event.packageDescription); - expect(statusBarItem.tooltip).to.contain(event.downloadPercentage); + expect(statusBarItem.tooltip).toContain(event.packageDescription); + expect(statusBarItem.tooltip).toContain(event.downloadPercentage.toString()); }); test('InstallationSuccess: Status bar is hidden and the attributes are set to undefined', () => { @@ -130,9 +129,9 @@ suite('OmnisharpStatusBarObserver', () => { const successEvent = new InstallationSuccess(); observer.post(successEvent); - expect(hideCalled).to.be.true; - expect(statusBarItem.text).to.be.equal(''); - expect(statusBarItem.command).to.be.undefined; - expect(statusBarItem.color).to.be.undefined; + expect(hideCalled).toBe(true); + expect(statusBarItem.text).toEqual(''); + expect(statusBarItem.command).toBe(undefined); + expect(statusBarItem.color).toBe(undefined); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts index c88b12a22..b06f6070b 100644 --- a/omnisharptest/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts @@ -3,15 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { expect, should } from 'chai'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { getWorkspaceInformationUpdated, getMSBuildWorkspaceInformation } from '../../../test/unitTests/fakes'; import { StatusBarItem } from '../../../src/vscodeAdapter'; import { ProjectStatusBarObserver } from '../../../src/observers/projectStatusBarObserver'; import { OmnisharpOnMultipleLaunchTargets, OmnisharpServerOnStop } from '../../../src/omnisharp/loggingEvents'; -suite('ProjectStatusBarObserver', () => { - suiteSetup(() => should()); - +describe('ProjectStatusBarObserver', () => { let showCalled: boolean; let hideCalled: boolean; const statusBarItem = { @@ -24,7 +22,7 @@ suite('ProjectStatusBarObserver', () => { }; const observer = new ProjectStatusBarObserver(statusBarItem); - setup(() => { + beforeEach(() => { showCalled = false; hideCalled = false; }); @@ -32,35 +30,35 @@ suite('ProjectStatusBarObserver', () => { test('OnServerStop: Status bar is hidden and the attributes are set to undefined', () => { const event = new OmnisharpServerOnStop(); observer.post(event); - expect(hideCalled).to.be.true; - expect(statusBarItem.text).to.be.equal(''); - expect(statusBarItem.command).to.be.undefined; - expect(statusBarItem.color).to.be.undefined; + expect(hideCalled).toBe(true); + expect(statusBarItem.text).toEqual(''); + expect(statusBarItem.command).toBe(undefined); + expect(statusBarItem.color).toBe(undefined); }); test('OnMultipleLaunchTargets: Status bar is shown with the select project option and the comand to pick a project', () => { const event = new OmnisharpOnMultipleLaunchTargets([]); observer.post(event); - expect(showCalled).to.be.true; - expect(statusBarItem.text).to.contain('Select project'); - expect(statusBarItem.command).to.equal('o.pickProjectAndStart'); + expect(showCalled).toBe(true); + expect(statusBarItem.text).toContain('Select project'); + expect(statusBarItem.command).toEqual('o.pickProjectAndStart'); }); - suite('WorkspaceInformationUpdated', () => { + describe('WorkspaceInformationUpdated', () => { test('Project status is hidden if there is no MSBuild Object', () => { const event = getWorkspaceInformationUpdated(undefined); observer.post(event); - expect(hideCalled).to.be.true; - expect(statusBarItem.text).to.be.equal(''); - expect(statusBarItem.command).to.be.undefined; + expect(hideCalled).toBe(true); + expect(statusBarItem.text).toEqual(''); + expect(statusBarItem.command).toBe(undefined); }); test('Project status is shown if there is an MSBuild object', () => { const event = getWorkspaceInformationUpdated(getMSBuildWorkspaceInformation('somePath', [])); observer.post(event); - expect(showCalled).to.be.true; - expect(statusBarItem.text).to.contain(event.info.MsBuild?.SolutionPath); - expect(statusBarItem.command).to.equal('o.pickProjectAndStart'); + expect(showCalled).toBe(true); + expect(statusBarItem.text).toContain(event.info.MsBuild?.SolutionPath); + expect(statusBarItem.command).toEqual('o.pickProjectAndStart'); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/razorLoggerObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/razorLoggerObserver.test.ts index 486d6e1c5..842608194 100644 --- a/omnisharptest/omnisharpUnitTests/logging/razorLoggerObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/razorLoggerObserver.test.ts @@ -2,7 +2,7 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { should, expect } from 'chai'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { getNullChannel } from '../../../test/unitTests/fakes'; import { RazorLoggerObserver } from '../../../src/observers/razorLoggerObserver'; import { @@ -11,8 +11,7 @@ import { RazorDevModeActive, } from '../../../src/omnisharp/loggingEvents'; -suite('RazorLoggerObserver', () => { - suiteSetup(() => should()); +describe('RazorLoggerObserver', () => { let logOutput = ''; const observer = new RazorLoggerObserver({ ...getNullChannel(), @@ -21,25 +20,25 @@ suite('RazorLoggerObserver', () => { }, }); - setup(() => { + beforeEach(() => { logOutput = ''; }); test(`RazorPluginPathSpecified: Path is logged`, () => { const event = new RazorPluginPathSpecified('somePath'); observer.post(event); - expect(logOutput).to.contain(event.path); + expect(logOutput).toContain(event.path); }); test(`RazorPluginPathDoesNotExist: Path is logged`, () => { const event = new RazorPluginPathDoesNotExist('somePath'); observer.post(event); - expect(logOutput).to.contain(event.path); + expect(logOutput).toContain(event.path); }); test(`RazorDevModeActive: Logs dev mode active`, () => { const event = new RazorDevModeActive(); observer.post(event); - expect(logOutput).to.contain('Razor dev mode active'); + expect(logOutput).toContain('Razor dev mode active'); }); }); diff --git a/omnisharptest/omnisharpUnitTests/logging/warningMessageObserver.test.ts b/omnisharptest/omnisharpUnitTests/logging/warningMessageObserver.test.ts index 90b830bb0..73e867cc4 100644 --- a/omnisharptest/omnisharpUnitTests/logging/warningMessageObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/logging/warningMessageObserver.test.ts @@ -2,9 +2,8 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - +import { describe, test, expect, beforeEach } from '@jest/globals'; import { WarningMessageObserver } from '../../../src/observers/warningMessageObserver'; -import { assert, expect, should } from 'chai'; import { getFakeVsCode, getMSBuildDiagnosticsMessage, @@ -16,9 +15,7 @@ import { TestScheduler } from 'rxjs/testing'; import { from as observableFrom, Subject } from 'rxjs'; import { timeout, map } from 'rxjs/operators'; -suite('WarningMessageObserver', () => { - suiteSetup(() => should()); - +describe('WarningMessageObserver', () => { let doClickOk: () => void; let doClickCancel: () => void; let signalCommandDone: () => void; @@ -55,9 +52,11 @@ suite('WarningMessageObserver', () => { return undefined; }; - setup(() => { + beforeEach(() => { assertionObservable = new Subject(); - scheduler = new TestScheduler(assert.deepEqual); + scheduler = new TestScheduler((actual, expected) => { + expect(actual).toStrictEqual(expected); + }); scheduler.maxFrames = 9000; observer = new WarningMessageObserver(vscode, () => false, scheduler); warningMessages = []; @@ -80,8 +79,8 @@ suite('WarningMessageObserver', () => { const eventList = scheduler.createHotObservable(marble, marble_event_map); eventList.subscribe((e) => observer.post(e)); scheduler.flush(); - expect(warningMessages).to.be.empty; - expect(invokedCommand).to.be.undefined; + expect(warningMessages).toHaveLength(0); + expect(invokedCommand).toBe(undefined); }); test('OmnisharpServerMsBuildProjectDiagnostics: No event is posted if warning is disabled', () => { @@ -96,8 +95,8 @@ suite('WarningMessageObserver', () => { const eventList = scheduler.createHotObservable(marble, marble_event_map); eventList.subscribe((e) => newObserver.post(e)); scheduler.flush(); - expect(warningMessages).to.be.empty; - expect(invokedCommand).to.be.undefined; + expect(warningMessages).toHaveLength(0); + expect(invokedCommand).toBe(undefined); }); [ @@ -134,7 +133,7 @@ suite('WarningMessageObserver', () => { command: 'o.showOutput', }, ].forEach((elem) => { - suite(`${elem.eventA.constructor.name}`, () => { + describe(`${elem.eventA.constructor.name}`, () => { test(`When the event is fired then a warning message is displayed`, () => { const marble = `${timeToMarble(1500)}a`; const marble_event_map = { a: elem.eventA }; @@ -142,8 +141,8 @@ suite('WarningMessageObserver', () => { eventList.subscribe((e) => observer.post(e)); scheduler.expectObservable(assertionObservable).toBe(`${timeToMarble(3000)}a`, { a: elem.assertion1 }); scheduler.flush(); - expect(warningMessages.length).to.be.equal(1); - expect(warningMessages[0]).to.be.equal(elem.expected); + expect(warningMessages.length).toEqual(1); + expect(warningMessages[0]).toEqual(elem.expected); }); test(`When events are fired rapidly, then they are debounced by 1500 ms`, () => { @@ -154,8 +153,8 @@ suite('WarningMessageObserver', () => { scheduler.expectObservable(assertionObservable).toBe(`${timeToMarble(3520)}a`, { a: elem.assertion1 }); scheduler.flush(); - expect(warningMessages.length).to.be.equal(1); - expect(warningMessages[0]).to.be.equal(elem.expected); + expect(warningMessages.length).toEqual(1); + expect(warningMessages[0]).toEqual(elem.expected); }); test(`When events are 1500 ms apart, then they are not debounced`, () => { @@ -168,8 +167,8 @@ suite('WarningMessageObserver', () => { b: elem.assertion2, }); scheduler.flush(); - expect(warningMessages.length).to.be.equal(2); - expect(warningMessages[0]).to.be.equal(elem.expected); + expect(warningMessages.length).toEqual(2); + expect(warningMessages[0]).toEqual(elem.expected); }); test(`Given a warning message, when the user clicks ok the command is executed`, async () => { @@ -179,7 +178,7 @@ suite('WarningMessageObserver', () => { scheduler.flush(); doClickOk(); await commandDone; - expect(invokedCommand).to.be.equal(elem.command); + expect(invokedCommand).toEqual(elem.command); }); test(`Given a warning message, when the user clicks cancel the command is not executed`, async () => { @@ -188,8 +187,8 @@ suite('WarningMessageObserver', () => { scheduler.expectObservable(eventList.pipe(map((e) => observer.post(e)))); scheduler.flush(); doClickCancel(); - await expect(observableFrom(commandDone).pipe(timeout(1)).toPromise()).to.be.rejected; - expect(invokedCommand).to.be.undefined; + await expect(observableFrom(commandDone).pipe(timeout(1)).toPromise()).rejects.toThrow(); + expect(invokedCommand).toBe(undefined); }); }); }); diff --git a/omnisharptest/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts b/omnisharptest/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts index 0f04d0ca9..d084153cb 100644 --- a/omnisharptest/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts +++ b/omnisharptest/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts @@ -3,16 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as vscode from 'vscode'; +import { describe, test, expect, beforeEach, jest } from '@jest/globals'; import { OmniSharpMonoResolver } from '../../../src/omnisharp/omniSharpMonoResolver'; -import { Options } from '../../../src/shared/options'; -import { expect } from 'chai'; import { join } from 'path'; -import { getEmptyOptions } from '../fakes/fakeOptions'; +import { getWorkspaceConfiguration } from '../../../test/unitTests/fakes'; -suite(`${OmniSharpMonoResolver.name}`, () => { +describe(`${OmniSharpMonoResolver.name}`, () => { let getMonoCalled: boolean; - let options: Options; const monoPath = 'monoPath'; @@ -25,42 +24,32 @@ suite(`${OmniSharpMonoResolver.name}`, () => { return Promise.resolve(version); }; - setup(() => { + beforeEach(() => { getMonoCalled = false; - options = getEmptyOptions(); + jest.spyOn(vscode.workspace, 'getConfiguration').mockReturnValue(getWorkspaceConfiguration()); + vscode.workspace.getConfiguration().update('omnisharp.monoPath', monoPath); }); test(`it returns the path and version if the version is greater than or equal to ${requiredMonoVersion}`, async () => { const monoResolver = new OmniSharpMonoResolver(getMono(higherMonoVersion)); - const monoInfo = await monoResolver.getHostExecutableInfo({ - ...options, - omnisharpOptions: { ...options.omnisharpOptions, monoPath: monoPath }, - }); + const monoInfo = await monoResolver.getHostExecutableInfo(); - expect(monoInfo.version).to.be.equal(higherMonoVersion); - expect(monoInfo.path).to.be.equal(monoPath); + expect(monoInfo.version).toEqual(higherMonoVersion); + expect(monoInfo.path).toEqual(monoPath); }); test(`it throws exception if version is less than ${requiredMonoVersion}`, async () => { const monoResolver = new OmniSharpMonoResolver(getMono(lowerMonoVersion)); - await expect( - monoResolver.getHostExecutableInfo({ - ...options, - omnisharpOptions: { ...options.omnisharpOptions, monoPath: monoPath }, - }) - ).to.be.rejected; + await expect(monoResolver.getHostExecutableInfo()).rejects.toThrow(); }); test('sets the environment with the monoPath', async () => { const monoResolver = new OmniSharpMonoResolver(getMono(requiredMonoVersion)); - const monoInfo = await monoResolver.getHostExecutableInfo({ - ...options, - omnisharpOptions: { ...options.omnisharpOptions, monoPath: monoPath }, - }); + const monoInfo = await monoResolver.getHostExecutableInfo(); - expect(getMonoCalled).to.be.equal(true); - expect(monoInfo.env['PATH']).to.contain(join(monoPath, 'bin')); - expect(monoInfo.env['MONO_GAC_PREFIX']).to.be.equal(monoPath); + expect(getMonoCalled).toEqual(true); + expect(monoInfo.env['PATH']).toContain(join(monoPath, 'bin')); + expect(monoInfo.env['MONO_GAC_PREFIX']).toEqual(monoPath); }); }); diff --git a/omnisharptest/omnisharpUnitTests/omnisharpDownloader.test.ts b/omnisharptest/omnisharpUnitTests/omnisharpDownloader.test.ts index d80ba1afe..07a0ab96e 100644 --- a/omnisharptest/omnisharpUnitTests/omnisharpDownloader.test.ts +++ b/omnisharptest/omnisharpUnitTests/omnisharpDownloader.test.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import { OmnisharpDownloader } from '../../src/omnisharp/omnisharpDownloader'; import NetworkSettings from '../../src/networkSettings'; import { EventStream } from '../../src/eventStream'; @@ -10,10 +11,9 @@ import { PlatformInformation } from '../../src/shared/platform'; import { CreateTmpDir, TmpAsset } from '../../src/createTmpAsset'; import * as util from '../../src/common'; import * as path from 'path'; -import MockHttpsServer from './testAssets/mockHttpsServer'; -import { expect } from 'chai'; -import TestZip from './testAssets/testZip'; -import { createTestFile } from './testAssets/testFile'; +import MockHttpsServer from '../omnisharpUnitTests/testAssets/mockHttpsServer'; +import TestZip from '../omnisharpUnitTests/testAssets/testZip'; +import { createTestFile } from '../omnisharpUnitTests/testAssets/testFile'; import { PackageInstallation, LogPlatformInfo, @@ -25,12 +25,12 @@ import { InstallationSuccess, PackageInstallStart, } from '../../src/omnisharp/loggingEvents'; -import TestEventBus from './testAssets/testEventBus'; -import { testPackageJSON } from './testAssets/testAssets'; +import TestEventBus from '../omnisharpUnitTests/testAssets/testEventBus'; +import { testPackageJSON } from '../omnisharpUnitTests/testAssets/testAssets'; import { modernNetVersion } from '../../src/omnisharp/omnisharpPackageCreator'; [true, false].forEach((useFramework) => { - suite(`OmnisharpDownloader (useFramework: ${useFramework})`, () => { + describe(`OmnisharpDownloader (useFramework: ${useFramework})`, () => { const networkSettingsProvider = () => new NetworkSettings('', false); let eventStream: EventStream; const installPath = 'somePath'; @@ -44,7 +44,7 @@ import { modernNetVersion } from '../../src/omnisharp/omnisharpPackageCreator'; let eventBus: TestEventBus; const suffix = useFramework ? '' : `-net${modernNetVersion}`; - setup(async () => { + beforeEach(async () => { eventStream = new EventStream(); eventBus = new TestEventBus(eventStream); tmpDir = await CreateTmpDir(true); @@ -79,14 +79,14 @@ import { modernNetVersion } from '../../src/omnisharp/omnisharpPackageCreator'; server.baseUrl, installPath ) - ).to.be.false; + ).toBe(false); }); test('Packages are downloaded and installed', async () => { await downloader.DownloadAndInstallOmnisharp(version, useFramework, server.baseUrl, installPath); for (const elem of testZip.files) { const filePath = path.join(extensionPath, installPath, version + suffix, elem.path); - expect(await util.fileExists(filePath)).to.be.true; + expect(await util.fileExists(filePath)).toBe(true); } }); @@ -110,12 +110,12 @@ import { modernNetVersion } from '../../src/omnisharp/omnisharpPackageCreator'; new InstallationSuccess(), ]; - expect(eventBus.getEvents()).to.be.empty; + expect(eventBus.getEvents()).toHaveLength(0); await downloader.DownloadAndInstallOmnisharp(version, useFramework, server.baseUrl, installPath); - expect(eventBus.getEvents()).to.be.deep.equal(expectedSequence); + expect(eventBus.getEvents()).toStrictEqual(expectedSequence); }); - teardown(async () => { + afterEach(async () => { tmpDir.dispose(); await server.stop(); eventBus.dispose(); diff --git a/omnisharptest/omnisharpUnitTests/omnisharpManager.test.ts b/omnisharptest/omnisharpUnitTests/omnisharpManager.test.ts index e57f07100..df54ac707 100644 --- a/omnisharptest/omnisharpUnitTests/omnisharpManager.test.ts +++ b/omnisharptest/omnisharpUnitTests/omnisharpManager.test.ts @@ -3,22 +3,22 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import { OmnisharpManager } from '../../src/omnisharp/omnisharpManager'; -import MockHttpsServer from './testAssets/mockHttpsServer'; -import TestZip from './testAssets/testZip'; -import { createTestFile } from './testAssets/testFile'; +import MockHttpsServer from '../omnisharpUnitTests/testAssets/mockHttpsServer'; +import TestZip from '../omnisharpUnitTests/testAssets/testZip'; +import { createTestFile } from '../omnisharpUnitTests/testAssets/testFile'; import { PlatformInformation } from '../../src/shared/platform'; import { OmnisharpDownloader } from '../../src/omnisharp/omnisharpDownloader'; import NetworkSettings from '../../src/networkSettings'; import { EventStream } from '../../src/eventStream'; -import { testPackageJSON } from './testAssets/testAssets'; +import { testPackageJSON } from '../omnisharpUnitTests/testAssets/testAssets'; import { TmpAsset, CreateTmpDir, CreateTmpFile } from '../../src/createTmpAsset'; -import { expect } from 'chai'; import * as path from 'path'; import * as util from '../../src/common'; import { modernNetVersion } from '../../src/omnisharp/omnisharpPackageCreator'; -suite(OmnisharpManager.name, () => { +describe(OmnisharpManager.name, () => { let server: MockHttpsServer; const eventStream = new EventStream(); let manager: OmnisharpManager; @@ -85,8 +85,8 @@ suite(OmnisharpManager.name, () => { useFramework: true, }, ].forEach((elem) => { - suite(elem.platformInfo.toString(), () => { - setup(async () => { + describe(`${elem.platformInfo.toString()},${elem.platformId},framework:${elem.useFramework},`, () => { + beforeEach(async () => { server = await MockHttpsServer.CreateMockHttpsServer(); await server.start(); tmpInstallDir = await CreateTmpDir(true); @@ -131,13 +131,13 @@ suite(OmnisharpManager.name, () => { test('Throws error if the path is neither an absolute path nor a valid semver, nor the string "latest"', async () => { expect( manager.GetOmniSharpLaunchPath(defaultVersion, 'Some incorrect path', useFramework, extensionPath) - ).to.be.rejectedWith(Error); + ).rejects.toThrowError(Error); }); test('Throws error when the specified path is an invalid semver', async () => { expect( manager.GetOmniSharpLaunchPath(defaultVersion, 'a.b.c', useFramework, extensionPath) - ).to.be.rejectedWith(Error); + ).rejects.toThrowError(Error); }); test('Returns the same path if absolute path to an existing file is passed', async () => { @@ -148,7 +148,7 @@ suite(OmnisharpManager.name, () => { useFramework, extensionPath ); - expect(launchPath).to.be.equal(tmpFile.name); + expect(launchPath).toEqual(tmpFile.name); }); test('Returns the default path if the omnisharp path is empty', async () => { @@ -160,16 +160,16 @@ suite(OmnisharpManager.name, () => { ); if (useFramework) { if (elem.platformInfo.isWindows()) { - expect(launchPath).to.be.equal( + expect(launchPath).toEqual( path.join(extensionPath, '.omnisharp', defaultVersion + suffix, 'OmniSharp.exe') ); } else { - expect(launchPath).to.be.equal( + expect(launchPath).toEqual( path.join(extensionPath, '.omnisharp', defaultVersion, 'omnisharp', 'OmniSharp.exe') ); } } else { - expect(launchPath).to.be.equal( + expect(launchPath).toEqual( path.join(extensionPath, '.omnisharp', defaultVersion + suffix, 'OmniSharp.dll') ); } @@ -184,16 +184,16 @@ suite(OmnisharpManager.name, () => { ); if (useFramework) { if (elem.platformInfo.isWindows()) { - expect(launchPath).to.be.equal( + expect(launchPath).toEqual( path.join(extensionPath, installPath, latestVersion + suffix, 'OmniSharp.exe') ); } else { - expect(launchPath).to.be.equal( + expect(launchPath).toEqual( path.join(extensionPath, installPath, latestVersion, 'omnisharp', 'OmniSharp.exe') ); } } else { - expect(launchPath).to.be.equal( + expect(launchPath).toEqual( path.join(extensionPath, installPath, latestVersion + suffix, 'OmniSharp.dll') ); } @@ -208,16 +208,16 @@ suite(OmnisharpManager.name, () => { ); if (useFramework) { if (elem.platformInfo.isWindows()) { - expect(launchPath).to.be.equal( + expect(launchPath).toEqual( path.join(extensionPath, installPath, testVersion + suffix, 'OmniSharp.exe') ); } else { - expect(launchPath).to.be.equal( + expect(launchPath).toEqual( path.join(extensionPath, installPath, testVersion, 'omnisharp', 'OmniSharp.exe') ); } } else { - expect(launchPath).to.be.equal( + expect(launchPath).toEqual( path.join(extensionPath, installPath, testVersion + suffix, 'OmniSharp.dll') ); } @@ -227,13 +227,13 @@ suite(OmnisharpManager.name, () => { await manager.GetOmniSharpLaunchPath(defaultVersion, testVersion, useFramework, extensionPath); for (const elem of testZip.files) { const filePath = path.join(extensionPath, installPath, testVersion + suffix, elem.path); - expect(await util.fileExists(filePath)).to.be.true; + expect(await util.fileExists(filePath)).toBe(true); } }); }); }); - teardown(async () => { + afterEach(async () => { await server.stop(); if (tmpFile) { tmpFile.dispose(); diff --git a/omnisharptest/omnisharpUnitTests/omnisharpPackageCreator.test.ts b/omnisharptest/omnisharpUnitTests/omnisharpPackageCreator.test.ts index f566a3226..df9c5e78e 100644 --- a/omnisharptest/omnisharpUnitTests/omnisharpPackageCreator.test.ts +++ b/omnisharptest/omnisharpUnitTests/omnisharpPackageCreator.test.ts @@ -3,203 +3,199 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { assert, should } from 'chai'; +import { describe, test, expect, beforeEach } from '@jest/globals'; import { SetBinaryAndGetPackage, GetPackagesFromVersion, modernNetVersion, } from '../../src/omnisharp/omnisharpPackageCreator'; import { Package } from '../../src/packageManager/package'; -import { testPackageJSON } from './testAssets/testAssets'; +import { testPackageJSON } from '../omnisharpUnitTests/testAssets/testAssets'; import { isNotNull } from '../testUtil'; -suite( - 'GetOmnisharpPackage : Output package depends on the input package and other input parameters like serverUrl', - () => { - let serverUrl: string; - let version: string; - let installPath: string; - let inputPackages: Package[]; +describe('GetOmnisharpPackage : Output package depends on the input package and other input parameters like serverUrl', () => { + let serverUrl: string; + let version: string; + let installPath: string; + let inputPackages: Package[]; - suiteSetup(() => { - serverUrl = 'http://serverUrl'; - version = '0.0.0'; - installPath = 'testPath'; - const packageJSON = testPackageJSON; - inputPackages = packageJSON.runtimeDependencies; - should(); - }); - - const useFrameworkOptions = [true, false]; - - useFrameworkOptions.forEach((useFramework) => { - const pathSuffix = useFramework ? '' : `-net${modernNetVersion}`; + beforeEach(() => { + serverUrl = 'http://serverUrl'; + version = '0.0.0'; + installPath = 'testPath'; + const packageJSON = testPackageJSON; + inputPackages = packageJSON.runtimeDependencies; + }); - test(`Architectures, binaries and platforms do not change useFramework: ${useFramework}`, () => { - const testPackage = inputPackages.find( - (element) => element.platformId && element.platformId == 'os-architecture' - ); - isNotNull(testPackage); - const resultPackage = SetBinaryAndGetPackage( - testPackage, - useFramework, - serverUrl, - version, - installPath - ); + const useFrameworkOptions = [true, false]; - resultPackage.architectures.should.equal(testPackage.architectures); - assert.equal(resultPackage.binaries, testPackage.binaries); - resultPackage.platforms.should.equal(testPackage.platforms); - }); + useFrameworkOptions.forEach((useFramework) => { + const pathSuffix = useFramework ? '' : `-net${modernNetVersion}`; - test(`Version information is appended to the description useFramework: ${useFramework}`, () => { - const testPackage = inputPackages.find( - (element) => element.platformId && element.platformId == 'os-architecture' - ); - isNotNull(testPackage); - const resultPackage = SetBinaryAndGetPackage( - testPackage, - useFramework, - serverUrl, - '1.2.3', - installPath - ); + test(`Architectures, binaries and platforms do not change ${useFramework ? 'on framework' : ''}`, () => { + const testPackage = inputPackages.find( + (element) => element.platformId && element.platformId == 'os-architecture' + ); + isNotNull(testPackage); + const resultPackage = SetBinaryAndGetPackage(testPackage, useFramework, serverUrl, version, installPath); - resultPackage.description.should.equal(`${testPackage.description}, Version = 1.2.3`); - }); + expect(resultPackage.architectures).toEqual(testPackage.architectures); + expect(resultPackage.binaries).toEqual(testPackage.binaries); + expect(resultPackage.platforms).toEqual(testPackage.platforms); + }); - test(`Install path is calculated using the specified path and version useFramework: ${useFramework}`, () => { - const testPackage = inputPackages.find( - (element) => element.platformId && element.platformId == 'os-architecture' - ); - const resultPackage = SetBinaryAndGetPackage( - testPackage!, - useFramework, - serverUrl, - '1.2.3', - 'experimentPath' - ); - resultPackage.installPath!.should.equal(`experimentPath/1.2.3${pathSuffix}`); - }); + test(`Version information is appended to the description useFramework: ${ + useFramework ? 'on framework' : '' + }`, () => { + const testPackage = inputPackages.find( + (element) => element.platformId && element.platformId == 'os-architecture' + ); + isNotNull(testPackage); + const resultPackage = SetBinaryAndGetPackage(testPackage, useFramework, serverUrl, '1.2.3', installPath); - test(`Install test path is calculated using specified path, version and ends with OmniSharp.exe or OmniSharp.dll - Windows(x86) useFramework: ${useFramework}`, () => { - const testPackage = inputPackages.find( - (element) => element.platformId && element.platformId == 'win-x86' - ); - const resultPackage = SetBinaryAndGetPackage( - testPackage!, - useFramework, - serverUrl, - '1.2.3', - 'experimentPath' - ); - resultPackage.installTestPath!.should.equal( - `./experimentPath/1.2.3${pathSuffix}/OmniSharp.${useFramework ? 'exe' : 'dll'}` - ); - }); + expect(resultPackage.description).toEqual(`${testPackage.description}, Version = 1.2.3`); + }); - test(`Install test path is calculated using specified path, version and ends with OmniSharp.exe or OmniSharp.dll - Windows(x64) useFramework: ${useFramework}`, () => { - const testPackage = inputPackages.find( - (element) => element.platformId && element.platformId == 'win-x64' - ); - const resultPackage = SetBinaryAndGetPackage( - testPackage!, - useFramework, - serverUrl, - '1.2.3', - 'experimentPath' - ); - resultPackage.installTestPath!.should.equal( - `./experimentPath/1.2.3${pathSuffix}/OmniSharp.${useFramework ? 'exe' : 'dll'}` - ); - }); + test(`Install path is calculated using the specified path and version ${ + useFramework ? 'on framework' : '' + }`, () => { + const testPackage = inputPackages.find( + (element) => element.platformId && element.platformId == 'os-architecture' + ); + const resultPackage = SetBinaryAndGetPackage( + testPackage!, + useFramework, + serverUrl, + '1.2.3', + 'experimentPath' + ); + expect(resultPackage.installPath).toEqual(`experimentPath/1.2.3${pathSuffix}`); + }); - test(`Install test path is calculated using specified path, version and ends with correct binary - OSX useFramework: ${useFramework}`, () => { - const testPackage = inputPackages.find((element) => element.platformId && element.platformId == 'osx'); - const resultPackage = SetBinaryAndGetPackage( - testPackage!, - useFramework, - serverUrl, - '1.2.3', - 'experimentPath' - ); - resultPackage.installTestPath!.should.equal( - `./experimentPath/1.2.3${pathSuffix}/${useFramework ? 'run' : 'OmniSharp.dll'}` - ); - }); + test(`Install test path is calculated using specified path, version and ends with OmniSharp.exe or OmniSharp.dll - Windows(x86) ${ + useFramework ? 'on framework' : '' + }`, () => { + const testPackage = inputPackages.find((element) => element.platformId && element.platformId == 'win-x86'); + const resultPackage = SetBinaryAndGetPackage( + testPackage!, + useFramework, + serverUrl, + '1.2.3', + 'experimentPath' + ); + expect(resultPackage.installTestPath).toEqual( + `./experimentPath/1.2.3${pathSuffix}/OmniSharp.${useFramework ? 'exe' : 'dll'}` + ); + }); - test(`Install test path is calculated using specified path, version and ends with correct binary - Linux(x86) useFramework: ${useFramework}`, () => { - const testPackage = inputPackages.find( - (element) => element.platformId && element.platformId == 'linux-x86' - ); - const resultPackage = SetBinaryAndGetPackage( - testPackage!, - useFramework, - serverUrl, - '1.2.3', - 'experimentPath' - ); - resultPackage.installTestPath!.should.equal( - `./experimentPath/1.2.3${pathSuffix}/${useFramework ? 'run' : 'OmniSharp.dll'}` - ); - }); + test(`Install test path is calculated using specified path, version and ends with OmniSharp.exe or OmniSharp.dll - Windows(x64) ${ + useFramework ? 'on framework' : '' + }`, () => { + const testPackage = inputPackages.find((element) => element.platformId && element.platformId == 'win-x64'); + const resultPackage = SetBinaryAndGetPackage( + testPackage!, + useFramework, + serverUrl, + '1.2.3', + 'experimentPath' + ); + expect(resultPackage.installTestPath).toEqual( + `./experimentPath/1.2.3${pathSuffix}/OmniSharp.${useFramework ? 'exe' : 'dll'}` + ); + }); - test(`Install test path is calculated using specified path, version and ends with correct binary - Linux(x64) useFramework: ${useFramework}`, () => { - const testPackage = inputPackages.find( - (element) => element.platformId && element.platformId == 'linux-x64' - ); - const resultPackage = SetBinaryAndGetPackage( - testPackage!, - useFramework, - serverUrl, - '1.2.3', - 'experimentPath' - ); - resultPackage.installTestPath!.should.equal( - `./experimentPath/1.2.3${pathSuffix}/${useFramework ? 'run' : 'OmniSharp.dll'}` - ); - }); + test(`Install test path is calculated using specified path, version and ends with correct binary - OSX ${ + useFramework ? 'on framework' : '' + }`, () => { + const testPackage = inputPackages.find((element) => element.platformId && element.platformId == 'osx'); + const resultPackage = SetBinaryAndGetPackage( + testPackage!, + useFramework, + serverUrl, + '1.2.3', + 'experimentPath' + ); + expect(resultPackage.installTestPath).toEqual( + `./experimentPath/1.2.3${pathSuffix}/${useFramework ? 'run' : 'OmniSharp.dll'}` + ); }); - test('Download url is calculated using server url and version (useFramework: true)', () => { + test(`Install test path is calculated using specified path, version and ends with correct binary - Linux(x86) ${ + useFramework ? 'on framework' : '' + }`, () => { const testPackage = inputPackages.find( - (element) => element.platformId && element.platformId == 'os-architecture' + (element) => element.platformId && element.platformId == 'linux-x86' ); const resultPackage = SetBinaryAndGetPackage( testPackage!, - /* useFramework: */ true, - 'http://someurl', - '1.1.1', - installPath + useFramework, + serverUrl, + '1.2.3', + 'experimentPath' + ); + expect(resultPackage.installTestPath).toEqual( + `./experimentPath/1.2.3${pathSuffix}/${useFramework ? 'run' : 'OmniSharp.dll'}` ); - resultPackage.url.should.equal('http://someurl/releases/1.1.1/omnisharp-os-architecture.zip'); }); - test('Download url is calculated using server url and version (useFramework: false)', () => { + test(`Install test path is calculated using specified path, version and ends with correct binary - Linux(x64) useFramework: ${ + useFramework ? 'on framework' : '' + }`, () => { const testPackage = inputPackages.find( - (element) => element.platformId && element.platformId == 'os-architecture' + (element) => element.platformId && element.platformId == 'linux-x64' ); const resultPackage = SetBinaryAndGetPackage( testPackage!, - /* useFramework: */ false, - 'http://someurl', - '1.1.1', - installPath + useFramework, + serverUrl, + '1.2.3', + 'experimentPath' ); - resultPackage.url.should.equal( - `http://someurl/releases/1.1.1/omnisharp-os-architecture-net${modernNetVersion}.zip` + expect(resultPackage.installTestPath).toEqual( + `./experimentPath/1.2.3${pathSuffix}/${useFramework ? 'run' : 'OmniSharp.dll'}` ); }); - } -); + }); + + test('Download url is calculated using server url and version on framework', () => { + const testPackage = inputPackages.find( + (element) => element.platformId && element.platformId == 'os-architecture' + ); + const resultPackage = SetBinaryAndGetPackage( + testPackage!, + /* useFramework: */ true, + 'http://someurl', + '1.1.1', + installPath + ); + expect(resultPackage.url).toEqual('http://someurl/releases/1.1.1/omnisharp-os-architecture.zip'); + }); + + test('Download url is calculated using server url and version (useFramework: false)', () => { + const testPackage = inputPackages.find( + (element) => element.platformId && element.platformId == 'os-architecture' + ); + const resultPackage = SetBinaryAndGetPackage( + testPackage!, + /* useFramework: */ false, + 'http://someurl', + '1.1.1', + installPath + ); + expect(resultPackage.url).toEqual( + `http://someurl/releases/1.1.1/omnisharp-os-architecture-net${modernNetVersion}.zip` + ); + }); +}); -suite('GetPackagesFromVersion : Gets the experimental omnisharp packages from a set of input packages', () => { +describe('GetPackagesFromVersion : Gets the experimental omnisharp packages from a set of input packages', () => { const serverUrl = 'http://serverUrl'; const installPath = 'testPath'; [true, false].forEach((useFramework) => { - test('Returns experiment packages with install test path depending on install path and version', () => { + test(`Returns experiment packages with install test path depending on install path and version${ + useFramework ? 'on framework' : '' + }`, () => { const inputPackages: Package[] = [ { id: 'OmniSharp', @@ -248,11 +244,11 @@ suite('GetPackagesFromVersion : Gets the experimental omnisharp packages from a 'experimentPath' ); const suffix = useFramework ? '' : `-net${modernNetVersion}`; - outPackages.length.should.equal(2); - outPackages[0].installTestPath!.should.equal( + expect(outPackages).toHaveLength(2); + expect(outPackages[0].installTestPath).toEqual( `./experimentPath/1.1.1${suffix}/OmniSharp.${useFramework ? 'exe' : 'dll'}` ); - outPackages[1].installTestPath!.should.equal( + expect(outPackages[1].installTestPath).toEqual( `./experimentPath/1.1.1${suffix}/${useFramework ? 'run' : 'OmniSharp.dll'}` ); }); @@ -298,9 +294,9 @@ suite('GetPackagesFromVersion : Gets the experimental omnisharp packages from a ]; const outPackages = GetPackagesFromVersion(version, useFramework, inputPackages, serverUrl, installPath); - outPackages.length.should.equal(1); - outPackages[0].platformId!.should.equal('win-x64'); - outPackages[0].isFramework!.should.equal(useFramework); + expect(outPackages).toHaveLength(1); + expect(outPackages[0].platformId).toEqual('win-x64'); + expect(outPackages[0].isFramework).toEqual(useFramework); }); }); }); diff --git a/omnisharptest/omnisharpJestTests/optionChangeObserver.test.ts b/omnisharptest/omnisharpUnitTests/optionChangeObserver.test.ts similarity index 95% rename from omnisharptest/omnisharpJestTests/optionChangeObserver.test.ts rename to omnisharptest/omnisharpUnitTests/optionChangeObserver.test.ts index 5684fcb76..27f0f13ca 100644 --- a/omnisharptest/omnisharpJestTests/optionChangeObserver.test.ts +++ b/omnisharptest/omnisharpUnitTests/optionChangeObserver.test.ts @@ -5,7 +5,6 @@ import { timeout } from 'rxjs/operators'; import { from as observableFrom, Subject, BehaviorSubject } from 'rxjs'; -import { Options } from '../../src/shared/options'; import { registerOmnisharpOptionChanges } from '../../src/omnisharp/omnisharpOptionChanges'; import * as jestLib from '@jest/globals'; @@ -19,11 +18,11 @@ jestLib.describe('OmniSharpConfigChangeObserver', () => { let commandDone: Promise | undefined; let infoMessage: string | undefined; let invokedCommand: string | undefined; - let optionObservable: Subject; + let optionObservable: Subject; jestLib.beforeEach(() => { resetMocks(); - optionObservable = new BehaviorSubject(Options.Read(vscode)); + optionObservable = new BehaviorSubject(undefined); infoMessage = undefined; invokedCommand = undefined; commandDone = new Promise((resolve) => { @@ -46,7 +45,7 @@ jestLib.describe('OmniSharpConfigChangeObserver', () => { jestLib.expect(infoMessage).toBe(undefined); jestLib.expect(invokedCommand).toBe(undefined); updateConfig(vscode, elem.config, elem.section, elem.value); - optionObservable.next(Options.Read(vscode)); + optionObservable.next(); }); jestLib.test(`The information message is shown`, async () => { @@ -85,7 +84,7 @@ jestLib.describe('OmniSharpConfigChangeObserver', () => { jestLib.expect(infoMessage).toBe(undefined); jestLib.expect(invokedCommand).toBe(undefined); updateConfig(vscode, elem.config, elem.section, elem.value); - optionObservable.next(Options.Read(vscode)); + optionObservable.next(); }); jestLib.test(`The information message is shown`, async () => { @@ -132,7 +131,7 @@ jestLib.describe('OmniSharpConfigChangeObserver', () => { jestLib.expect(infoMessage).toBe(undefined); jestLib.expect(invokedCommand).toBe(undefined); updateConfig(vscode, elem.config, elem.section, elem.value); - optionObservable.next(Options.Read(vscode)); + optionObservable.next(); jestLib.expect(infoMessage).toBe(undefined); }); }); diff --git a/omnisharptest/omnisharpUnitTests/optionObserver/optionProvider.test.ts b/omnisharptest/omnisharpUnitTests/optionObserver/optionProvider.test.ts deleted file mode 100644 index 288eae67d..000000000 --- a/omnisharptest/omnisharpUnitTests/optionObserver/optionProvider.test.ts +++ /dev/null @@ -1,39 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { should, expect } from 'chai'; -import { getVSCodeWithConfig, updateConfig } from '../../../test/unitTests/fakes'; -import { vscode } from '../../../src/vscodeAdapter'; -import OptionProvider from '../../../src/shared/observers/optionProvider'; -import { Subject } from 'rxjs'; -import { Options } from '../../../src/shared/options'; - -suite('OptionProvider', () => { - suiteSetup(() => should()); - - let vscode: vscode; - let optionProvider: OptionProvider; - let optionObservable: Subject; - - setup(() => { - vscode = getVSCodeWithConfig(); - optionObservable = new Subject(); - optionProvider = new OptionProvider(optionObservable); - }); - - test('Throws exception when no options are pushed', () => { - expect(optionProvider.GetLatestOptions).to.throw(); - }); - - test('Gives the latest options when options are changed', () => { - const changingConfig = 'omnisharp'; - updateConfig(vscode, changingConfig, 'path', 'somePath'); - optionObservable.next(Options.Read(vscode)); - updateConfig(vscode, changingConfig, 'path', 'anotherPath'); - optionObservable.next(Options.Read(vscode)); - const options = optionProvider.GetLatestOptions(); - expect(options.commonOptions.serverPath).to.be.equal('anotherPath'); - }); -}); diff --git a/omnisharptest/omnisharpUnitTests/optionStream.test.ts b/omnisharptest/omnisharpUnitTests/optionStream.test.ts index f861f0c99..21923dbe7 100644 --- a/omnisharptest/omnisharpUnitTests/optionStream.test.ts +++ b/omnisharptest/omnisharpUnitTests/optionStream.test.ts @@ -3,64 +3,36 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { should } from 'chai'; -import { ConfigurationChangeEvent, vscode } from '../../src/vscodeAdapter'; -import { getVSCodeWithConfig, updateConfig } from '../../test/unitTests/fakes'; -import Disposable from '../../src/disposable'; -import { Observable, Subscription } from 'rxjs'; -import { Options } from '../../src/shared/options'; -import { GetConfigChangeEvent } from './testAssets/getConfigChangeEvent'; +import * as vscode from 'vscode'; +import { jest, describe, test, expect, beforeEach } from '@jest/globals'; +import { Observable } from 'rxjs'; import createOptionStream from '../../src/shared/observables/createOptionStream'; +import Disposable from '../../src/disposable'; -suite('OptionStream', () => { - suiteSetup(() => should()); - - let listenerFunction: Array<(e: ConfigurationChangeEvent) => any>; - let vscode: vscode; - let optionStream: Observable; +describe('OptionStream', () => { + let listenerFunction: Array<(e: vscode.ConfigurationChangeEvent) => any>; + let optionStream: Observable; let disposeCalled: boolean; - setup(() => { - listenerFunction = new Array<(e: ConfigurationChangeEvent) => any>(); - vscode = getVSCode(listenerFunction); + beforeEach(() => { + listenerFunction = new Array<(e: vscode.ConfigurationChangeEvent) => any>(); + jest.spyOn(vscode.workspace, 'onDidChangeConfiguration').mockImplementation( + ( + listener: (e: vscode.ConfigurationChangeEvent) => any, + _thisArgs?: any, + _disposables?: vscode.Disposable[] + ) => { + listenerFunction.push(listener); + return new Disposable(() => (disposeCalled = true)); + } + ); + optionStream = createOptionStream(vscode); disposeCalled = false; }); - suite('Returns the recent options to the subscriber', () => { - let subscription: Subscription; - let options: Options; - - setup(() => { - subscription = optionStream.subscribe((newOptions) => (options = newOptions)); - }); - - test('Gives the changed option when the omnisharp config changes', () => { - options.commonOptions.serverPath.should.equal(''); - const changingConfig = 'omnisharp'; - updateConfig(vscode, changingConfig, 'path', 'somePath'); - listenerFunction.forEach((listener) => listener(GetConfigChangeEvent(changingConfig))); - options.commonOptions.serverPath.should.equal('somePath'); - }); - - test('Gives the changed option when the csharp config changes', () => { - options.omnisharpOptions.disableCodeActions.should.equal(false); - const changingConfig = 'csharp'; - updateConfig(vscode, changingConfig, 'disableCodeActions', true); - listenerFunction.forEach((listener) => listener(GetConfigChangeEvent(changingConfig))); - options.omnisharpOptions.disableCodeActions.should.equal(true); - }); - - teardown(() => { - options = undefined!; - listenerFunction = undefined!; - subscription.unsubscribe(); - subscription = undefined!; - }); - }); - test('Dispose is called when the last subscriber unsubscribes', () => { - disposeCalled.should.equal(false); + expect(disposeCalled).toEqual(false); const subscription1 = optionStream.subscribe((_) => { /** empty */ }); @@ -71,26 +43,10 @@ suite('OptionStream', () => { /** empty */ }); subscription1.unsubscribe(); - disposeCalled.should.equal(false); + expect(disposeCalled).toEqual(false); subscription2.unsubscribe(); - disposeCalled.should.equal(false); + expect(disposeCalled).toEqual(false); subscription3.unsubscribe(); - disposeCalled.should.equal(true); + expect(disposeCalled).toEqual(true); }); - - function getVSCode(listenerFunction: Array<(e: ConfigurationChangeEvent) => any>): vscode { - const vscode = getVSCodeWithConfig(); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - vscode.workspace.onDidChangeConfiguration = ( - listener: (e: ConfigurationChangeEvent) => any, - _thisArgs?: any, - _disposables?: Disposable[] - ) => { - listenerFunction.push(listener); - return new Disposable(() => (disposeCalled = true)); - }; - - return vscode; - } }); diff --git a/omnisharptest/omnisharpUnitTests/options.test.ts b/omnisharptest/omnisharpUnitTests/options.test.ts index 1d7e37e48..203168696 100644 --- a/omnisharptest/omnisharpUnitTests/options.test.ts +++ b/omnisharptest/omnisharpUnitTests/options.test.ts @@ -3,133 +3,101 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { should, expect } from 'chai'; -import { Options } from '../../src/shared/options'; -import { getVSCodeWithConfig, updateConfig } from '../../test/unitTests/fakes'; +import * as vscode from 'vscode'; +import { jest, describe, test, expect, beforeEach } from '@jest/globals'; import { URI } from 'vscode-uri'; import * as path from 'path'; +import { commonOptions, omnisharpOptions } from '../../src/shared/options'; +import { getWorkspaceConfiguration } from '../../test/unitTests/fakes'; -suite('Options tests', () => { - suiteSetup(() => should()); - +describe('Options tests', () => { + beforeEach(() => { + jest.spyOn(vscode.workspace, 'getConfiguration').mockReturnValue(getWorkspaceConfiguration()); + }); test('Verify defaults', () => { - const vscode = getVSCodeWithConfig(); - const options = Options.Read(vscode); - options.commonOptions.serverPath.should.equal(''); - options.omnisharpOptions.monoPath.should.equal(''); - options.commonOptions.defaultSolution.should.equal(''); - options.commonOptions.waitForDebugger.should.equal(false); - options.omnisharpOptions.loggingLevel.should.equal('information'); - options.omnisharpOptions.autoStart.should.equal(true); - options.omnisharpOptions.projectLoadTimeout.should.equal(60); - options.omnisharpOptions.maxProjectResults.should.equal(250); - options.omnisharpOptions.useEditorFormattingSettings.should.equal(true); - options.omnisharpOptions.useFormatting.should.equal(true); - options.omnisharpOptions.showReferencesCodeLens.should.equal(true); - options.omnisharpOptions.showTestsCodeLens.should.equal(true); - options.omnisharpOptions.disableCodeActions.should.equal(false); - options.omnisharpOptions.showOmnisharpLogOnError.should.equal(true); - options.omnisharpOptions.minFindSymbolsFilterLength.should.equal(0); - options.omnisharpOptions.maxFindSymbolsItems.should.equal(1000); - options.omnisharpOptions.enableMsBuildLoadProjectsOnDemand.should.equal(false); - options.omnisharpOptions.enableRoslynAnalyzers.should.equal(true); - options.omnisharpOptions.enableEditorConfigSupport.should.equal(true); - options.omnisharpOptions.enableDecompilationSupport.should.equal(false); - options.omnisharpOptions.enableImportCompletion.should.equal(false); - options.omnisharpOptions.enableAsyncCompletion.should.equal(false); - options.omnisharpOptions.analyzeOpenDocumentsOnly.should.equal(true); - options.omnisharpOptions.testRunSettings.should.equal(''); + expect(commonOptions.serverPath).toEqual(''); + expect(omnisharpOptions.monoPath).toEqual(''); + expect(commonOptions.defaultSolution).toEqual(''); + expect(commonOptions.waitForDebugger).toEqual(false); + expect(omnisharpOptions.loggingLevel).toEqual('information'); + expect(omnisharpOptions.autoStart).toEqual(true); + expect(omnisharpOptions.projectLoadTimeout).toEqual(60); + expect(omnisharpOptions.maxProjectResults).toEqual(250); + expect(omnisharpOptions.useEditorFormattingSettings).toEqual(true); + expect(omnisharpOptions.useFormatting).toEqual(true); + expect(omnisharpOptions.showReferencesCodeLens).toEqual(true); + expect(omnisharpOptions.showTestsCodeLens).toEqual(true); + expect(omnisharpOptions.disableCodeActions).toEqual(false); + expect(omnisharpOptions.showOmnisharpLogOnError).toEqual(true); + expect(omnisharpOptions.minFindSymbolsFilterLength).toEqual(0); + expect(omnisharpOptions.maxFindSymbolsItems).toEqual(1000); + expect(omnisharpOptions.enableMsBuildLoadProjectsOnDemand).toEqual(false); + expect(omnisharpOptions.enableRoslynAnalyzers).toEqual(true); + expect(omnisharpOptions.enableEditorConfigSupport).toEqual(true); + expect(omnisharpOptions.enableDecompilationSupport).toEqual(false); + expect(omnisharpOptions.enableImportCompletion).toEqual(false); + expect(omnisharpOptions.enableAsyncCompletion).toEqual(false); + expect(omnisharpOptions.analyzeOpenDocumentsOnly).toEqual(true); + expect(commonOptions.runSettingsPath).toEqual(''); }); test('Verify return no excluded paths when files.exclude empty', () => { - const vscode = getVSCodeWithConfig(); - updateConfig(vscode, undefined, 'files.exclude', {}); + vscode.workspace.getConfiguration().update('files.exclude', {}); - const excludedPaths = Options.getExcludedPaths(vscode); - expect(excludedPaths).to.be.empty; + const excludedPaths = commonOptions.excludePaths; + expect(excludedPaths).toHaveLength(0); }); test('Verify return excluded paths when files.exclude populated', () => { - const vscode = getVSCodeWithConfig(); - updateConfig(vscode, undefined, 'files.exclude', { '**/node_modules': true, '**/assets': false }); + vscode.workspace.getConfiguration().update('files.exclude', { '**/node_modules': true, '**/assets': false }); - const excludedPaths = Options.getExcludedPaths(vscode); - excludedPaths.should.deep.equal(['**/node_modules']); + const excludedPaths = commonOptions.excludePaths; + expect(excludedPaths).toStrictEqual(['**/node_modules']); }); test('Verify return no excluded paths when files.exclude and search.exclude empty', () => { - const vscode = getVSCodeWithConfig(); - updateConfig(vscode, undefined, 'files.exclude', {}); - updateConfig(vscode, undefined, 'search.exclude', {}); - - const excludedPaths = Options.getExcludedPaths(vscode, true); - expect(excludedPaths).to.be.empty; - }); - - test('Verify return excluded paths when files.exclude and search.exclude populated', () => { - const vscode = getVSCodeWithConfig(); - updateConfig(vscode, undefined, 'files.exclude', { '/Library': true }); - updateConfig(vscode, undefined, 'search.exclude', { '**/node_modules': true, '**/assets': false }); + vscode.workspace.getConfiguration().update('files.exclude', {}); + vscode.workspace.getConfiguration().update('search.exclude', {}); - const excludedPaths = Options.getExcludedPaths(vscode, true); - excludedPaths.should.deep.equal(['/Library', '**/node_modules']); + const excludedPaths = commonOptions.excludePaths; + expect(excludedPaths).toHaveLength(0); }); test('BACK-COMPAT: "omnisharp.loggingLevel": "verbose" == "omnisharp.loggingLevel": "debug"', () => { - const vscode = getVSCodeWithConfig(); - updateConfig(vscode, 'omnisharp', 'loggingLevel', 'verbose'); + vscode.workspace.getConfiguration().update('omnisharp.loggingLevel', 'verbose'); - const options = Options.Read(vscode); - - options.omnisharpOptions.loggingLevel.should.equal('debug'); + expect(omnisharpOptions.loggingLevel).toEqual('debug'); }); test('BACK-COMPAT: "csharp.omnisharp" is used if it is set and "omnisharp.path" is not', () => { - const vscode = getVSCodeWithConfig(); - updateConfig(vscode, 'csharp', 'omnisharp', 'OldPath'); - - const options = Options.Read(vscode); + vscode.workspace.getConfiguration().update('csharp.omnisharp', 'OldPath'); - options.commonOptions.serverPath.should.equal('OldPath'); + expect(commonOptions.serverPath).toEqual('OldPath'); }); test('BACK-COMPAT: "csharp.omnisharp" is not used if "omnisharp.path" is set', () => { - const vscode = getVSCodeWithConfig(); - updateConfig(vscode, 'omnisharp', 'path', 'NewPath'); - updateConfig(vscode, 'csharp', 'omnisharp', 'OldPath'); - - const options = Options.Read(vscode); + vscode.workspace.getConfiguration().update('omnisharp.path', 'NewPath'); + vscode.workspace.getConfiguration().update('csharp.omnisharp', 'OldPath'); - options.commonOptions.serverPath.should.equal('NewPath'); + expect(commonOptions.serverPath).toEqual('NewPath'); }); test('"omnisharp.defaultLaunchSolution" is used if set', () => { - const vscode = getVSCodeWithConfig(); const workspaceFolderUri = URI.file('/Test'); - vscode.workspace.workspaceFolders = [{ index: 0, name: 'Test', uri: workspaceFolderUri }]; + jest.replaceProperty(vscode.workspace, 'workspaceFolders', [ + { index: 0, name: 'Test', uri: workspaceFolderUri }, + ]); - updateConfig(vscode, 'omnisharp', 'defaultLaunchSolution', 'some_valid_solution.sln'); + vscode.workspace.getConfiguration().update('omnisharp.defaultLaunchSolution', 'some_valid_solution.sln'); - const options = Options.Read(vscode); - - options.commonOptions.defaultSolution.should.equals( - path.join(workspaceFolderUri.fsPath, 'some_valid_solution.sln') - ); + expect(commonOptions.defaultSolution).toEqual(path.join(workspaceFolderUri.fsPath, 'some_valid_solution.sln')); }); test('"omnisharp.testRunSettings" is used if set', () => { - const vscode = getVSCodeWithConfig(); - updateConfig( - vscode, - 'omnisharp', - 'testRunSettings', - 'some_valid_path\\some_valid_runsettings_files.runsettings' - ); - - const options = Options.Read(vscode); - - options.omnisharpOptions.testRunSettings.should.equal( - 'some_valid_path\\some_valid_runsettings_files.runsettings' - ); + vscode.workspace + .getConfiguration() + .update('omnisharp.testRunSettings', 'some_valid_path\\some_valid_runsettings_files.runsettings'); + + expect(commonOptions.runSettingsPath).toEqual('some_valid_path\\some_valid_runsettings_files.runsettings'); }); }); diff --git a/omnisharptest/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts b/omnisharptest/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts index 2787f034e..6468a0f6e 100644 --- a/omnisharptest/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts +++ b/omnisharptest/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts @@ -3,12 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import * as path from 'path'; -import * as chaiAsPromised from 'chai-as-promised'; -import * as chai from 'chai'; import * as util from '../../../src/common'; import { CreateTmpDir, TmpAsset } from '../../../src/createTmpAsset'; -import TestZip from '../testAssets/testZip'; +import TestZip from '../../omnisharpUnitTests/testAssets/testZip'; import { downloadAndInstallPackages } from '../../../src/packageManager/downloadAndInstallPackages'; import NetworkSettings from '../../../src/networkSettings'; import { EventStream } from '../../../src/eventStream'; @@ -23,17 +22,14 @@ import { DownloadFailure, InstallationFailure, } from '../../../src/omnisharp/loggingEvents'; -import MockHttpsServer from '../testAssets/mockHttpsServer'; -import { createTestFile } from '../testAssets/testFile'; -import TestEventBus from '../testAssets/testEventBus'; +import MockHttpsServer from '../../omnisharpUnitTests/testAssets/mockHttpsServer'; +import { createTestFile } from '../../omnisharpUnitTests/testAssets/testFile'; +import TestEventBus from '../../omnisharpUnitTests/testAssets/testEventBus'; import { AbsolutePathPackage } from '../../../src/packageManager/absolutePathPackage'; import { AbsolutePath } from '../../../src/packageManager/absolutePath'; import { DownloadValidator } from '../../../src/packageManager/isValidDownload'; -chai.use(chaiAsPromised); -const expect = chai.expect; - -suite(`${downloadAndInstallPackages.name}`, () => { +describe(`${downloadAndInstallPackages.name}`, () => { let tmpInstallDir: TmpAsset; let server: MockHttpsServer; let testZip: TestZip; @@ -47,7 +43,7 @@ suite(`${downloadAndInstallPackages.name}`, () => { const packageDescription = 'Test Package'; const networkSettingsProvider = () => new NetworkSettings('', false); - setup(async () => { + beforeEach(async () => { eventStream = new EventStream(); server = await MockHttpsServer.CreateMockHttpsServer(); eventBus = new TestEventBus(eventStream); @@ -85,7 +81,7 @@ suite(`${downloadAndInstallPackages.name}`, () => { server.addRequestHandler('GET', '/notDownloadablePackage', 404); }); - suite('If the download and install succeeds', () => { + describe('If the download and install succeeds', () => { test('The expected files are installed at the specified path', async () => { await downloadAndInstallPackages( downloadablePackage, @@ -95,7 +91,7 @@ suite(`${downloadAndInstallPackages.name}`, () => { ); for (const elem of testZip.files) { const filePath = path.join(tmpDirPath, elem.path); - expect(await util.fileExists(filePath)).to.be.true; + expect(await util.fileExists(filePath)).toBe(true); } }); @@ -106,7 +102,7 @@ suite(`${downloadAndInstallPackages.name}`, () => { eventStream, downloadValidator ); - expect(await util.fileExists(path.join(tmpDirPath, 'install.Lock'))).to.be.true; + expect(await util.fileExists(path.join(tmpDirPath, 'install.Lock'))).toBe(true); }); test('Events are created in the correct order', async () => { @@ -125,7 +121,7 @@ suite(`${downloadAndInstallPackages.name}`, () => { eventStream, downloadValidator ); - expect(eventBus.getEvents()).to.be.deep.equal(eventsSequence); + expect(eventBus.getEvents()).toStrictEqual(eventsSequence); }); test('If the download validation fails for the first time and passed second time, the correct events are logged', async () => { @@ -159,11 +155,11 @@ suite(`${downloadAndInstallPackages.name}`, () => { eventStream, downloadValidator ); - expect(eventBus.getEvents()).to.be.deep.equal(eventsSequence); + expect(eventBus.getEvents()).toStrictEqual(eventsSequence); }); }); - suite('If the download and install fails', () => { + describe('If the download and install fails', () => { test('If the download succeeds but the validation fails, events are logged', async () => { const downloadValidator = () => false; const eventsSequence = [ @@ -186,7 +182,7 @@ suite(`${downloadAndInstallPackages.name}`, () => { eventStream, downloadValidator ); - expect(eventBus.getEvents()).to.be.deep.equal(eventsSequence); + expect(eventBus.getEvents()).toStrictEqual(eventsSequence); }); test('Returns false when the download fails', async () => { @@ -203,12 +199,12 @@ suite(`${downloadAndInstallPackages.name}`, () => { downloadValidator ); const obtainedEvents = eventBus.getEvents(); - expect(obtainedEvents[0]).to.be.deep.equal(eventsSequence[0]); - expect(obtainedEvents[1]).to.be.deep.equal(eventsSequence[1]); - expect(obtainedEvents[2]).to.be.deep.equal(eventsSequence[2]); + expect(obtainedEvents[0]).toStrictEqual(eventsSequence[0]); + expect(obtainedEvents[1]).toStrictEqual(eventsSequence[1]); + expect(obtainedEvents[2]).toStrictEqual(eventsSequence[2]); const installationFailureEvent = obtainedEvents[3]; - expect(installationFailureEvent.stage).to.be.equal('downloadPackage'); - expect(installationFailureEvent.error).to.not.be.null; + expect(installationFailureEvent.stage).toEqual('downloadPackage'); + expect(installationFailureEvent.error).not.toBe(null); }); test('install.Lock is not present when the download fails', async () => { @@ -218,11 +214,11 @@ suite(`${downloadAndInstallPackages.name}`, () => { eventStream, downloadValidator ); - expect(await util.fileExists(path.join(tmpDirPath, 'install.Lock'))).to.be.false; + expect(await util.fileExists(path.join(tmpDirPath, 'install.Lock'))).toBe(false); }); }); - teardown(async () => { + afterEach(async () => { if (tmpInstallDir) { tmpInstallDir.dispose(); } diff --git a/omnisharptest/omnisharpUnitTests/packages/fileDownloader.test.ts b/omnisharptest/omnisharpUnitTests/packages/fileDownloader.test.ts index b239e1ae7..852f1c0a1 100644 --- a/omnisharptest/omnisharpUnitTests/packages/fileDownloader.test.ts +++ b/omnisharptest/omnisharpUnitTests/packages/fileDownloader.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as chai from 'chai'; +import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import { EventStream } from '../../../src/eventStream'; import { DownloadFile } from '../../../src/packageManager/fileDownloader'; import NetworkSettings from '../../../src/networkSettings'; @@ -15,12 +15,10 @@ import { DownloadFallBack, DownloadFailure, } from '../../../src/omnisharp/loggingEvents'; -import MockHttpsServer from '../testAssets/mockHttpsServer'; -import TestEventBus from '../testAssets/testEventBus'; +import MockHttpsServer from '../../omnisharpUnitTests/testAssets/mockHttpsServer'; +import TestEventBus from '../../omnisharpUnitTests/testAssets/testEventBus'; -const expect = chai.expect; - -suite('FileDownloader', () => { +describe('FileDownloader', () => { const fileDescription = 'Test file'; const correctUrlPath = `/resource`; const redirectUrlPath = '/redirectResource'; @@ -50,7 +48,7 @@ suite('FileDownloader', () => { let server: MockHttpsServer; - setup(async () => { + beforeEach(async () => { server = await MockHttpsServer.CreateMockHttpsServer(); await server.start(); eventBus = new TestEventBus(eventStream); @@ -59,7 +57,7 @@ suite('FileDownloader', () => { server.addRequestHandler('GET', redirectUrlPath, 301, { location: `${server.baseUrl}${correctUrlPath}` }); }); - suite('If the response status Code is 200, the download succeeds', () => { + describe('If the response status Code is 200, the download succeeds', () => { [ { description: 'Primary url', @@ -74,7 +72,7 @@ suite('FileDownloader', () => { getEventSequence: getFallBackURLEvents, }, ].forEach((elem) => { - suite(elem.description, () => { + describe(elem.description, () => { test('File is downloaded', async () => { const buffer = await DownloadFile( fileDescription, @@ -84,7 +82,7 @@ suite('FileDownloader', () => { getURL(elem.fallBackUrlPath) ); const text = buffer.toString('utf8'); - expect(text).to.be.equal('Test content'); + expect(text).toEqual('Test content'); }); test('Events are created in the correct order', async () => { @@ -95,13 +93,13 @@ suite('FileDownloader', () => { getURL(elem.urlPath), getURL(elem.fallBackUrlPath) ); - expect(eventBus.getEvents()).to.be.deep.equal(elem.getEventSequence()); + expect(eventBus.getEvents()).toStrictEqual(elem.getEventSequence()); }); }); }); }); - suite('If the response status Code is 301, redirect occurs and the download succeeds', () => { + describe('If the response status Code is 301, redirect occurs and the download succeeds', () => { test('File is downloaded from the redirect url', async () => { const buffer = await DownloadFile( fileDescription, @@ -110,11 +108,11 @@ suite('FileDownloader', () => { getURL(redirectUrlPath) ); const text = buffer.toString('utf8'); - expect(text).to.be.equal('Test content'); + expect(text).toEqual('Test content'); }); }); - suite('If the response status code is not 301, 302 or 200 then the download fails', () => { + describe('If the response status code is not 301, 302 or 200 then the download fails', () => { test('Error is thrown', async () => { const downloadPromise = DownloadFile( fileDescription, @@ -127,7 +125,7 @@ suite('FileDownloader', () => { } catch { /* empty */ } - expect(downloadPromise).be.rejected; + expect(downloadPromise).rejects.toThrow(); }); test('Download Start and Download Failure events are created', async () => { @@ -138,12 +136,12 @@ suite('FileDownloader', () => { try { await DownloadFile(fileDescription, eventStream, networkSettingsProvider, getURL(errorUrlPath)); } catch (error) { - expect(eventBus.getEvents()).to.be.deep.equal(eventsSequence); + expect(eventBus.getEvents()).toStrictEqual(eventsSequence); } }); }); - teardown(async () => { + afterEach(async () => { await server.stop(); eventBus.dispose(); }); diff --git a/omnisharptest/omnisharpUnitTests/packages/isValidDownload.test.ts b/omnisharptest/omnisharpUnitTests/packages/isValidDownload.test.ts index d2186d873..21430cf2c 100644 --- a/omnisharptest/omnisharpUnitTests/packages/isValidDownload.test.ts +++ b/omnisharptest/omnisharpUnitTests/packages/isValidDownload.test.ts @@ -3,29 +3,26 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { describe, test, expect } from '@jest/globals'; import { isValidDownload } from '../../../src/packageManager/isValidDownload'; -import * as chai from 'chai'; import { EventStream } from '../../../src/eventStream'; -chai.should(); -const expect = chai.expect; - -suite(`${isValidDownload.name}`, () => { +describe(`${isValidDownload.name}`, () => { const sampleBuffer = Buffer.from('sampleBuffer'); const validIntegrity = 'eb7201b5d986919e0ac67c820886358869d8f7059193d33c902ad7fe1688e1e9'; test('Returns false for non-matching integrity', async () => { const result = await isValidDownload(sampleBuffer, 'inValidIntegrity', new EventStream()); - expect(result).to.be.false; + expect(result).toBe(false); }); test('Returns true for matching integrity', async () => { const result = await isValidDownload(sampleBuffer, validIntegrity, new EventStream()); - expect(result).to.be.true; + expect(result).toBe(true); }); test('Returns true if no integrity has been specified', async () => { const result = await isValidDownload(sampleBuffer, undefined, new EventStream()); - expect(result).to.be.true; + expect(result).toBe(true); }); }); diff --git a/omnisharptest/omnisharpUnitTests/packages/packageFilterer.test.ts b/omnisharptest/omnisharpUnitTests/packages/packageFilterer.test.ts index c576a4510..a65405ce9 100644 --- a/omnisharptest/omnisharpUnitTests/packages/packageFilterer.test.ts +++ b/omnisharptest/omnisharpUnitTests/packages/packageFilterer.test.ts @@ -2,19 +2,16 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as chai from 'chai'; +import { describe, test, expect, beforeEach, jest } from '@jest/globals'; import { PlatformInformation } from '../../../src/shared/platform'; import { getNotInstalledPackagesForPlatform } from '../../../src/packageManager/packageFilterer'; import { Package } from '../../../src/packageManager/package'; import { AbsolutePathPackage } from '../../../src/packageManager/absolutePathPackage'; +import { MockedFunction } from 'jest-mock'; +import * as fs from 'fs'; import { join } from 'path'; -const expect = chai.expect; -// There are no typings for this library. -// eslint-disable-next-line @typescript-eslint/no-var-requires -const mock = require('mock-fs'); - -suite(`${getNotInstalledPackagesForPlatform.name}`, () => { +describe(`${getNotInstalledPackagesForPlatform.name}`, () => { let absolutePathPackages: AbsolutePathPackage[]; const extensionPath = '/ExtensionPath'; const packages = [ @@ -57,34 +54,40 @@ suite(`${getNotInstalledPackagesForPlatform.name}`, () => { }, ]; - setup(async () => { + beforeEach(async () => { absolutePathPackages = packages.map((pkg) => AbsolutePathPackage.getAbsolutePathPackage(pkg, extensionPath)); const installLockPath = join(absolutePathPackages[1].installPath.value, 'install.Lock'); //mock the install lock path so the package should be filtered - mock({ - [installLockPath]: 'no content', + const statSpy = jest.spyOn(fs, 'stat') as unknown as MockedFunction< + ( + path: fs.PathLike, + callback: (err: NodeJS.ErrnoException | null, stats: fs.Stats | undefined) => void + ) => void + >; + statSpy.mockImplementation((path, callback) => { + if (installLockPath === path) { + callback(null, { isFile: () => true } as unknown as fs.Stats); + } else { + callback(null, undefined); + } }); }); test('Filters the packages based on Platform Information', async () => { const platformInfo = new PlatformInformation('win32', 'architecture2'); const filteredPackages = await getNotInstalledPackagesForPlatform(absolutePathPackages, platformInfo); - expect(filteredPackages.length).to.be.equal(1); - expect(filteredPackages[0].description).to.be.equal('win32-Architecture2 uninstalled package'); - expect(filteredPackages[0].platforms[0]).to.be.equal('win32'); - expect(filteredPackages[0].architectures[0]).to.be.equal('architecture2'); + expect(filteredPackages.length).toEqual(1); + expect(filteredPackages[0].description).toEqual('win32-Architecture2 uninstalled package'); + expect(filteredPackages[0].platforms[0]).toEqual('win32'); + expect(filteredPackages[0].architectures[0]).toEqual('architecture2'); }); test('Returns only the packages where install.Lock is not present', async () => { const platformInfo = new PlatformInformation('linux', 'architecture1'); const filteredPackages = await getNotInstalledPackagesForPlatform(absolutePathPackages, platformInfo); - expect(filteredPackages.length).to.be.equal(1); - expect(filteredPackages[0].description).to.be.equal('linux-Architecture1 uninstalled package'); - expect(filteredPackages[0].platforms[0]).to.be.equal('linux'); - expect(filteredPackages[0].architectures[0]).to.be.equal('architecture1'); - }); - - teardown(() => { - mock.restore(); + expect(filteredPackages.length).toEqual(1); + expect(filteredPackages[0].description).toEqual('linux-Architecture1 uninstalled package'); + expect(filteredPackages[0].platforms[0]).toEqual('linux'); + expect(filteredPackages[0].architectures[0]).toEqual('architecture1'); }); }); diff --git a/omnisharptest/omnisharpUnitTests/packages/zipInstaller.test.ts b/omnisharptest/omnisharpUnitTests/packages/zipInstaller.test.ts index 908e18f5f..66be19b33 100644 --- a/omnisharptest/omnisharpUnitTests/packages/zipInstaller.test.ts +++ b/omnisharptest/omnisharpUnitTests/packages/zipInstaller.test.ts @@ -3,23 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import * as fs from 'async-file'; import * as path from 'path'; -import * as chai from 'chai'; import * as util from '../../../src/common'; import { CreateTmpDir, TmpAsset } from '../../../src/createTmpAsset'; import { InstallZip } from '../../../src/packageManager/zipInstaller'; import { EventStream } from '../../../src/eventStream'; import { PlatformInformation } from '../../../src/shared/platform'; import { BaseEvent, InstallationStart, ZipError } from '../../../src/omnisharp/loggingEvents'; -import { createTestFile } from '../testAssets/testFile'; -import TestZip from '../testAssets/testZip'; -import TestEventBus from '../testAssets/testEventBus'; +import { createTestFile } from '../../omnisharpUnitTests/testAssets/testFile'; +import TestZip from '../../omnisharpUnitTests/testAssets/testZip'; +import TestEventBus from '../../omnisharpUnitTests/testAssets/testEventBus'; import { AbsolutePath } from '../../../src/packageManager/absolutePath'; -const expect = chai.expect; - -suite('ZipInstaller', () => { +describe('ZipInstaller', () => { const binaries = [createTestFile('binary1', 'binary1.txt'), createTestFile('binary2', 'binary2.txt')]; const files = [createTestFile('file1', 'file1.txt'), createTestFile('file2', 'folder/file2.txt')]; @@ -31,7 +29,7 @@ suite('ZipInstaller', () => { let eventStream: EventStream; let eventBus: TestEventBus; - setup(async () => { + beforeEach(async () => { eventStream = new EventStream(); eventBus = new TestEventBus(eventStream); tmpInstallDir = await CreateTmpDir(true); @@ -44,14 +42,14 @@ suite('ZipInstaller', () => { await InstallZip(testZip.buffer, fileDescription, installationPath, [], eventStream); for (const elem of testZip.files) { const filePath = path.join(installationPath.value, elem.path); - expect(await util.fileExists(filePath)).to.be.true; + expect(await util.fileExists(filePath)).toBe(true); } }); test('The folder is unzipped and all the expected events are created', async () => { await InstallZip(testZip.buffer, fileDescription, installationPath, [], eventStream); const eventSequence: BaseEvent[] = [new InstallationStart(fileDescription)]; - expect(eventBus.getEvents()).to.be.deep.equal(eventSequence); + expect(eventBus.getEvents()).toStrictEqual(eventSequence); }); test('The folder is unzipped and the binaries have the expected permissions(except on Windows)', async () => { @@ -61,16 +59,17 @@ suite('ZipInstaller', () => { ); await InstallZip(testZip.buffer, fileDescription, installationPath, absoluteBinaries, eventStream); for (const binaryPath of absoluteBinaries) { - expect(await util.fileExists(binaryPath.value)).to.be.true; + expect(await util.fileExists(binaryPath.value)).toBe(true); const mode = (await fs.stat(binaryPath.value)).mode; - expect(mode & 0o7777).to.be.equal(0o755, `Expected mode for path ${binaryPath}`); + expect(mode & 0o7777).toEqual(0o755); } } }); test('Error is thrown when the buffer contains an invalid zip', async () => { - expect(InstallZip(Buffer.from('My file', 'utf8'), 'Text File', installationPath, [], eventStream)).to.be - .rejected; + expect( + InstallZip(Buffer.from('My file', 'utf8'), 'Text File', installationPath, [], eventStream) + ).rejects.toThrow(); }); test('Error event is created when the buffer contains an invalid zip', async () => { @@ -83,11 +82,11 @@ suite('ZipInstaller', () => { 'C# Extension was unable to download its dependencies. Please check your internet connection. If you use a proxy server, please visit https://aka.ms/VsCodeCsharpNetworking' ), ]; - expect(eventBus.getEvents()).to.be.deep.equal(eventSequence); + expect(eventBus.getEvents()).toStrictEqual(eventSequence); } }); - teardown(async () => { + afterEach(async () => { if (tmpInstallDir) { tmpInstallDir.dispose(); } diff --git a/omnisharptest/omnisharpUnitTests/platform.test.ts b/omnisharptest/omnisharpUnitTests/platform.test.ts index c677b53a9..ed0385192 100644 --- a/omnisharptest/omnisharpUnitTests/platform.test.ts +++ b/omnisharptest/omnisharpUnitTests/platform.test.ts @@ -3,38 +3,36 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { describe, test, expect } from '@jest/globals'; import { LinuxDistribution } from '../../src/shared/platform'; -import { should } from 'chai'; - -suite('Platform', () => { - suiteSetup(() => should()); +describe('Platform', () => { test('Retrieve correct information for Ubuntu 14.04', () => { const dist = distro_ubuntu_14_04(); - dist.name.should.equal('ubuntu'); - dist.version.should.equal('14.04'); + expect(dist.name).toBe('ubuntu'); + expect(dist.version).toBe('14.04'); }); test('Retrieve correct information for Fedora 23', () => { const dist = distro_fedora_23(); - dist.name.should.equal('fedora'); - dist.version.should.equal('23'); + expect(dist.name).toBe('fedora'); + expect(dist.version).toBe('23'); }); test('Retrieve correct information for Debian 8', () => { const dist = distro_debian_8(); - dist.name.should.equal('debian'); - dist.version.should.equal('8'); + expect(dist.name).toBe('debian'); + expect(dist.version).toBe('8'); }); test('Retrieve correct information for CentOS 7', () => { const dist = distro_centos_7(); - dist.name.should.equal('centos'); - dist.version.should.equal('7'); + expect(dist.name).toBe('centos'); + expect(dist.version).toBe('7'); }); }); diff --git a/package-lock.json b/package-lock.json index da909635e..2ba2f52de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "csharp", - "version": "v2.0.436", + "version": "2.7.25", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "csharp", - "version": "v2.0.436", + "version": "2.7.25", "license": "SEE LICENSE IN RuntimeLicenses/license.txt", "dependencies": { "@microsoft/servicehub-framework": "4.2.99-beta", @@ -14,8 +14,10 @@ "@types/cross-spawn": "6.0.2", "@vscode/debugprotocol": "1.56.0", "@vscode/extension-telemetry": "0.6.2", + "@vscode/js-debug-browsers": "^1.1.0", "async-file": "2.0.2", "cross-spawn": "6.0.5", + "execa": "4.0.0", "fs-extra": "9.1.0", "http-proxy-agent": "4.0.1", "https-proxy-agent": "5.0.0", @@ -26,7 +28,7 @@ "ps-list": "7.2.0", "request-light": "0.4.0", "rxjs": "6.6.7", - "semver": "5.7.2", + "semver": "7.5.4", "stream": "0.0.2", "strip-bom": "5.0.0", "strip-bom-buf": "2.0.0", @@ -34,7 +36,6 @@ "tmp": "0.0.33", "uuid": "^9.0.0", "vscode-html-languageservice": "^5.0.1", - "vscode-js-debug-browsers": "^1.0.5", "vscode-jsonrpc": "8.2.0-next.0", "vscode-languageclient": "8.2.0-next.1", "vscode-languageserver-protocol": "3.17.4-next.1", @@ -55,7 +56,7 @@ "@types/minimist": "1.2.1", "@types/mocha": "5.2.5", "@types/node": "16.11.38", - "@types/semver": "5.5.0", + "@types/semver": "7.3.13", "@types/tar": "6.1.5", "@types/tmp": "0.0.33", "@types/unzipper": "^0.9.1", @@ -65,6 +66,7 @@ "@typescript-eslint/eslint-plugin": "^5.61.0", "@typescript-eslint/parser": "^5.61.0", "@vscode/test-electron": "2.3.4", + "@vscode/vsce": "2.21.0", "archiver": "5.3.0", "chai": "4.3.4", "chai-arrays": "2.2.0", @@ -101,7 +103,8 @@ "ts-node": "9.1.1", "typescript": "^5.1.6", "unzipper": "0.10.11", - "vsce": "2.9.2", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "^6.0.0", "vscode-uri": "^3.0.7", "webpack": "5.76.0", "webpack-cli": "4.6.0" @@ -124,12 +127,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", - "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.10", + "@babel/highlight": "^7.22.13", "chalk": "^2.4.2" }, "engines": { @@ -208,12 +211,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.22.10", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -275,22 +278,22 @@ "dev": true }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -382,9 +385,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -414,12 +417,12 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, @@ -428,9 +431,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", - "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -617,33 +620,33 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz", - "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.10", - "@babel/types": "^7.22.10", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -684,13 +687,13 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", - "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1399,21 +1402,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/@jest/reporters/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@jest/reporters/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2543,9 +2531,9 @@ "dev": true }, "node_modules/@types/semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==", + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", "dev": true }, "node_modules/@types/stack-utils": { @@ -2709,21 +2697,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@typescript-eslint/parser": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", @@ -2933,21 +2906,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@typescript-eslint/utils": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", @@ -2980,21 +2938,6 @@ "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", "dev": true }, - "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", @@ -3036,6 +2979,98 @@ "vscode": "^1.60.0" } }, + "node_modules/@vscode/js-debug-browsers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@vscode/js-debug-browsers/-/js-debug-browsers-1.1.0.tgz", + "integrity": "sha512-v2hkBzA3DlUYxq3fMpCR8xuzmYjkoYjy276XA7mzZVstsFYkfbsOkluRwulrbqEEsjy3XObPNZq+A3ZZkpC+Gw==", + "dependencies": { + "execa": "^4.0.0" + } + }, + "node_modules/@vscode/js-debug-browsers/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@vscode/js-debug-browsers/node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/@vscode/js-debug-browsers/node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/@vscode/js-debug-browsers/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@vscode/js-debug-browsers/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@vscode/js-debug-browsers/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@vscode/js-debug-browsers/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@vscode/test-electron": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.4.tgz", @@ -3051,21 +3086,110 @@ "node": ">=16" } }, - "node_modules/@vscode/test-electron/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/@vscode/vsce": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.21.0.tgz", + "integrity": "sha512-KuxYqScqUY/duJbkj9eE2tN2X/WJoGAy54hHtxT3ZBkM6IzrOg7H7CXGUPBxNlmqku2w/cAjOUSrgIHlzz0mbA==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" + "azure-devops-node-api": "^11.0.1", + "chalk": "^2.4.2", + "cheerio": "^1.0.0-rc.9", + "commander": "^6.2.1", + "glob": "^7.0.6", + "hosted-git-info": "^4.0.2", + "jsonc-parser": "^3.2.0", + "leven": "^3.1.0", + "markdown-it": "^12.3.2", + "mime": "^1.3.4", + "minimatch": "^3.0.3", + "parse-semver": "^1.1.1", + "read": "^1.0.7", + "semver": "^7.5.2", + "tmp": "^0.2.1", + "typed-rest-client": "^1.8.4", + "url-join": "^4.0.1", + "xml2js": "^0.5.0", + "yauzl": "^2.3.1", + "yazl": "^2.2.2" }, "bin": { - "semver": "bin/semver.js" + "vsce": "vsce" + }, + "engines": { + "node": ">= 14" + }, + "optionalDependencies": { + "keytar": "^7.7.0" + } + }, + "node_modules/@vscode/vsce/node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@vscode/vsce/node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" }, "engines": { "node": ">=10" } }, + "node_modules/@vscode/vsce/node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "node_modules/@vscode/vsce/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@vscode/vsce/node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/@vscode/vsce/node_modules/xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dev": true, + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -4528,21 +4652,6 @@ "semver": "^7.0.0" } }, - "node_modules/builtins/node_modules/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -4822,7 +4931,8 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true + "dev": true, + "optional": true }, "node_modules/chrome-trace-event": { "version": "1.0.2", @@ -5295,6 +5405,14 @@ "node": ">=4.8" } }, + "node_modules/cross-spawn/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/css-select": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", @@ -5364,6 +5482,7 @@ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, + "optional": true, "dependencies": { "mimic-response": "^3.1.0" }, @@ -5405,6 +5524,7 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, + "optional": true, "engines": { "node": ">=4.0.0" } @@ -5576,6 +5696,7 @@ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", "dev": true, + "optional": true, "engines": { "node": ">=8" } @@ -6362,21 +6483,6 @@ "node": "*" } }, - "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-plugin-prettier": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", @@ -6563,21 +6669,6 @@ "regexp-tree": "~0.1.1" } }, - "node_modules/eslint-plugin-unicorn/node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-plugin-unicorn/node_modules/type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", @@ -6966,9 +7057,9 @@ } }, "node_modules/execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.0.tgz", + "integrity": "sha512-JbDUxwV3BoT5ZVXQrSVbAiaXhXUkIwvbhPIwZ0N13kX+5yCzOhUNdocxB/UQRuYOHRYYwAxKYwJYc0T4D12pDA==", "dependencies": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", @@ -7123,6 +7214,7 @@ "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", "dev": true, + "optional": true, "engines": { "node": ">=6" } @@ -7844,7 +7936,8 @@ "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "dev": true + "dev": true, + "optional": true }, "node_modules/glob": { "version": "7.2.0", @@ -11043,21 +11136,6 @@ "node": ">=8" } }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-snapshot/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -11482,21 +11560,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/jsonwebtoken/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", @@ -11542,6 +11605,7 @@ "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", "dev": true, "hasInstallScript": true, + "optional": true, "dependencies": { "node-addon-api": "^4.3.0", "prebuild-install": "^7.0.1" @@ -11933,21 +11997,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -12233,20 +12282,6 @@ "vscode": "1.69.0" } }, - "node_modules/microsoft.aspnetcore.razor.vscode/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/microsoft.aspnetcore.razor.vscode/node_modules/vscode-jsonrpc": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz", @@ -12323,6 +12358,7 @@ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true, + "optional": true, "engines": { "node": ">=10" }, @@ -12429,7 +12465,8 @@ "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true + "dev": true, + "optional": true }, "node_modules/mocha": { "version": "10.0.0", @@ -12821,7 +12858,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "dev": true + "dev": true, + "optional": true }, "node_modules/natural-compare": { "version": "1.4.0", @@ -12894,6 +12932,7 @@ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.22.0.tgz", "integrity": "sha512-u4uAs/4Zzmp/jjsD9cyFYDXeISfUWaAVWshPmDZOFOv4Xl4SbzTXm53I04C2uRueYJ+0t5PEtLH/owbn2Npf/w==", "dev": true, + "optional": true, "dependencies": { "semver": "^7.3.5" }, @@ -12901,26 +12940,12 @@ "node": ">=10" } }, - "node_modules/node-abi/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/node-addon-api": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", - "dev": true + "dev": true, + "optional": true }, "node_modules/node-int64": { "version": "0.4.0", @@ -12951,6 +12976,15 @@ "validate-npm-package-license": "^3.0.1" } }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -13397,6 +13431,15 @@ "semver": "^5.1.0" } }, + "node_modules/parse-semver/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -13686,6 +13729,7 @@ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", "dev": true, + "optional": true, "dependencies": { "detect-libc": "^2.0.0", "expand-template": "^2.0.3", @@ -14000,6 +14044,7 @@ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, + "optional": true, "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -14015,6 +14060,7 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true, + "optional": true, "engines": { "node": ">=0.10.0" } @@ -14550,11 +14596,17 @@ } }, "node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/semver-greatest-satisfied-range": { @@ -14709,7 +14761,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "optional": true }, "node_modules/simple-get": { "version": "4.0.1", @@ -14730,6 +14783,7 @@ "url": "https://feross.org/support" } ], + "optional": true, "dependencies": { "decompress-response": "^6.0.0", "once": "^1.3.1", @@ -15302,6 +15356,7 @@ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, + "optional": true, "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -15627,21 +15682,6 @@ } } }, - "node_modules/ts-jest/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/ts-jest/node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", @@ -15742,21 +15782,6 @@ "node": ">=8.6" } }, - "node_modules/ts-loader/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/ts-loader/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -15871,6 +15896,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, + "optional": true, "dependencies": { "safe-buffer": "^5.0.1" }, @@ -16393,88 +16419,6 @@ "node": ">=0.10.0" } }, - "node_modules/vsce": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-2.9.2.tgz", - "integrity": "sha512-xyLqL4U82BilUX1t6Ym2opQEa2tLGWYjbgB7+ETeNVXlIJz5sWBJjQJSYJVFOKJSpiOtQclolu88cj7oY6vvPQ==", - "dev": true, - "dependencies": { - "azure-devops-node-api": "^11.0.1", - "chalk": "^2.4.2", - "cheerio": "^1.0.0-rc.9", - "commander": "^6.1.0", - "glob": "^7.0.6", - "hosted-git-info": "^4.0.2", - "keytar": "^7.7.0", - "leven": "^3.1.0", - "markdown-it": "^12.3.2", - "mime": "^1.3.4", - "minimatch": "^3.0.3", - "parse-semver": "^1.1.1", - "read": "^1.0.7", - "semver": "^5.1.0", - "tmp": "^0.2.1", - "typed-rest-client": "^1.8.4", - "url-join": "^4.0.1", - "xml2js": "^0.4.23", - "yauzl": "^2.3.1", - "yazl": "^2.2.2" - }, - "bin": { - "vsce": "vsce" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/vsce/node_modules/commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/vsce/node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/vsce/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/vsce/node_modules/tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dev": true, - "dependencies": { - "rimraf": "^3.0.0" - }, - "engines": { - "node": ">=8.17.0" - } - }, "node_modules/vscode-html-languageservice": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-5.0.4.tgz", @@ -16491,15 +16435,6 @@ "resolved": "https://registry.npmjs.org/@vscode/l10n/-/l10n-0.0.11.tgz", "integrity": "sha512-ukOMWnCg1tCvT7WnDfsUKQOFDQGsyR5tNgRpwmqi+5/vzU3ghdDXzvIM4IOPdSb3OeSsBNvmSL8nxIVOqi2WXA==" }, - "node_modules/vscode-js-debug-browsers": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/vscode-js-debug-browsers/-/vscode-js-debug-browsers-1.0.5.tgz", - "integrity": "sha512-p4/ItCYUbTAuMAyVIt23m6/W5ZHK/ruWsNJpbtTz0sYsrYQmGF7L5/hDPMTGBNIaQb9SDobn3asuoR479x8Z6Q==", - "deprecated": "This package has been renamed to @vscode/js-debug-browsers, please update to the new name", - "dependencies": { - "execa": "^4.0.0" - } - }, "node_modules/vscode-jsonrpc": { "version": "8.2.0-next.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0-next.0.tgz", @@ -16540,20 +16475,6 @@ "node": ">=10" } }, - "node_modules/vscode-languageclient/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/vscode-languageserver-protocol": { "version": "3.17.4-next.1", "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.4-next.1.tgz", @@ -16583,6 +16504,18 @@ "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.0.1.tgz", "integrity": "sha512-hHQV6iig+M21lTdItKPkJAaWrxALQb/nqpVffakO4knJOh3DrU2SXOMzUzNgo1eADPzu3qSsJY1weCzvR52q9A==" }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true + }, + "node_modules/vscode-textmate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-6.0.0.tgz", + "integrity": "sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==", + "dev": true + }, "node_modules/vscode-uri": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.7.tgz", @@ -17018,19 +16951,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "dev": true, - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/xmlbuilder": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", @@ -17266,12 +17186,12 @@ } }, "@babel/code-frame": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", - "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "requires": { - "@babel/highlight": "^7.22.10", + "@babel/highlight": "^7.22.13", "chalk": "^2.4.2" } }, @@ -17328,12 +17248,12 @@ } }, "@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.22.10", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -17384,19 +17304,19 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true }, "@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" } }, "@babel/helper-hoist-variables": { @@ -17461,9 +17381,9 @@ "dev": true }, "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helper-validator-option": { @@ -17484,20 +17404,20 @@ } }, "@babel/highlight": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", - "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -17627,30 +17547,30 @@ } }, "@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" } }, "@babel/traverse": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz", - "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "requires": { - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.10", - "@babel/types": "^7.22.10", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -17679,13 +17599,13 @@ } }, "@babel/types": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", - "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } }, @@ -18211,15 +18131,6 @@ } } }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -19173,9 +19084,9 @@ "dev": true }, "@types/semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==", + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", "dev": true }, "@types/stack-utils": { @@ -19314,15 +19225,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true - }, - "semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } } } }, @@ -19449,15 +19351,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } } } }, @@ -19482,15 +19375,6 @@ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", "dev": true - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } } } }, @@ -19524,6 +19408,73 @@ "@microsoft/1ds-post-js": "^3.2.3" } }, + "@vscode/js-debug-browsers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@vscode/js-debug-browsers/-/js-debug-browsers-1.1.0.tgz", + "integrity": "sha512-v2hkBzA3DlUYxq3fMpCR8xuzmYjkoYjy276XA7mzZVstsFYkfbsOkluRwulrbqEEsjy3XObPNZq+A3ZZkpC+Gw==", + "requires": { + "execa": "^4.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "@vscode/test-electron": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.3.4.tgz", @@ -19534,16 +19485,85 @@ "https-proxy-agent": "^5.0.0", "jszip": "^3.10.1", "semver": "^7.5.2" + } + }, + "@vscode/vsce": { + "version": "2.21.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.21.0.tgz", + "integrity": "sha512-KuxYqScqUY/duJbkj9eE2tN2X/WJoGAy54hHtxT3ZBkM6IzrOg7H7CXGUPBxNlmqku2w/cAjOUSrgIHlzz0mbA==", + "dev": true, + "requires": { + "azure-devops-node-api": "^11.0.1", + "chalk": "^2.4.2", + "cheerio": "^1.0.0-rc.9", + "commander": "^6.2.1", + "glob": "^7.0.6", + "hosted-git-info": "^4.0.2", + "jsonc-parser": "^3.2.0", + "keytar": "^7.7.0", + "leven": "^3.1.0", + "markdown-it": "^12.3.2", + "mime": "^1.3.4", + "minimatch": "^3.0.3", + "parse-semver": "^1.1.1", + "read": "^1.0.7", + "semver": "^7.5.2", + "tmp": "^0.2.1", + "typed-rest-client": "^1.8.4", + "url-join": "^4.0.1", + "xml2js": "^0.5.0", + "yauzl": "^2.3.1", + "yazl": "^2.2.2" }, "dependencies": { - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "requires": { "lru-cache": "^6.0.0" } + }, + "jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "requires": { + "rimraf": "^3.0.0" + } + }, + "xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } } } }, @@ -20700,17 +20720,6 @@ "dev": true, "requires": { "semver": "^7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } } }, "bytes": { @@ -20929,7 +20938,8 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true + "dev": true, + "optional": true }, "chrome-trace-event": { "version": "1.0.2", @@ -21315,6 +21325,13 @@ "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + } } }, "css-select": { @@ -21371,6 +21388,7 @@ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, + "optional": true, "requires": { "mimic-response": "^3.1.0" } @@ -21395,7 +21413,8 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true + "dev": true, + "optional": true }, "deep-is": { "version": "0.1.4", @@ -21524,7 +21543,8 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", - "dev": true + "dev": true, + "optional": true }, "detect-newline": { "version": "3.1.0", @@ -22301,15 +22321,6 @@ "requires": { "brace-expansion": "^1.1.7" } - }, - "semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } } } }, @@ -22442,15 +22453,6 @@ "regexp-tree": "~0.1.1" } }, - "semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", @@ -22559,9 +22561,9 @@ "dev": true }, "execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.0.tgz", + "integrity": "sha512-JbDUxwV3BoT5ZVXQrSVbAiaXhXUkIwvbhPIwZ0N13kX+5yCzOhUNdocxB/UQRuYOHRYYwAxKYwJYc0T4D12pDA==", "requires": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", @@ -22677,7 +22679,8 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true + "dev": true, + "optional": true }, "expand-tilde": { "version": "2.0.2", @@ -23253,7 +23256,8 @@ "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "dev": true + "dev": true, + "optional": true }, "glob": { "version": "7.2.0", @@ -25623,15 +25627,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -25951,15 +25946,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } } } }, @@ -26007,6 +25993,7 @@ "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", "dev": true, + "optional": true, "requires": { "node-addon-api": "^4.3.0", "prebuild-install": "^7.0.1" @@ -26318,17 +26305,6 @@ "dev": true, "requires": { "semver": "^7.5.3" - }, - "dependencies": { - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } } }, "make-error": { @@ -26570,14 +26546,6 @@ "vscode-languageserver-textdocument": "^1.0.5" }, "dependencies": { - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "requires": { - "lru-cache": "^6.0.0" - } - }, "vscode-jsonrpc": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz", @@ -26634,7 +26602,8 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true + "dev": true, + "optional": true }, "min-indent": { "version": "1.0.1", @@ -26715,7 +26684,8 @@ "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true + "dev": true, + "optional": true }, "mocha": { "version": "10.0.0", @@ -27022,7 +26992,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "dev": true + "dev": true, + "optional": true }, "natural-compare": { "version": "1.4.0", @@ -27093,26 +27064,17 @@ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.22.0.tgz", "integrity": "sha512-u4uAs/4Zzmp/jjsD9cyFYDXeISfUWaAVWshPmDZOFOv4Xl4SbzTXm53I04C2uRueYJ+0t5PEtLH/owbn2Npf/w==", "dev": true, + "optional": true, "requires": { "semver": "^7.3.5" - }, - "dependencies": { - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } } }, "node-addon-api": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", - "dev": true + "dev": true, + "optional": true }, "node-int64": { "version": "0.4.0", @@ -27141,6 +27103,14 @@ "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + } } }, "normalize-path": { @@ -27474,6 +27444,14 @@ "dev": true, "requires": { "semver": "^5.1.0" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + } } }, "parse5": { @@ -27702,6 +27680,7 @@ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", "dev": true, + "optional": true, "requires": { "detect-libc": "^2.0.0", "expand-template": "^2.0.3", @@ -27926,6 +27905,7 @@ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, + "optional": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -27937,7 +27917,8 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true + "dev": true, + "optional": true } } }, @@ -28348,9 +28329,12 @@ } }, "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } }, "semver-greatest-satisfied-range": { "version": "1.1.0", @@ -28465,13 +28449,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true + "dev": true, + "optional": true }, "simple-get": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", "dev": true, + "optional": true, "requires": { "decompress-response": "^6.0.0", "once": "^1.3.1", @@ -28953,6 +28939,7 @@ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, + "optional": true, "requires": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -29162,15 +29149,6 @@ "yargs-parser": "^21.0.1" }, "dependencies": { - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", @@ -29242,15 +29220,6 @@ "picomatch": "^2.2.3" } }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -29338,6 +29307,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.0.1" } @@ -29748,69 +29718,6 @@ } } }, - "vsce": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-2.9.2.tgz", - "integrity": "sha512-xyLqL4U82BilUX1t6Ym2opQEa2tLGWYjbgB7+ETeNVXlIJz5sWBJjQJSYJVFOKJSpiOtQclolu88cj7oY6vvPQ==", - "dev": true, - "requires": { - "azure-devops-node-api": "^11.0.1", - "chalk": "^2.4.2", - "cheerio": "^1.0.0-rc.9", - "commander": "^6.1.0", - "glob": "^7.0.6", - "hosted-git-info": "^4.0.2", - "keytar": "^7.7.0", - "leven": "^3.1.0", - "markdown-it": "^12.3.2", - "mime": "^1.3.4", - "minimatch": "^3.0.3", - "parse-semver": "^1.1.1", - "read": "^1.0.7", - "semver": "^5.1.0", - "tmp": "^0.2.1", - "typed-rest-client": "^1.8.4", - "url-join": "^4.0.1", - "xml2js": "^0.4.23", - "yauzl": "^2.3.1", - "yazl": "^2.2.2" - }, - "dependencies": { - "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true - }, - "hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dev": true, - "requires": { - "rimraf": "^3.0.0" - } - } - } - }, "vscode-html-languageservice": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-5.0.4.tgz", @@ -29829,14 +29736,6 @@ } } }, - "vscode-js-debug-browsers": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/vscode-js-debug-browsers/-/vscode-js-debug-browsers-1.0.5.tgz", - "integrity": "sha512-p4/ItCYUbTAuMAyVIt23m6/W5ZHK/ruWsNJpbtTz0sYsrYQmGF7L5/hDPMTGBNIaQb9SDobn3asuoR479x8Z6Q==", - "requires": { - "execa": "^4.0.0" - } - }, "vscode-jsonrpc": { "version": "8.2.0-next.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0-next.0.tgz", @@ -29867,14 +29766,6 @@ "requires": { "brace-expansion": "^2.0.1" } - }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "requires": { - "lru-cache": "^6.0.0" - } } } }, @@ -29909,6 +29800,18 @@ "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.0.1.tgz", "integrity": "sha512-hHQV6iig+M21lTdItKPkJAaWrxALQb/nqpVffakO4knJOh3DrU2SXOMzUzNgo1eADPzu3qSsJY1weCzvR52q9A==" }, + "vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true + }, + "vscode-textmate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-6.0.0.tgz", + "integrity": "sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==", + "dev": true + }, "vscode-uri": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.7.tgz", @@ -30233,16 +30136,6 @@ "signal-exit": "^3.0.7" } }, - "xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "dev": true, - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - } - }, "xmlbuilder": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", diff --git a/package.json b/package.json index 938cad47d..49c896a57 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "csharp", "publisher": "muhammad-sammy", - "version": "2.0.436", + "version": "2.7.25", "description": "C# support for vscode-compatible editors (powered by OmniSharp and NetCoreDbg).", "displayName": "C#", "author": "Muhammad Sammy", @@ -37,9 +37,9 @@ } }, "defaults": { - "roslyn": "4.8.0-2.23428.2", - "omniSharp": "1.39.7", - "razor": "7.0.0-preview.23423.3", + "roslyn": "4.9.0-1.23513.7", + "omniSharp": "1.39.10", + "razor": "7.0.0-preview.23513.5", "razorOmnisharp": "7.0.0-preview.23363.1" }, "main": "./dist/extension", @@ -55,11 +55,15 @@ "scripts": { "vscode:prepublish": "tsc -p ./ && webpack --mode production", "l10nDevGenerateLocalizationBundle": "npx @vscode/l10n-dev export --outDir ./l10n ./src", - "compile": "tsc -p ./ && npx eslint ./ && npm run l10nDevGenerateLocalizationBundle", + "compile": "tsc -p ./ && npx eslint ./ && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", + "compile:razorTextMate": "npx js-yaml src/razor/syntaxes/aspnetcorerazor.tmLanguage.yml > src/razor/syntaxes/aspnetcorerazor.tmLanguage.json", "compileDev": "tsc -p ./ && npx eslint ./ && webpack --mode development && npm run l10nDevGenerateLocalizationBundle", "watch": "tsc -watch -p ./", "tdd": "mocha --config ./.mocharc.jsonc --watch --watch-extensions ts omnisharptest/omnisharpUnitTests/**/*.test.ts*", "test": "tsc -p ./ && gulp test", + "test:integration": "tsc -p ./ && gulp test:integration", + "test:razor": "tsc -p ./ && npm run compile:razorTextMate && gulp test:razor", + "test:razorintegration": "tsc -p ./ && gulp test:razorintegration", "omnisharptest": "tsc -p ./ && gulp omnisharptest", "omnisharptest:unit": "tsc -p ./ && gulp omnisharptest:unit", "omnisharptest:feature": "tsc -p ./ && gulp omnisharptest:feature", @@ -68,7 +72,6 @@ "omnisharptest:integration:slnWithCsproj": "tsc -p ./ && gulp omnisharptest:integration:slnWithCsproj", "omnisharptest:integration:slnFilterWithCsproj": "tsc -p ./ && gulp omnisharptest:integration:slnFilterWithCsproj", "omnisharptest:artifacts": "tsc -p ./ && mocha out/omnisharptest/omnisharpArtifactTests/**/*.test.js", - "test:integration:slnWithCsproj": "tsc -p ./ && gulp test:integration:slnWithCsproj", "unpackage:vsix": "gulp vsix:release:unpackage", "updatePackageDependencies": "gulp updatePackageDependencies", "l10nDevGenerateXlf": "npx @vscode/l10n-dev generate-xlf ./package.nls.json ./l10n/bundle.l10n.json --outFile ./loc/vscode-csharp.xlf", @@ -83,8 +86,10 @@ "@types/cross-spawn": "6.0.2", "@vscode/debugprotocol": "1.56.0", "@vscode/extension-telemetry": "0.6.2", + "@vscode/js-debug-browsers": "^1.1.0", "async-file": "2.0.2", "cross-spawn": "6.0.5", + "execa": "4.0.0", "fs-extra": "9.1.0", "http-proxy-agent": "4.0.1", "https-proxy-agent": "5.0.0", @@ -95,7 +100,7 @@ "ps-list": "7.2.0", "request-light": "0.4.0", "rxjs": "6.6.7", - "semver": "5.7.2", + "semver": "7.5.4", "stream": "0.0.2", "strip-bom": "5.0.0", "strip-bom-buf": "2.0.0", @@ -103,7 +108,6 @@ "tmp": "0.0.33", "uuid": "^9.0.0", "vscode-html-languageservice": "^5.0.1", - "vscode-js-debug-browsers": "^1.0.5", "vscode-jsonrpc": "8.2.0-next.0", "vscode-languageclient": "8.2.0-next.1", "vscode-languageserver-protocol": "3.17.4-next.1", @@ -124,7 +128,7 @@ "@types/minimist": "1.2.1", "@types/mocha": "5.2.5", "@types/node": "16.11.38", - "@types/semver": "5.5.0", + "@types/semver": "7.3.13", "@types/tar": "6.1.5", "@types/tmp": "0.0.33", "@types/unzipper": "^0.9.1", @@ -170,7 +174,9 @@ "ts-node": "9.1.1", "typescript": "^5.1.6", "unzipper": "0.10.11", - "vsce": "2.9.2", + "@vscode/vsce": "2.21.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "^6.0.0", "vscode-uri": "^3.0.7", "webpack": "5.76.0", "webpack-cli": "4.6.0" @@ -179,104 +185,104 @@ { "id": "OmniSharp", "description": "OmniSharp for Windows (.NET 4.7.2 / x86)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-x86-1.39.7.zip", - "installPath": ".omnisharp/1.39.7", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-x86-1.39.10.zip", + "installPath": ".omnisharp/1.39.10", "platforms": [ "win32" ], "architectures": [ "x86" ], - "installTestPath": "./.omnisharp/1.39.7/OmniSharp.exe", + "installTestPath": "./.omnisharp/1.39.10/OmniSharp.exe", "platformId": "win-x86", "isFramework": true, - "integrity": "04535972281731CA7F7E857D6ABBB9D726DC7E9FA4D8A96573169AA97D3C30FA" + "integrity": "C81CE2099AD494EF63F9D88FAA70D55A68CF175810F944526FF94AAC7A5109F9" }, { "id": "OmniSharp", "description": "OmniSharp for Windows (.NET 6 / x86)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-x86-net6.0-1.39.7.zip", - "installPath": ".omnisharp/1.39.7-net6.0", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-x86-net6.0-1.39.10.zip", + "installPath": ".omnisharp/1.39.10-net6.0", "platforms": [ "win32" ], "architectures": [ "x86" ], - "installTestPath": "./.omnisharp/1.39.7-net6.0/OmniSharp.dll", + "installTestPath": "./.omnisharp/1.39.10-net6.0/OmniSharp.dll", "platformId": "win-x86", "isFramework": false, - "integrity": "7F52CCF77D53513CF3073496123E84ED0D4983908404299D0E697947CEAC495D" + "integrity": "B7E62415CFC3DAC2154AC636C5BF0FB4B2C9BBF11B5A1FBF72381DDDED59791E" }, { "id": "OmniSharp", "description": "OmniSharp for Windows (.NET 4.7.2 / x64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-x64-1.39.7.zip", - "installPath": ".omnisharp/1.39.7", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-x64-1.39.10.zip", + "installPath": ".omnisharp/1.39.10", "platforms": [ "win32" ], "architectures": [ "x86_64" ], - "installTestPath": "./.omnisharp/1.39.7/OmniSharp.exe", + "installTestPath": "./.omnisharp/1.39.10/OmniSharp.exe", "platformId": "win-x64", "isFramework": true, - "integrity": "2A389B3055EA5D928A950A60853857582FDA2C3B7E1659158578E0C9CD951FEC" + "integrity": "BE0ED10AACEA17E14B78BD0D887DE5935D4ECA3712192A701F3F2100CA3C8B6E" }, { "id": "OmniSharp", "description": "OmniSharp for Windows (.NET 6 / x64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-x64-net6.0-1.39.7.zip", - "installPath": ".omnisharp/1.39.7-net6.0", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-x64-net6.0-1.39.10.zip", + "installPath": ".omnisharp/1.39.10-net6.0", "platforms": [ "win32" ], "architectures": [ "x86_64" ], - "installTestPath": "./.omnisharp/1.39.7-net6.0/OmniSharp.dll", + "installTestPath": "./.omnisharp/1.39.10-net6.0/OmniSharp.dll", "platformId": "win-x64", "isFramework": false, - "integrity": "ADC15D4997A64B274783A9F1F7FC3EA1CDEC7E353A060D0D0FA2691FD051D682" + "integrity": "A73327395E7EF92C1D8E307055463DA412662C03F077ECC743462FD2760BB537" }, { "id": "OmniSharp", "description": "OmniSharp for Windows (.NET 4.7.2 / arm64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-arm64-1.39.7.zip", - "installPath": ".omnisharp/1.39.7", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-arm64-1.39.10.zip", + "installPath": ".omnisharp/1.39.10", "platforms": [ "win32" ], "architectures": [ "arm64" ], - "installTestPath": "./.omnisharp/1.39.7/OmniSharp.exe", + "installTestPath": "./.omnisharp/1.39.10/OmniSharp.exe", "platformId": "win-arm64", "isFramework": true, - "integrity": "4C1BA44B1E9FE56F01813DBA588A1B715804D061A4758C0E5910FCE175CBB8CF" + "integrity": "32FA0067B0639F87760CD1A769B16E6A53588C137C4D31661836CA4FB28D3DD6" }, { "id": "OmniSharp", "description": "OmniSharp for Windows (.NET 6 / arm64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-win-arm64-net6.0-1.39.7.zip", - "installPath": ".omnisharp/1.39.7-net6.0", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-win-arm64-net6.0-1.39.10.zip", + "installPath": ".omnisharp/1.39.10-net6.0", "platforms": [ "win32" ], "architectures": [ "arm64" ], - "installTestPath": "./.omnisharp/1.39.7-net6.0/OmniSharp.dll", + "installTestPath": "./.omnisharp/1.39.10-net6.0/OmniSharp.dll", "platformId": "win-arm64", "isFramework": false, - "integrity": "4569F777A71C8E63BA09630EFD0DFEB397BE5E4F1528142E09F3005F7BA007FA" + "integrity": "433F9B360CAA7B4DDD85C604D5C5542C1A718BCF2E71B2BCFC7526E6D41F4E8F" }, { "id": "OmniSharp", "description": "OmniSharp for OSX (Mono / x64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-osx-1.39.7.zip", - "installPath": ".omnisharp/1.39.7", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-osx-1.39.10.zip", + "installPath": ".omnisharp/1.39.10", "platforms": [ "darwin" ], @@ -288,48 +294,48 @@ "./mono.osx", "./run" ], - "installTestPath": "./.omnisharp/1.39.7/run", + "installTestPath": "./.omnisharp/1.39.10/run", "platformId": "osx", "isFramework": true, - "integrity": "9137C09D69252ACD5E9B518A725D12660002FC1CDC958A4654AAE3F922540651" + "integrity": "2CC42F0EC7C30CFA8858501D12ECB6FB685A1FCFB8ECB35698A4B12406551968" }, { "id": "OmniSharp", "description": "OmniSharp for OSX (.NET 6 / x64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-osx-x64-net6.0-1.39.7.zip", - "installPath": ".omnisharp/1.39.7-net6.0", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-osx-x64-net6.0-1.39.10.zip", + "installPath": ".omnisharp/1.39.10-net6.0", "platforms": [ "darwin" ], "architectures": [ "x86_64" ], - "installTestPath": "./.omnisharp/1.39.7-net6.0/OmniSharp.dll", + "installTestPath": "./.omnisharp/1.39.10-net6.0/OmniSharp.dll", "platformId": "osx-x64", "isFramework": false, - "integrity": "26F4FA6CD2A6153FD16829FDFCFAE1BB34289E7B96AC833B8BE0A559EFE5656B" + "integrity": "C9D6E9F2C839A66A7283AE6A9EC545EE049B48EB230D33E91A6322CB67FF9D97" }, { "id": "OmniSharp", "description": "OmniSharp for OSX (.NET 6 / arm64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-osx-arm64-net6.0-1.39.7.zip", - "installPath": ".omnisharp/1.39.7-net6.0", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-osx-arm64-net6.0-1.39.10.zip", + "installPath": ".omnisharp/1.39.10-net6.0", "platforms": [ "darwin" ], "architectures": [ "arm64" ], - "installTestPath": "./.omnisharp/1.39.7-net6.0/OmniSharp.dll", + "installTestPath": "./.omnisharp/1.39.10-net6.0/OmniSharp.dll", "platformId": "osx-arm64", "isFramework": false, - "integrity": "8239FA8712EC0D5CEFFFA3B3DBFA1E788864938FAECDBFA8C9D59F55647BC4B2" + "integrity": "851350F52F83E3BAD5A92D113E4B9882FCD1DEB16AA84FF94B6F2CEE3C70051E" }, { "id": "OmniSharp", "description": "OmniSharp for Linux (Mono / x86)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-x86-1.39.7.zip", - "installPath": ".omnisharp/1.39.7", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-x86-1.39.10.zip", + "installPath": ".omnisharp/1.39.10", "platforms": [ "linux" ], @@ -341,16 +347,16 @@ "./mono.linux-x86", "./run" ], - "installTestPath": "./.omnisharp/1.39.7/run", + "installTestPath": "./.omnisharp/1.39.10/run", "platformId": "linux-x86", "isFramework": true, - "integrity": "1ABB15DCBA71D16D78D718D4A225A2BD2E7F54805389B7810A72F4091554C906" + "integrity": "474B1CDBAE64CFEC655FB6B0659BCE481023C48274441C72991E67B6E13E56A1" }, { "id": "OmniSharp", "description": "OmniSharp for Linux (Mono / x64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-x64-1.39.7.zip", - "installPath": ".omnisharp/1.39.7", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-x64-1.39.10.zip", + "installPath": ".omnisharp/1.39.10", "platforms": [ "linux" ], @@ -361,32 +367,32 @@ "./mono.linux-x86_64", "./run" ], - "installTestPath": "./.omnisharp/1.39.7/run", + "installTestPath": "./.omnisharp/1.39.10/run", "platformId": "linux-x64", "isFramework": true, - "integrity": "AE83C428FACAB366E18AE02043588F989C79C8FBF49D3FC56A0BC368DFF1CC94" + "integrity": "FB4CAA47343265100349375D79DBCCE1868950CED675CB07FCBE8462EDBCDD37" }, { "id": "OmniSharp", "description": "OmniSharp for Linux (.NET 6 / x64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-x64-net6.0-1.39.7.zip", - "installPath": ".omnisharp/1.39.7-net6.0", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-x64-net6.0-1.39.10.zip", + "installPath": ".omnisharp/1.39.10-net6.0", "platforms": [ "linux" ], "architectures": [ "x86_64" ], - "installTestPath": "./.omnisharp/1.39.7-net6.0/OmniSharp.dll", + "installTestPath": "./.omnisharp/1.39.10-net6.0/OmniSharp.dll", "platformId": "linux-x64", "isFramework": false, - "integrity": "A5830FA3F9D20546AD791071EBDE3B7A2A8D11FDCD30728DABEE6BB3041C9F7F" + "integrity": "0926D3BEA060BF4373356B2FC0A68C10D0DE1B1150100B551BA5932814CE51E2" }, { "id": "OmniSharp", "description": "OmniSharp for Linux (Mono / arm64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-arm64-1.39.7.zip", - "installPath": ".omnisharp/1.39.7", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-arm64-1.39.10.zip", + "installPath": ".omnisharp/1.39.10", "platforms": [ "linux" ], @@ -397,58 +403,58 @@ "./mono.linux-arm64", "./run" ], - "installTestPath": "./.omnisharp/1.39.7/run", + "installTestPath": "./.omnisharp/1.39.10/run", "platformId": "linux-arm64", "isFramework": true, - "integrity": "479F1E3E1A70B6E3FEAC6324715042025FB93BE8F8355CE0B750A52C1F9960F5" + "integrity": "478F3594DFD0167E9A56E36F0364A86C73F8132A3E7EA916CA1419EFE141D2CC" }, { "id": "OmniSharp", "description": "OmniSharp for Linux (.NET 6 / arm64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-arm64-net6.0-1.39.7.zip", - "installPath": ".omnisharp/1.39.7-net6.0", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-arm64-net6.0-1.39.10.zip", + "installPath": ".omnisharp/1.39.10-net6.0", "platforms": [ "linux" ], "architectures": [ "arm64" ], - "installTestPath": "./.omnisharp/1.39.7-net6.0/OmniSharp.dll", + "installTestPath": "./.omnisharp/1.39.10-net6.0/OmniSharp.dll", "platformId": "linux-arm64", "isFramework": false, - "integrity": "9EFE06FD38A5B78D968B627BFE1276B8193B7EDF659624EACF43F89D8560ADE0" + "integrity": "6FB6A572043A74220A92F6C19C7BB0C3743321C7563A815FD2702EF4FA7D688E" }, { "id": "OmniSharp", "description": "OmniSharp for Linux musl (.NET 6 / x64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-musl-x64-net6.0-1.39.7.zip", - "installPath": ".omnisharp/1.39.7-net6.0", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-musl-x64-net6.0-1.39.10.zip", + "installPath": ".omnisharp/1.39.10-net6.0", "platforms": [ "linux-musl" ], "architectures": [ "x86_64" ], - "installTestPath": "./.omnisharp/1.39.7-net6.0/OmniSharp.dll", + "installTestPath": "./.omnisharp/1.39.10-net6.0/OmniSharp.dll", "platformId": "linux-musl-x64", "isFramework": false, - "integrity": "613EE930F72AF3C26514670AAD06B26C88A4D9233C60408ABD323406F4265807" + "integrity": "6BFDA3AD11DBB0C6514B86ECC3E1597CC41C6E309B7575F7C599E07D9E2AE610" }, { "id": "OmniSharp", "description": "OmniSharp for Linux musl (.NET 6 / arm64)", - "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.7/omnisharp-linux-musl-arm64-net6.0-1.39.7.zip", - "installPath": ".omnisharp/1.39.7-net6.0", + "url": "https://roslynomnisharp.blob.core.windows.net/releases/1.39.10/omnisharp-linux-musl-arm64-net6.0-1.39.10.zip", + "installPath": ".omnisharp/1.39.10-net6.0", "platforms": [ "linux-musl" ], "architectures": [ "arm64" ], - "installTestPath": "./.omnisharp/1.39.7-net6.0/OmniSharp.dll", + "installTestPath": "./.omnisharp/1.39.10-net6.0/OmniSharp.dll", "platformId": "linux-musl-arm64", "isFramework": false, - "integrity": "9A5A66AA312B99A55BC57E5FC05985C7AD0916B60B9E22B2E4F456AC68929CE4" + "integrity": "DA63619EA024EB9BBF6DB5A85C6150CAB5C0BD554544A3596ED1B17F926D6875" }, { "id": "Debugger", @@ -516,7 +522,7 @@ { "id": "Razor", "description": "Razor Language Server (Windows / x64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/a48c3e83b44a34ddb295099c55e31e7e/razorlanguageserver-win-x64-7.0.0-preview.23423.3.zip", + "url": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/e0d9dc729905a672edb6bb44239fceb0/razorlanguageserver-win-x64-7.0.0-preview.23513.5.zip", "installPath": ".razor", "platforms": [ "win32" @@ -524,12 +530,12 @@ "architectures": [ "x86_64" ], - "integrity": "A7815AE5A9BEFE7EB5C0006343341A38D0F7A662865DAD21F0842E064322C186" + "integrity": "50CFBE5021DE39A1E207E32321BFDF4FCAEBE0D34EF8C8A64143AC7AADF6EB12" }, { "id": "Razor", "description": "Razor Language Server (Windows / x86)", - "url": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/e188fa3cbd9a5601701d0f8de0705496/razorlanguageserver-win-x86-7.0.0-preview.23423.3.zip", + "url": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/c7f08527fbb3809f6dc8e4bf2dc81571/razorlanguageserver-win-x86-7.0.0-preview.23513.5.zip", "installPath": ".razor", "platforms": [ "win32" @@ -537,12 +543,12 @@ "architectures": [ "x86" ], - "integrity": "D543C2E513F93F91AEDD95AE2A410747D71D3E7CF4D32E0FA31F8B7691109F6F" + "integrity": "DF2A885EC2FEE6DC6140A0465549476B164C6552040D6F946AD5B6C6FB85D2BE" }, { "id": "Razor", "description": "Razor Language Server (Windows / ARM64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/695b332017bfa81af74787904979fde8/razorlanguageserver-win-arm64-7.0.0-preview.23423.3.zip", + "url": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/efe8ebdcd7f4162a537acb9325234f02/razorlanguageserver-win-arm64-7.0.0-preview.23513.5.zip", "installPath": ".razor", "platforms": [ "win32" @@ -550,12 +556,12 @@ "architectures": [ "arm64" ], - "integrity": "DF2E2F442BE365DE390F7402CE69E5514D91D379A4A755133B696CC2972CFE53" + "integrity": "3A7E49E531C6870B37341A8B57D0C26AB7BCD779CD173C02CBCDB16D0A273D82" }, { "id": "Razor", "description": "Razor Language Server (Linux / x64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/b9653cb6c40f965986266f70ae7dab25/razorlanguageserver-linux-x64-7.0.0-preview.23423.3.zip", + "url": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/5ece63dde175c03ce79a8ec91005537b/razorlanguageserver-linux-x64-7.0.0-preview.23513.5.zip", "installPath": ".razor", "platforms": [ "linux" @@ -566,12 +572,12 @@ "binaries": [ "./rzls" ], - "integrity": "87D1357F1BCDCBA9D775677B5ADFFE22D87B013155B3ADBDA69F9CEA0F5C0FCF" + "integrity": "BB9856808252ADE6AAC1CD55939373E7237D846EC9101FE306113B5EE93376B7" }, { "id": "Razor", "description": "Razor Language Server (Linux ARM64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/4aca138f5c6299422e240dcc50689a67/razorlanguageserver-linux-arm64-7.0.0-preview.23423.3.zip", + "url": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/bb7cd0c44e45bd21cd1341a4a6e87f1c/razorlanguageserver-linux-arm64-7.0.0-preview.23513.5.zip", "installPath": ".razor", "platforms": [ "linux" @@ -582,12 +588,12 @@ "binaries": [ "./rzls" ], - "integrity": "9E8C75DBEA512D7FCE5D96D240D57E6C12161EDFE7482A8F68F99BD5019F3EC1" + "integrity": "B7197A7C3F544BE91713C2776F86C32AF58B7D1B1FD43042ACC8AAA0541EAC75" }, { "id": "Razor", "description": "Razor Language Server (Linux musl / x64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/7d1e4e0bf72de43dc272d22de2486633/razorlanguageserver-linux-musl-x64-7.0.0-preview.23423.3.zip", + "url": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/fb08013aad8cfbb2bc2c3f5f4d276a0d/razorlanguageserver-linux-musl-x64-7.0.0-preview.23513.5.zip", "installPath": ".razor", "platforms": [ "linux-musl" @@ -598,12 +604,12 @@ "binaries": [ "./rzls" ], - "integrity": "AD36EAA27AC75EF161E4642454B995FFE71751ED7B89C6B4233D1D577CB763A6" + "integrity": "28BD44F3ED9C6FDC8A2E8B73BD12587D5110898ABFB49D8D880748B33F6B050C" }, { "id": "Razor", "description": "Razor Language Server (Linux musl ARM64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/eee386c129c18ba1705fe411cb981a20/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23423.3.zip", + "url": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/159a171a7cc1ceb96604d148d5c75574/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23513.5.zip", "installPath": ".razor", "platforms": [ "linux-musl" @@ -614,12 +620,12 @@ "binaries": [ "./rzls" ], - "integrity": "EC8279752254F33AECC5D59E7D02DC93BB37EF2740CC63ACFF0DB78725BF169C" + "integrity": "F2BA9D7CA2B2424D6A5B00D8E23BC3BD646144FF1A623471A50F358277B7919B" }, { "id": "Razor", "description": "Razor Language Server (macOS / x64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/74f8a06bc496f54b37466c382c6744ee/razorlanguageserver-osx-x64-7.0.0-preview.23423.3.zip", + "url": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/8a13539f57d6e59b32e767d3684c6c84/razorlanguageserver-osx-x64-7.0.0-preview.23513.5.zip", "installPath": ".razor", "platforms": [ "darwin" @@ -630,12 +636,12 @@ "binaries": [ "./rzls" ], - "integrity": "FE3356F653A786A5442E99AA6FE19DD9215962F9B926AD2E723596A5B6E3C135" + "integrity": "9513C71E033B47DECC6077D93844E165FFA66800309169B6CEABC2CCEC7EAFFB" }, { "id": "Razor", "description": "Razor Language Server (macOS ARM64)", - "url": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/679c6fe63c016298914264c33326f2ea/razorlanguageserver-osx-arm64-7.0.0-preview.23423.3.zip", + "url": "https://download.visualstudio.microsoft.com/download/pr/f8b5b74b-3df3-47cc-83b1-cd1d93d1771d/89a58de8daaea554d00105dc435dfc98/razorlanguageserver-osx-arm64-7.0.0-preview.23513.5.zip", "installPath": ".razor", "platforms": [ "darwin" @@ -646,7 +652,7 @@ "binaries": [ "./rzls" ], - "integrity": "594EAE393087FD002829041B261D6777CBA17E612783C548E1B9B2D20BE97E54" + "integrity": "A102654F519C7D3B8D60C8E5FF390ED08498E0A9BF23089DBDD581A148130A03" }, { "id": "RazorOmnisharp", @@ -814,32 +820,674 @@ "path": "./themes/vs2019_light.json" } ], - "configuration": { - "title": "C# configuration", - "properties": { - "csharp.format.enable": { - "type": "boolean", - "default": true, - "description": "Enable/disable default C# formatter (requires restart)." - }, - "csharp.suppressDotnetInstallWarning": { - "type": "boolean", - "default": false, - "description": "Suppress the warning that the .NET Core SDK is not on the path." - }, - "csharp.unitTestDebuggingOptions": { - "type": "object", - "description": "Options to use with the debugger when launching for unit test debugging.", - "default": {}, - "properties": { - "sourceFileMap": { - "type": "object", - "description": "Optional source file mappings passed to the debug engine. Example: '{ \"C:\\foo\":\"/home/user/foo\" }'", - "additionalProperties": { - "type": "string" + "configuration": [ + { + "title": "OmniSharp", + "properties": { + "dotnet.server.useOmnisharp": { + "type": "boolean", + "default": false, + "description": "Switches to use the Omnisharp server for language features when enabled (requires restart). This option will not be honored with C# Dev Kit installed.", + "order": 0 + }, + "csharp.format.enable": { + "type": "boolean", + "default": true, + "description": "Enable/disable default C# formatter (requires restart)." + }, + "csharp.suppressDotnetInstallWarning": { + "type": "boolean", + "default": false, + "description": "Suppress the warning that the .NET Core SDK is not on the path." + }, + "csharp.suppressDotnetRestoreNotification": { + "type": "boolean", + "default": false, + "description": "Suppress the notification window to perform a 'dotnet restore' when dependencies can't be resolved." + }, + "csharp.suppressProjectJsonWarning": { + "type": "boolean", + "default": false, + "description": "Suppress the warning that project.json is no longer a supported project format for .NET Core applications" + }, + "csharp.suppressBuildAssetsNotification": { + "type": "boolean", + "default": false, + "description": "Suppress the notification window to add missing assets to build or debug the application." + }, + "csharp.suppressHiddenDiagnostics": { + "type": "boolean", + "default": true, + "description": "Suppress 'hidden' diagnostics (such as 'unnecessary using directives') from appearing in the editor or the Problems pane." + }, + "csharp.referencesCodeLens.filteredSymbols": { + "type": "array", + "items": { + "type": "string" + }, + "default": [], + "description": "Array of custom symbol names for which CodeLens should be disabled." + }, + "csharp.maxProjectFileCountForDiagnosticAnalysis": { + "type": "number", + "default": 1000, + "description": "Specifies the maximum number of files for which diagnostics are reported for the whole workspace. If this limit is exceeded, diagnostics will be shown for currently opened files only. Specify 0 or less to disable the limit completely." + }, + "csharp.semanticHighlighting.enabled": { + "type": "boolean", + "default": true, + "description": "Enable/disable Semantic Highlighting for C# files (Razor files currently unsupported). Defaults to false. Close open files for changes to take effect.", + "scope": "window" + }, + "csharp.showOmnisharpLogOnError": { + "type": "boolean", + "default": true, + "description": "Shows the OmniSharp log in the Output pane when OmniSharp reports an error." + }, + "omnisharp.useModernNet": { + "type": "boolean", + "default": true, + "scope": "window", + "title": "Use .NET 6 build of OmniSharp", + "description": "Use OmniSharp build for .NET 6. This version _does not_ support non-SDK-style .NET Framework projects, including Unity. SDK-style Framework, .NET Core, and .NET 5+ projects should see significant performance improvements." + }, + "omnisharp.sdkPath": { + "type": "string", + "scope": "window", + "description": "Specifies the path to a .NET SDK installation to use for project loading instead of the highest version installed. Applies when \"useModernNet\" is set to true. Example: /home/username/dotnet/sdks/6.0.300." + }, + "omnisharp.sdkVersion": { + "type": "string", + "scope": "window", + "description": "Specifies the version of the .NET SDK to use for project loading instead of the highest version installed. Applies when \"useModernNet\" is set to true. Example: 6.0.300." + }, + "omnisharp.sdkIncludePrereleases": { + "type": "boolean", + "scope": "window", + "default": true, + "description": "Specifies whether to include preview versions of the .NET SDK when determining which version to use for project loading. Applies when \"useModernNet\" is set to true." + }, + "omnisharp.monoPath": { + "type": "string", + "scope": "machine", + "description": "Specifies the path to a mono installation to use when \"useModernNet\" is set to false, instead of the default system one. Example: \"/Library/Frameworks/Mono.framework/Versions/Current\"" + }, + "omnisharp.loggingLevel": { + "type": "string", + "default": "information", + "enum": [ + "trace", + "debug", + "information", + "warning", + "error", + "critical" + ], + "description": "Specifies the level of logging output from the OmniSharp server." + }, + "omnisharp.autoStart": { + "type": "boolean", + "default": true, + "description": "Specifies whether the OmniSharp server will be automatically started or not. If false, OmniSharp can be started with the 'Restart OmniSharp' command" + }, + "omnisharp.projectFilesExcludePattern": { + "type": "string", + "default": "**/node_modules/**,**/.git/**,**/bower_components/**", + "description": "The exclude pattern used by OmniSharp to find all project files." + }, + "omnisharp.projectLoadTimeout": { + "type": "number", + "default": 60, + "description": "The time Visual Studio Code will wait for the OmniSharp server to start. Time is expressed in seconds." + }, + "omnisharp.maxProjectResults": { + "type": "number", + "default": 250, + "description": "The maximum number of projects to be shown in the 'Select Project' dropdown (maximum 250)." + }, + "omnisharp.useEditorFormattingSettings": { + "type": "boolean", + "default": true, + "description": "Specifes whether OmniSharp should use VS Code editor settings for C# code formatting (use of tabs, indentation size)." + }, + "omnisharp.minFindSymbolsFilterLength": { + "type": "number", + "default": 0, + "description": "The minimum number of characters to enter before 'Go to Symbol in Workspace' operation shows any results." + }, + "omnisharp.maxFindSymbolsItems": { + "type": "number", + "default": 1000, + "description": "The maximum number of items that 'Go to Symbol in Workspace' operation can show. The limit is applied only when a positive number is specified here." + }, + "omnisharp.disableMSBuildDiagnosticWarning": { + "type": "boolean", + "default": false, + "description": "Specifies whether notifications should be shown if OmniSharp encounters warnings or errors loading a project. Note that these warnings/errors are always emitted to the OmniSharp log" + }, + "omnisharp.enableMsBuildLoadProjectsOnDemand": { + "type": "boolean", + "default": false, + "description": "If true, MSBuild project system will only load projects for files that were opened in the editor. This setting is useful for big C# codebases and allows for faster initialization of code navigation features only for projects that are relevant to code that is being edited. With this setting enabled OmniSharp may load fewer projects and may thus display incomplete reference lists for symbols." + }, + "omnisharp.enableEditorConfigSupport": { + "type": "boolean", + "default": true, + "description": "Enables support for reading code style, naming convention and analyzer settings from .editorconfig." + }, + "omnisharp.enableDecompilationSupport": { + "type": "boolean", + "default": false, + "scope": "machine", + "description": "Enables support for decompiling external references instead of viewing metadata." + }, + "omnisharp.enableLspDriver": { + "type": "boolean", + "default": false, + "description": "Enables support for the experimental language protocol based engine (requires reload to setup bindings correctly)" + }, + "omnisharp.organizeImportsOnFormat": { + "type": "boolean", + "default": false, + "description": "Specifies whether 'using' directives should be grouped and sorted during document formatting." + }, + "omnisharp.enableAsyncCompletion": { + "type": "boolean", + "default": false, + "description": "(EXPERIMENTAL) Enables support for resolving completion edits asynchronously. This can speed up time to show the completion list, particularly override and partial method completion lists, at the cost of slight delays after inserting a completion item. Most completion items will have no noticeable impact with this feature, but typing immediately after inserting an override or partial method completion, before the insert is completed, can have unpredictable results." + }, + "omnisharp.dotNetCliPaths": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Paths to a local download of the .NET CLI to use for running any user code.", + "uniqueItems": true + }, + "razor.plugin.path": { + "type": "string", + "scope": "machine", + "description": "Overrides the path to the Razor plugin dll." + }, + "razor.devmode": { + "type": "boolean", + "default": false, + "description": "Forces the omnisharp-vscode extension to run in a mode that enables local Razor.VSCode deving." + }, + "razor.format.enable": { + "type": "boolean", + "scope": "window", + "default": true, + "description": "Enable/disable default Razor formatter." + }, + "razor.completion.commitElementsWithSpace": { + "type": "boolean", + "scope": "window", + "default": "false", + "description": "Specifies whether to commit tag helper and component elements with a space." + } + } + }, + { + "title": "C#", + "properties": { + "dotnet.defaultSolution": { + "type": "string", + "description": "%configuration.dotnet.defaultSolution.description%", + "order": 0 + }, + "dotnet.dotnetPath": { + "type": "string", + "scope": "machine-overridable", + "description": "%configuration.dotnet.dotnetPath%" + }, + "dotnet.server.path": { + "type": "string", + "scope": "machine-overridable", + "description": "%configuration.dotnet.server.path%" + }, + "dotnet.server.startTimeout": { + "type": "number", + "scope": "machine-overridable", + "default": 30000, + "description": "%configuration.dotnet.server.startTimeout%" + }, + "dotnet.server.waitForDebugger": { + "type": "boolean", + "scope": "machine-overridable", + "default": false, + "description": "%configuration.dotnet.server.waitForDebugger%" + }, + "dotnet.server.trace": { + "scope": "window", + "type": "string", + "enum": [ + "Trace", + "Debug", + "Information", + "Warning", + "Error", + "Critical", + "None" + ], + "default": "Information", + "description": "%configuration.dotnet.server.trace%" + }, + "dotnet.server.extensionPaths": { + "scope": "machine-overridable", + "type": [ + "array", + null + ], + "items": { + "type": "string" + }, + "default": null, + "description": "%configuration.dotnet.server.extensionPaths%" + }, + "dotnet.server.crashDumpPath": { + "scope": "machine-overridable", + "type": "string", + "default": null, + "description": "%configuration.dotnet.server.crashDumpPath%" + }, + "dotnet.projects.binaryLogPath": { + "scope": "machine-overridable", + "type": "string", + "default": null, + "description": "Sets a path where MSBuild binary logs are written to when loading projects, to help diagnose loading errors." + }, + "dotnet.preferCSharpExtension": { + "scope": "resource", + "type": "boolean", + "default": false, + "description": "%configuration.dotnet.preferCSharpExtension%" + }, + "dotnet.implementType.insertionBehavior": { + "type": "string", + "enum": [ + "withOtherMembersOfTheSameKind", + "atTheEnd" + ], + "default": "withOtherMembersOfTheSameKind", + "enumDescriptions": [ + "%configuration.dotnet.implementType.insertionBehavior.withOtherMembersOfTheSameKind%", + "%configuration.dotnet.implementType.insertionBehavior.atTheEnd%" + ], + "description": "%configuration.dotnet.implementType.insertionBehavior%", + "order": 10 + }, + "dotnet.implementType.propertyGenerationBehavior": { + "type": "string", + "enum": [ + "preferThrowingProperties", + "preferAutoProperties" + ], + "default": "preferThrowingProperties", + "enumDescriptions": [ + "%configuration.dotnet.implementType.propertyGenerationBehavior.preferThrowingProperties%", + "%configuration.dotnet.implementType.propertyGenerationBehavior.preferAutoProperties%" + ], + "description": "%configuration.dotnet.implementType.propertyGenerationBehavior%", + "order": 10 + }, + "dotnet.codeLens.enableReferencesCodeLens": { + "type": "boolean", + "default": true, + "description": "%configuration.dotnet.codeLens.enableReferencesCodeLens%" + }, + "dotnet.codeLens.enableTestsCodeLens": { + "type": "boolean", + "default": true, + "description": "%configuration.dotnet.codeLens.enableTestsCodeLens%" + }, + "dotnet.completion.showCompletionItemsFromUnimportedNamespaces": { + "type": "boolean", + "default": true, + "description": "%configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces%", + "order": 20 + }, + "dotnet.completion.showNameCompletionSuggestions": { + "type": "boolean", + "default": "true", + "description": "%configuration.dotnet.completion.showNameCompletionSuggestions%", + "order": 20 + }, + "dotnet.completion.provideRegexCompletions": { + "type": "boolean", + "default": "true", + "description": "%configuration.dotnet.completion.provideRegexCompletions%", + "order": 20 + }, + "dotnet.backgroundAnalysis.analyzerDiagnosticsScope": { + "type": "string", + "enum": [ + "openFiles", + "fullSolution", + "none" + ], + "default": "openFiles", + "enumDescriptions": [ + "%configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles%", + "%configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution%", + "%configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none%" + ], + "description": "%configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope%", + "order": 30 + }, + "dotnet.backgroundAnalysis.compilerDiagnosticsScope": { + "type": "string", + "enum": [ + "openFiles", + "fullSolution", + "none" + ], + "default": "openFiles", + "enumDescriptions": [ + "%configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles%", + "%configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution%", + "%configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none%" + ], + "description": "%configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope%", + "order": 30 + }, + "dotnet.highlighting.highlightRelatedRegexComponents": { + "type": "boolean", + "default": "true", + "description": "%configuration.dotnet.highlighting.highlightRelatedRegexComponents%", + "order": 40 + }, + "dotnet.highlighting.highlightRelatedJsonComponents": { + "type": "boolean", + "default": "true", + "description": "%configuration.dotnet.highlighting.highlightRelatedJsonComponents%", + "order": 40 + }, + "csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": { + "type": "boolean", + "default": false, + "description": "%configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation%", + "order": 50 + }, + "csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": { + "type": "boolean", + "default": false, + "description": "%configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes%", + "order": 50 + }, + "csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": { + "type": "boolean", + "default": false, + "description": "%configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes%", + "order": 50 + }, + "csharp.inlayHints.enableInlayHintsForTypes": { + "type": "boolean", + "default": false, + "description": "%configuration.csharp.inlayHints.enableInlayHintsForTypes%", + "order": 50 + }, + "dotnet.inlayHints.enableInlayHintsForIndexerParameters": { + "type": "boolean", + "default": false, + "description": "%configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters%", + "order": 50 + }, + "dotnet.inlayHints.enableInlayHintsForLiteralParameters": { + "type": "boolean", + "default": false, + "description": "%configuration.dotnet.inlayHints.enableInlayHintsForLiteralParameters%", + "order": 50 + }, + "dotnet.inlayHints.enableInlayHintsForObjectCreationParameters": { + "type": "boolean", + "default": false, + "description": "%configuration.dotnet.inlayHints.enableInlayHintsForObjectCreationParameters%", + "order": 50 + }, + "dotnet.inlayHints.enableInlayHintsForOtherParameters": { + "type": "boolean", + "default": false, + "description": "%configuration.dotnet.inlayHints.enableInlayHintsForOtherParameters%", + "order": 50 + }, + "dotnet.inlayHints.enableInlayHintsForParameters": { + "type": "boolean", + "default": false, + "description": "%configuration.dotnet.inlayHints.enableInlayHintsForParameters%", + "order": 50 + }, + "dotnet.inlayHints.suppressInlayHintsForParametersThatDifferOnlyBySuffix": { + "type": "boolean", + "default": false, + "description": "%configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatDifferOnlyBySuffix%", + "order": 50 + }, + "dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": { + "type": "boolean", + "default": false, + "description": "%configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName%", + "order": 50 + }, + "dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": { + "type": "boolean", + "default": false, + "description": "%configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent%", + "order": 50 + }, + "dotnet.navigation.navigateToDecompiledSources": { + "type": "boolean", + "default": "true", + "description": "%configuration.dotnet.navigation.navigateToDecompiledSources%", + "order": 60 + }, + "dotnet.quickInfo.showRemarksInQuickInfo": { + "type": "boolean", + "default": "true", + "description": "%configuration.dotnet.quickInfo.showRemarksInQuickInfo%", + "order": 70 + }, + "dotnet.symbolSearch.searchReferenceAssemblies": { + "type": "boolean", + "default": true, + "description": "%configuration.dotnet.symbolSearch.searchReferenceAssemblies%", + "order": 80 + }, + "dotnet.unitTests.runSettingsPath": { + "type": "string", + "description": "Path to the .runsettings file which should be used when running unit tests. (Previously `omnisharp.testRunSettings`)" + }, + "dotnet.unitTestDebuggingOptions": { + "type": "object", + "description": "%configuration.dotnet.unitTestDebuggingOptions%", + "default": {}, + "properties": { + "sourceFileMap": { + "type": "object", + "markdownDescription": "%generateOptionsSchema.sourceFileMap.markdownDescription%", + "additionalProperties": { + "type": "string" + } }, - "default": { - "": "" + "justMyCode": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.justMyCode.markdownDescription%", + "default": true + }, + "requireExactSource": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.requireExactSource.markdownDescription%", + "default": true + }, + "enableStepFiltering": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.enableStepFiltering.markdownDescription%", + "default": true + }, + "logging": { + "description": "%generateOptionsSchema.logging.description%", + "type": "object", + "required": [], + "default": {}, + "properties": { + "exceptions": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.exceptions.markdownDescription%", + "default": true + }, + "moduleLoad": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.moduleLoad.markdownDescription%", + "default": true + }, + "programOutput": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.programOutput.markdownDescription%", + "default": true + }, + "threadExit": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.threadExit.markdownDescription%", + "default": false + }, + "processExit": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.processExit.markdownDescription%", + "default": true + } + } + }, + "suppressJITOptimizations": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.suppressJITOptimizations.markdownDescription%", + "default": false + }, + "symbolOptions": { + "description": "%generateOptionsSchema.symbolOptions.description%", + "default": { + "searchPaths": [], + "searchMicrosoftSymbolServer": false, + "searchNuGetOrgSymbolServer": false + }, + "type": "object", + "properties": { + "searchPaths": { + "type": "array", + "items": { + "type": "string" + }, + "description": "%generateOptionsSchema.symbolOptions.searchPaths.description%", + "default": [] + }, + "searchMicrosoftSymbolServer": { + "type": "boolean", + "description": "%generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description%", + "default": false + }, + "searchNuGetOrgSymbolServer": { + "type": "boolean", + "description": "%generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description%", + "default": false + }, + "cachePath": { + "type": "string", + "description": "%generateOptionsSchema.symbolOptions.cachePath.description%", + "default": "" + }, + "moduleFilter": { + "description": "%generateOptionsSchema.symbolOptions.moduleFilter.description%", + "default": { + "mode": "loadAllButExcluded", + "excludedModules": [] + }, + "type": "object", + "required": [ + "mode" + ], + "properties": { + "mode": { + "type": "string", + "enum": [ + "loadAllButExcluded", + "loadOnlyIncluded" + ], + "enumDescriptions": [ + "%generateOptionsSchema.symbolOptions.moduleFilter.mode.loadAllButExcluded.enumDescription%", + "%generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription%" + ], + "description": "%generateOptionsSchema.symbolOptions.moduleFilter.mode.description%", + "default": "loadAllButExcluded" + }, + "excludedModules": { + "type": "array", + "items": { + "type": "string" + }, + "description": "%generateOptionsSchema.symbolOptions.moduleFilter.excludedModules.description%", + "default": [] + }, + "includedModules": { + "type": "array", + "items": { + "type": "string" + }, + "description": "%generateOptionsSchema.symbolOptions.moduleFilter.includedModules.description%", + "default": [] + }, + "includeSymbolsNextToModules": { + "type": "boolean", + "description": "%generateOptionsSchema.symbolOptions.moduleFilter.includeSymbolsNextToModules.description%", + "default": true + } + } + } + } + }, + "sourceLinkOptions": { + "markdownDescription": "%generateOptionsSchema.sourceLinkOptions.markdownDescription%", + "default": { + "*": { + "enabled": true + } + }, + "type": "object", + "additionalItems": { + "type": "object", + "properties": { + "enabled": { + "title": "boolean", + "markdownDescription": "%generateOptionsSchema.sourceLinkOptions.additionalItems.enabled.markdownDescription%", + "default": "true" + } + } + } + }, + "allowFastEvaluate": { + "type": "boolean", + "description": "%generateOptionsSchema.allowFastEvaluate.description%", + "default": true + }, + "targetArchitecture": { + "type": "string", + "markdownDescription": "%generateOptionsSchema.targetArchitecture.markdownDescription%", + "enum": [ + "x86_64", + "arm64" + ] + }, + "type": { + "type": "string", + "enum": [ + "coreclr", + "clr" + ], + "description": "Type type of code to debug. Can be either 'coreclr' for .NET Core debugging, or 'clr' for Desktop .NET Framework. 'clr' only works on Windows as the Desktop framework is Windows-only.", + "default": "coreclr" + }, + "debugServer": { + "type": "number", + "description": "For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode", + "default": 4711 } }, "justMyCode": { @@ -1039,6 +1687,237 @@ "description": "For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode", "default": 4711 } + }, + "razor.languageServer.directory": { + "type": "string", + "scope": "machine-overridable", + "description": "%configuration.razor.languageServer.directory%", + "order": 90 + }, + "razor.languageServer.debug": { + "type": "boolean", + "scope": "machine-overridable", + "default": false, + "description": "%configuration.razor.languageServer.debug%", + "order": 90 + }, + "razor.trace": { + "type": "string", + "default": "Off", + "enum": [ + "Off", + "Messages", + "Verbose" + ], + "enumDescriptions": [ + "%configuration.razor.trace.off%", + "%configuration.razor.trace.messages%", + "%configuration.razor.trace.verbose%" + ], + "description": "%configuration.razor.trace%", + "order": 90 + }, + "csharp.debug.stopAtEntry": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.stopAtEntry.markdownDescription%", + "default": false + }, + "csharp.debug.console": { + "type": "string", + "enum": [ + "internalConsole", + "integratedTerminal", + "externalTerminal" + ], + "enumDescriptions": [ + "%generateOptionsSchema.console.internalConsole.enumDescription%", + "%generateOptionsSchema.console.integratedTerminal.enumDescription%", + "%generateOptionsSchema.console.externalTerminal.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.console.settingsDescription%", + "default": "internalConsole" + }, + "csharp.debug.sourceFileMap": { + "type": "object", + "markdownDescription": "%generateOptionsSchema.sourceFileMap.markdownDescription%", + "additionalProperties": { + "type": "string" + }, + "default": {} + }, + "csharp.debug.justMyCode": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.justMyCode.markdownDescription%", + "default": true + }, + "csharp.debug.requireExactSource": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.requireExactSource.markdownDescription%", + "default": true + }, + "csharp.debug.enableStepFiltering": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.enableStepFiltering.markdownDescription%", + "default": true + }, + "csharp.debug.logging.exceptions": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.exceptions.markdownDescription%", + "default": true + }, + "csharp.debug.logging.moduleLoad": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.moduleLoad.markdownDescription%", + "default": true + }, + "csharp.debug.logging.programOutput": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.programOutput.markdownDescription%", + "default": true + }, + "csharp.debug.logging.browserStdOut": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.browserStdOut.markdownDescription%", + "default": true + }, + "csharp.debug.logging.elapsedTiming": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.elapsedTiming.markdownDescription%", + "default": false + }, + "csharp.debug.logging.threadExit": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.threadExit.markdownDescription%", + "default": false + }, + "csharp.debug.logging.processExit": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.processExit.markdownDescription%", + "default": true + }, + "csharp.debug.logging.engineLogging": { + "type": "boolean", + "deprecationMessage": "%generateOptionsSchema.logging.engineLogging.deprecationMessage%", + "default": false + }, + "csharp.debug.logging.diagnosticsLog.protocolMessages": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription%", + "default": false + }, + "csharp.debug.logging.diagnosticsLog.dispatcherMessages": { + "type": "string", + "enum": [ + "none", + "error", + "important", + "normal" + ], + "enumDescriptions": [ + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription%", + "default": "none" + }, + "csharp.debug.logging.diagnosticsLog.debugEngineAPITracing": { + "type": "string", + "enum": [ + "none", + "error", + "all" + ], + "enumDescriptions": [ + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription%", + "default": "none" + }, + "csharp.debug.logging.diagnosticsLog.debugRuntimeEventTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription%", + "default": false + }, + "csharp.debug.logging.diagnosticsLog.expressionEvaluationTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription%", + "default": false + }, + "csharp.debug.logging.diagnosticsLog.startDebuggingTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription%", + "default": false + }, + "csharp.debug.suppressJITOptimizations": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.suppressJITOptimizations.markdownDescription%", + "default": false + }, + "csharp.debug.symbolOptions.searchPaths": { + "type": "array", + "items": { + "type": "string" + }, + "description": "%generateOptionsSchema.symbolOptions.searchPaths.description%", + "default": [] + }, + "csharp.debug.symbolOptions.searchMicrosoftSymbolServer": { + "type": "boolean", + "description": "%generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description%", + "default": false + }, + "csharp.debug.symbolOptions.searchNuGetOrgSymbolServer": { + "type": "boolean", + "description": "%generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description%", + "default": false + }, + "csharp.debug.symbolOptions.cachePath": { + "type": "string", + "description": "%generateOptionsSchema.symbolOptions.cachePath.description%", + "default": "" + }, + "csharp.debug.symbolOptions.moduleFilter.mode": { + "type": "string", + "enum": [ + "loadAllButExcluded", + "loadOnlyIncluded" + ], + "enumDescriptions": [ + "%generateOptionsSchema.symbolOptions.moduleFilter.mode.loadAllButExcluded.enumDescription%", + "%generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription%" + ], + "description": "%generateOptionsSchema.symbolOptions.moduleFilter.mode.description%", + "default": "loadAllButExcluded" + }, + "csharp.debug.symbolOptions.moduleFilter.excludedModules": { + "type": "array", + "items": { + "type": "string" + }, + "description": "%generateOptionsSchema.symbolOptions.moduleFilter.excludedModules.description%", + "default": [] + }, + "csharp.debug.symbolOptions.moduleFilter.includedModules": { + "type": "array", + "items": { + "type": "string" + }, + "description": "%generateOptionsSchema.symbolOptions.moduleFilter.includedModules.description%", + "default": [] + }, + "csharp.debug.symbolOptions.moduleFilter.includeSymbolsNextToModules": { + "type": "boolean", + "description": "%generateOptionsSchema.symbolOptions.moduleFilter.includeSymbolsNextToModules.description%", + "default": true + }, + "csharp.debug.allowFastEvaluate": { + "type": "boolean", + "description": "%generateOptionsSchema.allowFastEvaluate.description%", + "default": true } }, "csharp.suppressDotnetRestoreNotification": { @@ -1355,7 +2234,7 @@ "description": "Enable/disable default Razor formatter." } } - }, + ], "jsonValidation": [ { "fileMatch": [ @@ -1384,135 +2263,135 @@ "commands": [ { "command": "o.restart", - "title": "Restart OmniSharp", + "title": "%command.o.restart%", "category": "OmniSharp", "enablement": "config.dotnet.server.useOmnisharp" }, { "command": "o.pickProjectAndStart", - "title": "Select Project", + "title": "%command.o.pickProjectAndStart%", "category": "OmniSharp", "enablement": "config.dotnet.server.useOmnisharp" }, { "command": "dotnet.openSolution", - "title": "Open Solution", + "title": "%command.dotnet.openSolution%", "category": ".NET", "enablement": "!config.dotnet.server.useOmnisharp && dotnet.server.activatedStandalone" }, { "command": "o.fixAll.solution", - "title": "Fix all occurrences of a code issue within solution", + "title": "%command.o.fixAll.solution%", "category": "OmniSharp", "enablement": "config.dotnet.server.useOmnisharp" }, { "command": "o.fixAll.project", - "title": "Fix all occurrences of a code issue within project", + "title": "%command.o.fixAll.project%", "category": "OmniSharp", "enablement": "config.dotnet.server.useOmnisharp" }, { "command": "o.fixAll.document", - "title": "Fix all occurrences of a code issue within document", + "title": "%command.o.fixAll.document%", "category": "OmniSharp", "enablement": "config.dotnet.server.useOmnisharp" }, { "command": "o.reanalyze.allProjects", - "title": "Analyze all projects", + "title": "%command.o.reanalyze.allProjects%", "category": "OmniSharp", "enablement": "config.dotnet.server.useOmnisharp" }, { "command": "o.reanalyze.currentProject", - "title": "Analyze current project", + "title": "%command.o.reanalyze.currentProject%", "category": "OmniSharp", "enablement": "config.dotnet.server.useOmnisharp" }, { "command": "dotnet.generateAssets", - "title": "Generate Assets for Build and Debug", + "title": "%command.dotnet.generateAssets.currentProject%", "category": ".NET" }, { "command": "dotnet.restore.project", - "title": "Restore Project", + "title": "%command.dotnet.restore.project%", "category": ".NET", "enablement": "config.dotnet.server.useOmnisharp" }, { "command": "dotnet.restore.all", - "title": "Restore All Projects", + "title": "%command.dotnet.restore.all%", "category": ".NET", "enablement": "config.dotnet.server.useOmnisharp" }, { "command": "csharp.downloadDebugger", - "title": "Download .NET Core Debugger", + "title": "%command.csharp.downloadDebugger%", "category": "Debug" }, { "command": "csharp.listProcess", - "title": "List process for attach", + "title": "%command.csharp.listProcess%", "category": "CSharp" }, { "command": "csharp.listRemoteProcess", - "title": "List processes on remote connection for attach", + "title": "%command.csharp.listRemoteProcess%", "category": "CSharp" }, { "command": "csharp.listRemoteDockerProcess", - "title": "List processes on Docker connection", + "title": "%command.csharp.listRemoteDockerProcess%", "category": "CSharp" }, { "command": "csharp.attachToProcess", - "title": "Attach to a .NET 5+ or .NET Core process", + "title": "%command.csharp.attachToProcess%", "category": "Debug" }, { "command": "csharp.reportIssue", - "title": "Report an issue", + "title": "%command.csharp.reportIssue%", "category": "CSharp" }, { "command": "csharp.showDecompilationTerms", - "title": "Show the decompiler terms agreement", + "title": "%command.csharp.showDecompilationTerms%", "category": "CSharp", "enablement": "config.dotnet.server.useOmnisharp" }, { "command": "extension.showRazorCSharpWindow", - "title": "Show Razor CSharp", + "title": "%command.extension.showRazorCSharpWindow%", "category": "Razor" }, { "command": "extension.showRazorHtmlWindow", - "title": "Show Razor Html", + "title": "%command.extension.showRazorHtmlWindow%", "category": "Razor" }, { "command": "razor.reportIssue", - "title": "Report a Razor issue", + "title": "%command.razor.reportIssue%", "category": "Razor" }, { "command": "dotnet.test.runTestsInContext", - "title": "Run Tests in Context", + "title": "%command.dotnet.test.runTestsInContext%", "category": ".NET", "enablement": "dotnet.server.activatedStandalone" }, { "command": "dotnet.test.debugTestsInContext", - "title": "Debug Tests in Context", + "title": "%command.dotnet.test.debugTestsInContext%", "category": ".NET", "enablement": "dotnet.server.activatedStandalone" }, { "command": "dotnet.restartServer", - "title": "Restart Language Server", + "title": "%command.dotnet.restartServer%", "category": ".NET", "enablement": "!config.dotnet.server.useOmnisharp" } @@ -1548,6 +2427,7 @@ { "type": "coreclr", "label": ".NET 5+ and .NET Core", + "hiddenWhen": "dotnet.debug.serviceBrokerAvailable", "languages": [ "csharp", "razor", @@ -1785,11 +2665,6 @@ "markdownDescription": "%generateOptionsSchema.logging.programOutput.markdownDescription%", "default": true }, - "engineLogging": { - "type": "boolean", - "markdownDescription": "%generateOptionsSchema.logging.engineLogging.markdownDescription%", - "default": false - }, "browserStdOut": { "type": "boolean", "markdownDescription": "%generateOptionsSchema.logging.browserStdOut.markdownDescription%", @@ -1809,6 +2684,71 @@ "type": "boolean", "markdownDescription": "%generateOptionsSchema.logging.processExit.markdownDescription%", "default": true + }, + "engineLogging": { + "type": "boolean", + "deprecationMessage": "%generateOptionsSchema.logging.engineLogging.deprecationMessage%", + "default": false + }, + "diagnosticsLog": { + "description": "%generateOptionsSchema.logging.diagnosticsLog.description%", + "type": "object", + "required": [], + "default": {}, + "properties": { + "protocolMessages": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription%", + "default": false + }, + "dispatcherMessages": { + "type": "string", + "enum": [ + "none", + "error", + "important", + "normal" + ], + "enumDescriptions": [ + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription%", + "default": "none" + }, + "debugEngineAPITracing": { + "type": "string", + "enum": [ + "none", + "error", + "all" + ], + "enumDescriptions": [ + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription%", + "default": "none" + }, + "debugRuntimeEventTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription%", + "default": false + }, + "expressionEvaluationTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription%", + "default": false + }, + "startDebuggingTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription%", + "default": false + } + } } } }, @@ -2225,11 +3165,6 @@ "markdownDescription": "%generateOptionsSchema.logging.programOutput.markdownDescription%", "default": true }, - "engineLogging": { - "type": "boolean", - "markdownDescription": "%generateOptionsSchema.logging.engineLogging.markdownDescription%", - "default": false - }, "browserStdOut": { "type": "boolean", "markdownDescription": "%generateOptionsSchema.logging.browserStdOut.markdownDescription%", @@ -2249,6 +3184,71 @@ "type": "boolean", "markdownDescription": "%generateOptionsSchema.logging.processExit.markdownDescription%", "default": true + }, + "engineLogging": { + "type": "boolean", + "deprecationMessage": "%generateOptionsSchema.logging.engineLogging.deprecationMessage%", + "default": false + }, + "diagnosticsLog": { + "description": "%generateOptionsSchema.logging.diagnosticsLog.description%", + "type": "object", + "required": [], + "default": {}, + "properties": { + "protocolMessages": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription%", + "default": false + }, + "dispatcherMessages": { + "type": "string", + "enum": [ + "none", + "error", + "important", + "normal" + ], + "enumDescriptions": [ + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription%", + "default": "none" + }, + "debugEngineAPITracing": { + "type": "string", + "enum": [ + "none", + "error", + "all" + ], + "enumDescriptions": [ + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription%", + "default": "none" + }, + "debugRuntimeEventTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription%", + "default": false + }, + "expressionEvaluationTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription%", + "default": false + }, + "startDebuggingTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription%", + "default": false + } + } } } }, @@ -2592,8 +3592,8 @@ }, "configurationSnippets": [ { - "label": ".NET: Launch .NET Core Console App", - "description": "Launch a .NET Core Console App with a debugger.", + "label": "%debuggers.coreclr.configurationSnippets.label.console-local%", + "description": "%debuggers.coreclr.configurationSnippets.description.console-local%", "body": { "name": ".NET Core Launch (console)", "type": "coreclr", @@ -2607,8 +3607,8 @@ } }, { - "label": ".NET: Attach to local .NET Core Console App", - "description": "Attach a debugger to a .NET Core Console App.", + "label": "%debuggers.coreclr.configurationSnippets.label.attach-local%", + "description": "%debuggers.coreclr.configurationSnippets.description.attach%", "body": { "name": ".NET Core Attach", "type": "coreclr", @@ -2616,8 +3616,8 @@ } }, { - "label": ".NET: Launch a local .NET Core Web App", - "description": "Launch a .NET Core Web App with both a browser and a debugger.", + "label": "%debuggers.coreclr.configurationSnippets.label.web-local%", + "description": "%debuggers.coreclr.configurationSnippets.description.web-local%", "body": { "name": ".NET Core Launch (web)", "type": "coreclr", @@ -2640,8 +3640,8 @@ } }, { - "label": ".NET: Launch a remote .NET Core Console App", - "description": "Launch a .NET Core Console App on a remote machine.", + "label": "%debuggers.coreclr.configurationSnippets.label.console-remote%", + "description": "%debuggers.coreclr.configurationSnippets.description.remote%", "body": { "name": ".NET Core Launch (console)", "type": "coreclr", @@ -2661,8 +3661,8 @@ } }, { - "label": ".NET: Attach to remote .NET Core Console App", - "description": "Attach a debugger to a .NET Core Console App on a remote machine.", + "label": "%debuggers.coreclr.configurationSnippets.label.attach-remote%", + "description": "%debuggers.coreclr.configurationSnippets.description.remote%", "body": { "name": ".NET Core Attach", "type": "coreclr", @@ -2676,8 +3676,8 @@ } }, { - "label": ".NET: Launch and Debug Hosted Blazor WebAssembly App", - "description": "Launches a Hosted Blazor WebAssembly App with a debugger", + "label": "%debuggers.coreclr.configurationSnippets.label.blazor-hosted%", + "description": "%debuggers.coreclr.configurationSnippets.description.blazor-hosted%", "body": { "name": "Launch and Debug Hosted Blazor WebAssembly App", "type": "blazorwasm", @@ -2688,8 +3688,8 @@ } }, { - "label": ".NET: Launch and Debug Standalone Blazor WebAssembly App", - "description": "Launches Standalone Blazor WebAssembly App with a debugger", + "label": "%debuggers.coreclr.configurationSnippets.label.blazor-standalone%", + "description": "%debuggers.coreclr.configurationSnippets.description.blazor-standalone%", "body": { "name": "Launch and Debug Standalone Blazor WebAssembly App", "type": "blazorwasm", @@ -2701,7 +3701,9 @@ }, { "type": "clr", - "label": ".NET Framework 4.x (Windows only)", + "when": "workspacePlatform == windows", + "hiddenWhen": "true", + "label": ".NET Framework 4.x", "languages": [ "csharp", "razor", @@ -2939,11 +3941,6 @@ "markdownDescription": "%generateOptionsSchema.logging.programOutput.markdownDescription%", "default": true }, - "engineLogging": { - "type": "boolean", - "markdownDescription": "%generateOptionsSchema.logging.engineLogging.markdownDescription%", - "default": false - }, "browserStdOut": { "type": "boolean", "markdownDescription": "%generateOptionsSchema.logging.browserStdOut.markdownDescription%", @@ -2963,6 +3960,71 @@ "type": "boolean", "markdownDescription": "%generateOptionsSchema.logging.processExit.markdownDescription%", "default": true + }, + "engineLogging": { + "type": "boolean", + "deprecationMessage": "%generateOptionsSchema.logging.engineLogging.deprecationMessage%", + "default": false + }, + "diagnosticsLog": { + "description": "%generateOptionsSchema.logging.diagnosticsLog.description%", + "type": "object", + "required": [], + "default": {}, + "properties": { + "protocolMessages": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription%", + "default": false + }, + "dispatcherMessages": { + "type": "string", + "enum": [ + "none", + "error", + "important", + "normal" + ], + "enumDescriptions": [ + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription%", + "default": "none" + }, + "debugEngineAPITracing": { + "type": "string", + "enum": [ + "none", + "error", + "all" + ], + "enumDescriptions": [ + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription%", + "default": "none" + }, + "debugRuntimeEventTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription%", + "default": false + }, + "expressionEvaluationTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription%", + "default": false + }, + "startDebuggingTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription%", + "default": false + } + } } } }, @@ -3379,11 +4441,6 @@ "markdownDescription": "%generateOptionsSchema.logging.programOutput.markdownDescription%", "default": true }, - "engineLogging": { - "type": "boolean", - "markdownDescription": "%generateOptionsSchema.logging.engineLogging.markdownDescription%", - "default": false - }, "browserStdOut": { "type": "boolean", "markdownDescription": "%generateOptionsSchema.logging.browserStdOut.markdownDescription%", @@ -3403,6 +4460,71 @@ "type": "boolean", "markdownDescription": "%generateOptionsSchema.logging.processExit.markdownDescription%", "default": true + }, + "engineLogging": { + "type": "boolean", + "deprecationMessage": "%generateOptionsSchema.logging.engineLogging.deprecationMessage%", + "default": false + }, + "diagnosticsLog": { + "description": "%generateOptionsSchema.logging.diagnosticsLog.description%", + "type": "object", + "required": [], + "default": {}, + "properties": { + "protocolMessages": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription%", + "default": false + }, + "dispatcherMessages": { + "type": "string", + "enum": [ + "none", + "error", + "important", + "normal" + ], + "enumDescriptions": [ + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription%", + "default": "none" + }, + "debugEngineAPITracing": { + "type": "string", + "enum": [ + "none", + "error", + "all" + ], + "enumDescriptions": [ + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription%", + "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription%" + ], + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription%", + "default": "none" + }, + "debugRuntimeEventTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription%", + "default": false + }, + "expressionEvaluationTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription%", + "default": false + }, + "startDebuggingTracing": { + "type": "boolean", + "markdownDescription": "%generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription%", + "default": false + } + } } } }, @@ -3748,6 +4870,7 @@ { "type": "blazorwasm", "label": "Blazor WebAssembly Debug", + "hiddenWhen": "dotnet.debug.serviceBrokerAvailable", "initialConfigurations": [ { "type": "blazorwasm", @@ -3952,6 +5075,7 @@ { "type": "dotnet", "label": "C#", + "hiddenWhen": "!dotnet.debug.serviceBrokerAvailable", "languages": [ "csharp", "razor", @@ -3978,7 +5102,18 @@ } } }, - "configurationSnippets": [] + "configurationSnippets": [ + { + "label": "%debuggers.dotnet.configurationSnippets.label%", + "description": "%debuggers.dotnet.configurationSnippets.description%", + "body": { + "name": "C#: ${1:} Debug", + "type": "dotnet", + "request": "launch", + "projectPath": "^\"\\${workspaceFolder}/${2:}${1:}.csproj\"" + } + } + ] } ], "semanticTokenTypes": [ @@ -3987,7 +5122,7 @@ "description": "A Razor component element" }, { - "id": "razorComponentAttribute", + "id": "RazorComponentAttribute", "description": "A Razor component attribute" }, { @@ -4038,6 +5173,14 @@ "id": "markupAttribute", "description": "The name of a Markup attribute." }, + { + "id": "markupAttributeQuote", + "description": "A token that represents an attribute quote in a Markup attribute." + }, + { + "id": "markupAttributeValue", + "description": "The value of a Markup attribute." + }, { "id": "markupComment", "description": "The contents of a Markup comment." @@ -4293,7 +5436,7 @@ "razorComponentElement": [ "entity.name.class.element.component" ], - "razorComponentAttribute": [ + "RazorComponentAttribute": [ "entity.name.class.attribute.component" ], "razorTagHelperElement": [ @@ -4343,12 +5486,183 @@ "markupAttribute": [ "entity.other.attribute-name.html" ], + "markupAttributeQuote": [ + "punctuation.definition.tag.html" + ], + "markupAttributeValue": [ + "punctuation.definition.entity.html" + ], "markupComment": [ "comment.block.html" ], "markupCommentPunctuation": [ "punctuation.definition.comment.html", "comment.block.html" + ], + "markupTagDelimiter": [ + "punctuation.definition.tag.html" + ], + "keyword": [ + "keyword.cs" + ], + "excludedCode": [ + "support.other.excluded.cs" + ], + "controlKeyword": [ + "keyword.control.cs" + ], + "operatorOverloaded": [ + "entity.name.function.member.overload.cs" + ], + "preprocessorText": [ + "meta.preprocessor.string.cs" + ], + "punctuation": [ + "punctuation.cs" + ], + "stringVerbatim": [ + "string.verbatim.cs" + ], + "stringEscapeCharacter": [ + "constant.character.escape.cs" + ], + "delegate": [ + "entity.name.type.delegate.cs" + ], + "module": [ + "entity.name.type.module.cs" + ], + "field": [ + "entity.name.variable.field.cs" + ], + "constant": [ + "variable.other.constant" + ], + "extensionMethod": [ + "entity.name.function.extension.cs" + ], + "xmlDocCommentAttributeName": [ + "comment.documentation.attribute.name.cs" + ], + "xmlDocCommentAttributeQuotes": [ + "comment.documentation.attribute.quotes.cs" + ], + "xmlDocCommentAttributeValue": [ + "comment.documentation.attribute.value.cs" + ], + "xmlDocCommentCDataSection": [ + "comment.documentation.cdata.cs" + ], + "xmlDocCommentComment": [ + "comment.documentation.comment.cs" + ], + "xmlDocCommentDelimiter": [ + "comment.documentation.delimiter.cs" + ], + "xmlDocCommentEntityReference": [ + "comment.documentation.entityReference.cs" + ], + "xmlDocCommentName": [ + "comment.documentation.name.cs" + ], + "xmlDocCommentProcessingInstruction": [ + "comment.documentation.processingInstruction.cs" + ], + "xmlDocCommentText": [ + "comment.documentation.cs" + ], + "xmlLiteralAttributeName": [ + "entity.other.attribute-name.localname.xml" + ], + "xmlLiteralAttributeQuotes": [ + "string.quoted.double.xml" + ], + "xmlLiteralAttributeValue": [ + "meta.tag.xml" + ], + "xmlLiteralCDataSection": [ + "string.quoted.double.xml" + ], + "xmlLiteralComment": [ + "comment.block.xml" + ], + "xmlLiteralDelimiter": [ + "text.xml" + ], + "xmlLiteralEmbeddedExpression": [ + "meta.tag.xml" + ], + "xmlLiteralEntityReference": [ + "meta.tag.xml" + ], + "xmlLiteralName": [ + "entity.name.tag.localname.xml" + ], + "xmlLiteralProcessingInstruction": [ + "meta.tag.xml" + ], + "xmlLiteralText": [ + "text.xml" + ], + "regexComment": [ + "string.regexp.comment.cs" + ], + "regexCharacterClass": [ + "constant.character.character-class.regexp.cs" + ], + "regexAnchor": [ + "keyword.control.anchor.regexp.cs" + ], + "regexQuantifier": [ + "keyword.operator.quantifier.regexp.cs" + ], + "regexGrouping": [ + "punctuation.definition.group.regexp.cs" + ], + "regexAlternation": [ + "keyword.operator.or.regexp.cs" + ], + "regexText": [ + "string.regexp" + ], + "regexSelfEscapedCharacter": [ + "string.regexp.self-escaped-character.cs" + ], + "regexOtherEscape": [ + "string.regexp.other-escape.cs" + ], + "jsonComment": [ + "comment.line.double-slash.js" + ], + "jsonNumber": [ + "constant.numeric.json" + ], + "jsonString": [ + "string.quoted.double.json" + ], + "jsonKeyword": [ + "constant.language.json" + ], + "jsonText": [ + "string.quoted.double.json" + ], + "jsonOperator": [ + "string.quoted.double.json" + ], + "jsonPunctuation": [ + "punctuation.separator.dictionary.key-value.json" + ], + "jsonArray": [ + "punctuation.definition.array.begin.json" + ], + "jsonObject": [ + "punctuation.definition.dictionary.begin.json" + ], + "jsonPropertyName": [ + "support.type.property-name.json" + ], + "jsonConstructorName": [ + "support.type.property-name.json" ] } }, @@ -4543,7 +5857,10 @@ { "language": "aspnetcorerazor", "scopeName": "text.aspnetcorerazor", - "path": "./src/razor/syntaxes/aspnetcorerazor.tmLanguage.json" + "path": "./src/razor/syntaxes/aspnetcorerazor.tmLanguage.json", + "unbalancedBracketScopes": [ + "text.aspnetcorerazor" + ] } ], "menus": { diff --git a/package.nls.cs.json b/package.nls.cs.json index 00ab70cf9..56db34761 100644 --- a/package.nls.cs.json +++ b/package.nls.cs.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": "Připojení k procesu .NET 5+ nebo .NET Core", + "command.csharp.downloadDebugger": "Stáhnout ladicí program .NET Core", + "command.csharp.listProcess": "Vypsat proces pro připojení", + "command.csharp.listRemoteDockerProcess": "Výpis procesů v připojení Dockeru", + "command.csharp.listRemoteProcess": "Vypsat procesy pro připojení na vzdáleném připojení", + "command.csharp.reportIssue": "Nahlásit problém", + "command.csharp.showDecompilationTerms": "Zobrazit smlouvu o podmínkách dekompilátoru", + "command.dotnet.generateAssets.currentProject": "Generovat prostředky pro sestavení a ladění", + "command.dotnet.openSolution": "Otevřít řešení", + "command.dotnet.restartServer": "Restartovat jazykový server", + "command.dotnet.restore.all": "Obnovit všechny projekty", + "command.dotnet.restore.project": "Obnovit projekt", + "command.dotnet.test.debugTestsInContext": "Ladit testy v Context", + "command.dotnet.test.runTestsInContext": "Spustit testy v Context", + "command.extension.showRazorCSharpWindow": "Zobrazit Razor CSharp", + "command.extension.showRazorHtmlWindow": "Zobrazit Razor Html", + "command.o.fixAll.document": "Oprava všech výskytů problému s kódem v dokumentu", + "command.o.fixAll.project": "Opravit všechny výskyty problému s kódem v projektu", + "command.o.fixAll.solution": "Opravit všechny výskyty problému s kódem v rámci řešení", + "command.o.pickProjectAndStart": "Vybrat projekt", + "command.o.reanalyze.allProjects": "Analyzovat všechny projekty", + "command.o.reanalyze.currentProject": "Analyzovat aktuální projekt", + "command.o.restart": "Restartovat OmniSharp", + "command.razor.reportIssue": "Nahlásit problém s Razorem", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "Zobrazit tipy pro implicitní vytvoření objektu", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "Zobrazit nápovědy pro proměnné s odvozenými typy", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "Zobrazit tipy pro indexery", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "Zobrazit nápovědy pro typy parametrů lambda", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "Zobrazovat vložené nápovědy k typům", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Spustit analýzu kódu na pozadí pro:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Spustit analýzu kódu na pozadí pro: (Dříve omnisharp.enableRoslynAnalyzers)", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "Celé řešení", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "Žádné", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "Otevřené dokumenty", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "Celé řešení", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "Žádné", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "Otevřené dokumenty", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "Určuje, zda mají být zobrazeny odkazy CodeLens.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "Určuje, jestli se má zobrazit CodeLens testu spuštění a ladění.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "Určuje, zda mají být zobrazeny odkazy CodeLens. (Dříve csharp.referencesCodeLens.enabled)", + "configuration.dotnet.codeLens.enableTestsCodeLens": "Určuje, jestli se má zobrazit CodeLens testu spuštění a ladění. (Dříve csharp.testsCodeLens.enabled)", "configuration.dotnet.completion.provideRegexCompletions": "Umožňuje zobrazit regulární výrazy v seznamu dokončení.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Povolí podporu zobrazení neimportovaných typů a neimportovaných metod rozšíření v seznamech dokončení. Při potvrzení se na začátek aktuálního souboru přidá příslušná direktiva použití.", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Povolí podporu zobrazení neimportovaných typů a neimportovaných metod rozšíření v seznamech dokončení. Při potvrzení se na začátek aktuálního souboru přidá příslušná direktiva použití. (Dříve omnisharp.enableImportCompletion)", "configuration.dotnet.completion.showNameCompletionSuggestions": "Pro členy, které jste nedávno vybrali, proveďte automatické dokončování názvů objektů.", - "configuration.dotnet.defaultSolution.description": "Cesta výchozího řešení, které se má otevřít v pracovním prostoru, nebo ji můžete přeskočit nastavením na „zakázat“.", + "configuration.dotnet.defaultSolution.description": "Cesta výchozího řešení, které se má otevřít v pracovním prostoru. Můžete přeskočit nastavením na „zakázat“. (Dříve omnisharp.defaultLaunchSolution)", "configuration.dotnet.dotnetPath": "Zadává cestu k adresáři instalace dotnet, která se má použít místo výchozí systémové instalace. To má vliv pouze na instalaci dotnet, která se má použít k hostování samotného jazykového serveru. Příklad: /home/username/mycustomdotnetdirectory", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "Zvýrazněte související komponenty JSON pod kurzorem.", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "Zvýraznit související komponenty regulárního výrazu pod kurzorem.", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "Potlačit nápovědy, když argument odpovídá názvu parametru", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "Potlačit nápovědy, když název parametru odpovídá záměru metody", "configuration.dotnet.navigation.navigateToDecompiledSources": "Povolit navigaci na dekompilované zdroje.", + "configuration.dotnet.preferCSharpExtension": "Vynutí načtení projektů pouze s rozšířením jazyka C#. To může být užitečné při použití starších typů projektů, které jazyk C# Dev Kit nepodporuje. (Vyžaduje opětovné načtení okna)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "Zobrazit informace o poznámkách při zobrazení symbolu.", + "configuration.dotnet.server.crashDumpPath": "Nastaví cestu ke složce, do které se zapisují výpisy stavu systému, pokud dojde k chybovému ukončení jazykového serveru. Musí být zapisovatelný uživatelem.", "configuration.dotnet.server.extensionPaths": "Přepsat pro cestu k jazykovému serveru -- argumenty rozšíření", - "configuration.dotnet.server.path": "Určuje absolutní cestu ke spustitelnému souboru serveru (LSP nebo O#). Ponechání prázdné vede k použití verze připnuté k rozšíření C#.", + "configuration.dotnet.server.path": "Určuje absolutní cestu ke spustitelnému souboru serveru (LSP nebo O#). Ponechání prázdné vede k použití verze připnuté k rozšíření C#. (Dříve omnisharp.path)", + "configuration.dotnet.server.startTimeout": "Určuje časový limit (v ms), aby se klient úspěšně spustil a připojil k jazykovému serveru.", "configuration.dotnet.server.trace": "Nastaví úroveň protokolování pro jazykový server", - "configuration.dotnet.server.waitForDebugger": "Při spuštění serveru předá příznak --debug, aby bylo možné připojit ladicí program.", + "configuration.dotnet.server.waitForDebugger": "Při spuštění serveru předá příznak --debug, aby bylo možné připojit ladicí program. (Dříve omnisharp.waitForDebugger)", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "Hledat symboly v referenčních sestaveních Ovlivňuje funkce, které vyžadují vyhledávání symbolů, například přidání importů.", - "configuration.dotnet.unitTestDebuggingOptions": "Možnosti, které se mají použít s ladicím programem při spouštění pro ladění testů jednotek.", - "configuration.razor.languageServer.debug": "Specifies whether to wait for debug attach when launching the language server.", - "configuration.razor.languageServer.directory": "Overrides the path to the Razor Language Server directory.", - "configuration.razor.trace": "Specifies whether to output all messages [Verbose], some messages [Messages] or not at all [Off].", - "configuration.razor.trace.messages": "Logs only some messages from the Razor extension", - "configuration.razor.trace.off": "Does not log messages from the Razor extension", - "configuration.razor.trace.verbose": "Logs all messages from the Razor extension", + "configuration.dotnet.unitTestDebuggingOptions": "Možnosti, které se mají použít s ladicím programem při spouštění pro ladění testů jednotek. (Dříve csharp.unitTestDebuggingOptions)", + "configuration.razor.languageServer.debug": "Určuje, jestli se má při spouštění jazykového serveru čekat na připojení ladění.", + "configuration.razor.languageServer.directory": "Přepíše cestu k adresáři jazykového serveru Razor.", + "configuration.razor.trace": "Určuje, jestli se mají vypisovat všechny zprávy [Verbose], některé zprávy [Messages] nebo vůbec [Off].", + "configuration.razor.trace.messages": "Zaznamená jenom některé zprávy z rozšíření Razor", + "configuration.razor.trace.off": "Nezaznamenává zprávy z rozšíření Razor", + "configuration.razor.trace.verbose": "Zaznamenává zprávy z rozšíření Razor", + "debuggers.coreclr.configurationSnippets.description.attach": "Připojte ladicí program .NET (coreclr) ke spuštěným procesům. Můžete to provést také pomocí příkazu „Připojit k procesu .NET 5+ nebo .NET Core“.", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "Tento fragment kódu se používá ke spuštění nového procesu v ladicím programu Blazor WebAssembly (blazorwasm), který určuje cestu ke spustitelnému souboru, který se má spustit. Ve většině případů je „.NET: Spustit projekt jazyka C#“ fragment kódu lepší volbou, ale tento fragment kódu lze použít k úplné kontrole nad všemi možnostmi spuštění. Tento fragment kódu je pro hostované projekty Blazor, což je projekt, který má back-endovou aplikaci ASP.NET Core pro obsluhu svých souborů.", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "Tento fragment kódu slouží ke spuštění nového procesu v ladicím programu Blazor WebAssembly (blazorwasm). Ve většině případů je „.NET: Spustit projekt jazyka C#“ fragment kódu lepší volbou, ale tento fragment kódu lze použít k úplné kontrole nad všemi možnostmi spuštění. Tento fragment kódu je pro samostatné projekty Blazor, což je projekt, který nemá back-endovou aplikaci ASP.NET Core pro obsluhu svých souborů.", + "debuggers.coreclr.configurationSnippets.description.console-local": "Tento fragment kódu slouží ke spuštění nového procesu v ladicím programu .NET (coreclr) a určuje cestu ke spustitelnému souboru, který se má spustit. Ve většině případů je „.NET: Spustit projekt jazyka C#“ “ fragment kódu lepší volbou. Tento fragment kódu je užitečný, když byl projekt sestaven mimo tuto instanci VS Code nebo když chcete hostovat kód .NET ve vlastním spustitelném souboru, například konkrétní verzi dotnet.exe/dotnet nebo pokud je kód .NET hostovaný nativní aplikací. Tento fragment kódu je pro konzolové aplikace.", + "debuggers.coreclr.configurationSnippets.description.remote": "Tento fragment kódu ukazuje, jak vzdáleně ladit kód .NET **bez** vzdálené komunikace VS Code. Měl by se používat v případech, kdy chcete projekt sestavit místně, ale spustit ho na jiném počítači.", + "debuggers.coreclr.configurationSnippets.description.web-local": "Tento fragment kódu slouží ke spuštění nového procesu v ladicím programu .NET (coreclr) a určuje cestu ke spustitelnému souboru, který se má spustit. Ve většině případů je „.NET: Spustit projekt jazyka C#“ “ fragment kódu lepší volbou. Tento fragment kódu je užitečný, když byl projekt sestaven mimo tuto instanci VS Code nebo když chcete hostovat kód .NET ve vlastním spustitelném souboru, například konkrétní verzi dotnet.exe/dotnet nebo pokud je kód .NET hostovaný nativní aplikací. Tento fragment kódu je pro webové aplikace (ASP.NET Core).", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: Připojení k procesu .NET", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: Vzdálené ladění – připojení k procesu .NET", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Webové sestavení – spuštění hostovaného projektu Blazor", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Webové sestavení – spuštění samostatného projektu Blazor", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Spustit spustitelný soubor (konzola)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: Vzdálené ladění – spustitelný soubor (konzola)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Spustit spustitelný soubor (web)", + "debuggers.dotnet.configurationSnippets.description": "Tento fragment kódu konfiguruje VS Code pro ladění projektu jazyka C#. Možnosti ladění (příklad: argumenty spustitelného souboru) se dají nakonfigurovat prostřednictvím souboru „/Properties/launchSettings.json“.", + "debuggers.dotnet.configurationSnippets.label": ".NET: Spustit projekt C#", "debuggers.dotnet.launch.launchConfigurationId.description": "ID konfigurace spuštění, které se má použít. Pokud je řetězec prázdný, použije se aktuální aktivní konfigurace.", "debuggers.dotnet.launch.projectPath.description": "Cesta k souboru .csproj.", "generateOptionsSchema.allowFastEvaluate.description": "Při hodnotě true (výchozí stav) se ladicí program pokusí o rychlejší vyhodnocení tím, že provede simulaci provádění jednoduchých vlastností a metod.", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "Pokud je tato hodnota zadaná, označuje název profilu v souboru launchSettings.json, který se má použít. Ignoruje se, pokud se soubor launchSettings.json nenajde. Soubor launchSettings.json se bude číst ze zadané cesty, která by měla být vlastností launchSettingsFilePath, nebo {cwd}/Properties/launchSettings.json, pokud není nastavená. Pokud je tato hodnota nastavená na null nebo prázdný řetězec, soubor launchSettings.json se ignoruje. Pokud tato hodnota není zadaná, použije se první profil Project.", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "Příznak určující, jestli se má text stdout ze spuštění webového prohlížeče protokolovat do okna výstupu. Výchozí hodnota této možnosti je true.", "generateOptionsSchema.logging.description": "Příznaky určující, jaké typy zpráv se mají protokolovat do okna výstupu.", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Pokud je hodnota true, protokolování modulu bude obsahovat vlastnosti adapterElapsedTime a engineElapsedTime, které označují dobu v mikrosekundách, po kterou požadavek trval. Výchozí hodnota této možnosti je false.", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "Příznak, který určuje, jestli se protokoly diagnostického stroje mají protokolovat do okna výstupu. Výchozí hodnota této možnosti je false.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "Vytisknout všechna volání rozhraní API ladicího programu. Toto je velmi podrobné.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "Selhání tisku z volání rozhraní API ladicího programu.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Určuje, jestli se má do výstupního okna vytisknout volání rozhraní API do Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h. Výchozí hodnota této možnosti se vrací na „none“.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "Zakázat trasování volání rozhraní API", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "Označit příznakem určujícím, zda má být povoleno podrobné trasování událostí vyvolaných základním modulem runtime. Výchozí hodnota této možnosti se vrací na „false“.", + "generateOptionsSchema.logging.diagnosticsLog.description": "Nastavení řídící to, které zprávy se vytisknou do okna výstupu z diagnostického protokolu ladicího programu. Účelem tohoto protokolu je pomoci při řešení problémů s ladicím programem.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "Umožňuje vytisknout diagnostické zprávy na úrovni chyb.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "Vytisknout důležité diagnostické zprávy.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "Určuje, které zprávy se vytisknou do okna výstupu z dispečera ladicího programu. Pokud se nezadá, použije se výchozí hodnota none, pokud není povolené jedno z podrobných nastavení protokolu („debugEngineAPITracing“, „debugRuntimeEventTracing“, „expressionEvaluationTracing“ nebo „startDebuggingTracing“), v takovém případě se výchozí hodnota změní na „normal“.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "Netisknout další diagnostické zprávy.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "Vytisknout všechny nepodrobné diagnostické zprávy.", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "Příznak určující, zda má být povoleno podrobné trasování pro vyhodnocení výrazu. Výchozí hodnota této možnosti se vrací na „false“.", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "Označit příznakem určujícím, jestli se mají zprávy protokolu DAP vyměňované mezi ladicím programem jazyka C# a uživatelským rozhraním protokolovat do okna výstupu. Výchozí hodnota této možnosti se vrací na „false“.", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "Příznak určující, jestli se má povolit podrobné trasování pro spuštění ladění. Výchozí hodnota této možnosti se vrací na „false“.", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Pokud je hodnota true, protokolování zpráv protokolu bude obsahovat vlastnosti „adapterElapsedTime“ a „engineElapsedTime“, které označují dobu v mikrosekundách, po kterou požadavek trval. Výchozí hodnota této možnosti se vrací na „false“.", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "Nastavení „logging.engineLogging“ je zastaralé a místo toho se použije „logging.diagnosticsLog.protocolMessages“.", "generateOptionsSchema.logging.exceptions.markdownDescription": "Příznak určující, jestli se do okna výstupu mají protokolovat zprávy výjimek. Výchozí hodnota této možnosti je true.", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "Příznak určující, jestli se do okna výstupu mají protokolovat události načtení modulu. Výchozí hodnota této možnosti je true.", "generateOptionsSchema.logging.processExit.markdownDescription": "Určuje, jestli se při ukončení cílového procesu nebo zastavení ladění zaprotokoluje zpráva. Výchozí hodnota této možnosti je true.", @@ -138,7 +194,7 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "Nepokoušejte se načíst symboly pro ŽÁDNÝ modul, pokud není v poli „includedModules“, nebo je součástí nastavení „includeSymbolsNextToModules“.", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "Pokud je hodnota true, přidá se do cesty pro hledání symbolů server symbolů pro produkty Microsoft (https​://msdl.microsoft.com​/download/symbols). Pokud tato možnost není zadaná, výchozí hodnota je false.", "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Pokud je hodnota true, přidá se do cesty pro hledání symbolů server symbolů pro NuGet.org (https​://symbols.nuget.org​/download/symbols). Pokud tato možnost není zadaná, výchozí hodnota je false.", - "generateOptionsSchema.symbolOptions.searchPaths.description": "Pole adres URL serveru symbolů (například: http​://MyExampleSymbolServer) nebo adresářů (například: /build/symbols) k vyhledávání souborů .pdb. Tyto adresáře budou prohledány kromě výchozích umístění – vedle modulu a cesty, kam byl soubor pdb původně přemístěn.", + "generateOptionsSchema.symbolOptions.searchPaths.description": "Pole adres URL serveru symbolů (například: http​://MyExampleSymbolServer) nebo adresářů (příklad: /build/symbols) k vyhledávání souborů .pdb. Tyto adresáře budou prohledány spolu s výchozími umístěními – vedle modulu a cesty, kam byl soubor pdb původně přemístěn.", "generateOptionsSchema.targetArchitecture.markdownDescription": "[Podporováno pouze v místním ladění macOS]\r\n\r\nArchitektura laděného procesu. Tato chyba se automaticky zjistí, pokud není tento parametr nastavený. Povolené hodnoty jsou x86_64 nebo arm64.", "generateOptionsSchema.targetOutputLogPath.description": "Při nastavení této možnosti se text, který cílová aplikace zapisuje do stdout a stderr (např. Console.WriteLine), uloží do zadaného souboru. Tato možnost se bude ignorovat, pokud je konzola nastavená na jinou hodnotu než internalConsole. Příklad: ${workspaceFolder}/out.txt", "viewsWelcome.debug.contents": "[Generování prostředků jazyka C# pro sestavení a ladění](command:dotnet.generateAssets)\r\n\r\nDalší informace o souboru launch.json najdete v tématu [Konfigurace souboru launch.json pro ladění v jazyce C#](https://aka.ms/VSCode-CS-LaunchJson)." diff --git a/package.nls.de.json b/package.nls.de.json index 4c409e3ed..6e358abef 100644 --- a/package.nls.de.json +++ b/package.nls.de.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": "An einen .NET 5+ oder .NET Core-Prozess anfügen", + "command.csharp.downloadDebugger": ".NET Core-Debugger herunterladen", + "command.csharp.listProcess": "Prozess zum Anfügen auflisten", + "command.csharp.listRemoteDockerProcess": "Prozesse für Docker-Verbindung auflisten", + "command.csharp.listRemoteProcess": "Prozesse für Remoteverbindung zum Anfügen auflisten", + "command.csharp.reportIssue": "Ein Problem melden", + "command.csharp.showDecompilationTerms": "Vereinbarung zu den Decompilerbedingungen anzeigen", + "command.dotnet.generateAssets.currentProject": "Ressourcen für Build und Debuggen generieren", + "command.dotnet.openSolution": "Projektmappe öffnen", + "command.dotnet.restartServer": "Sprachserver neu starten", + "command.dotnet.restore.all": "Alle Projekte wiederherstellen", + "command.dotnet.restore.project": "Projekt wiederherstellen", + "command.dotnet.test.debugTestsInContext": "Tests im Kontext debuggen", + "command.dotnet.test.runTestsInContext": "Tests im Kontext ausführen", + "command.extension.showRazorCSharpWindow": "Razor CSharp anzeigen", + "command.extension.showRazorHtmlWindow": "Razor-HTML anzeigen", + "command.o.fixAll.document": "Alle Vorkommen eines Codeproblems innerhalb des Dokuments beheben", + "command.o.fixAll.project": "Alle Vorkommen eines Codeproblems innerhalb des Projekts beheben", + "command.o.fixAll.solution": "Alle Vorkommen eines Codeproblems innerhalb der Projektmappe beheben", + "command.o.pickProjectAndStart": "Projekt auswählen", + "command.o.reanalyze.allProjects": "Alle Projekte analysieren", + "command.o.reanalyze.currentProject": "Aktuelles Projekt analysieren", + "command.o.restart": "OmniSharp neu starten", + "command.razor.reportIssue": "Razor-Problem melden", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "Hinweise für die implizite Objekterstellung anzeigen", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "Hinweise für Variablen mit abgeleiteten Typen anzeigen", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "Hinweise für Indexer anzeigen", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "Hinweise für Lambda-Parametertypen anzeigen", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "Inlinetyphinweise anzeigen", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Ausführen der Hintergrundcodeanalyse für:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Ausführen der Hintergrundcodeanalyse für: (Zuvor \"omnisharp.enableRoslynAnalyzers\")", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "Gesamte Projektmappe", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "Keine", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "Geöffnete Dokumente", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "Gesamte Projektmappe", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "Keine", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "Geöffnete Dokumente", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "Gibt an, ob die Verweise auf CodeLens angezeigt werden sollen.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "Gibt an, ob der CodeLens-Test zum Ausführen und Debuggen angezeigt werden soll.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "Gibt an, ob die Verweise auf CodeLens angezeigt werden sollen. (Zuvor \"csharp.referencesCodeLens.enabled\")", + "configuration.dotnet.codeLens.enableTestsCodeLens": "Gibt an, ob der CodeLens-Test zum Ausführen und Debuggen angezeigt werden soll. (Zuvor \"csharp.testsCodeLens.enabled\")", "configuration.dotnet.completion.provideRegexCompletions": "Reguläre Ausdrücke in der Vervollständigungsliste anzeigen.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Ermöglicht die Anzeige nicht importierter Typen und nicht importierter Erweiterungsmethoden in Vervollständigungslisten. Wenn ein Commit ausgeführt wird, wird die entsprechende using-Direktive am Anfang der aktuellen Datei hinzugefügt.", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Ermöglicht die Anzeige nicht importierter Typen und nicht importierter Erweiterungsmethoden in Vervollständigungslisten. Wenn ein Commit ausgeführt wird, wird die entsprechende using-Direktive am Anfang der aktuellen Datei hinzugefügt. (Zuvor \"omnisharp.enableImportCompletion\")", "configuration.dotnet.completion.showNameCompletionSuggestions": "Führen Sie die automatische Vervollständigung des Objektnamens für die Elemente aus, die Sie kürzlich ausgewählt haben.", - "configuration.dotnet.defaultSolution.description": "Der Pfad der Standardlösung, die im Arbeitsbereich geöffnet werden soll, oder auf \"deaktivieren\" festlegen, um sie zu überspringen.", + "configuration.dotnet.defaultSolution.description": "Der Pfad der Standardlösung, die im Arbeitsbereich geöffnet werden soll, oder auf \"deaktivieren\" festlegen, um sie zu überspringen. (Zuvor \"omnisharp.defaultLaunchSolution\")", "configuration.dotnet.dotnetPath": "Gibt den Pfad zu einem dotnet-Installationsverzeichnis an, das anstelle des Standardsystems verwendet werden soll. Dies wirkt sich nur auf die dotnet-Installation aus, die zum Hosten des Sprachservers selbst verwendet werden soll. Beispiel: \"/home/username/mycustomdotnetdirectory\".", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "Zugehörige JSON-Komponenten unter dem Cursor markieren.", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "Zugehörige Komponenten regulärer Ausdrücke unter dem Cursor markieren.", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "Hinweise unterdrücken, wenn das Argument mit dem Namen des Parameters übereinstimmt", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "Hinweise unterdrücken, wenn der Parametername mit der Methodenabsicht übereinstimmt", "configuration.dotnet.navigation.navigateToDecompiledSources": "Aktivieren der Navigation zu dekompilierten Quellen.", + "configuration.dotnet.preferCSharpExtension": "Erzwingt, dass Projekte nur mit der C#-Erweiterung geladen werden. Dies kann nützlich sein, wenn Legacy-Projekttypen verwendet werden, die vom C# Dev Kit nicht unterstützt werden. (Erfordert erneutes Laden des Fensters)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "Beschreibungsinformationen beim Anzeigen des Symbols anzeigen.", + "configuration.dotnet.server.crashDumpPath": "Legt einen Ordnerpfad fest, in den Absturzabbilder geschrieben werden, wenn der Sprachserver abstürzt. Muss vom Benutzer beschreibbar sein.", "configuration.dotnet.server.extensionPaths": "Außerkraftsetzung für Pfad zu Sprachserver --extension-Argumenten", - "configuration.dotnet.server.path": "Gibt den absoluten Pfad zur ausführbaren Serverdatei (LSP oder O#) an. Wenn sie leer gelassen wird, wird die an die C#-Erweiterung angeheftete Version verwendet.", + "configuration.dotnet.server.path": "Gibt den absoluten Pfad zur ausführbaren Serverdatei (LSP oder O#) an. Wenn sie leer gelassen wird, wird die an die C#-Erweiterung angeheftete Version verwendet. (Zuvor \"omnisharp.path\")", + "configuration.dotnet.server.startTimeout": "Gibt ein Timeout (in ms) an, mit dem der Client erfolgreich gestartet und eine Verbindung mit dem Sprachserver hergestellt werden kann.", "configuration.dotnet.server.trace": "Legt den Protokolliergrad für den Sprachserver fest.", - "configuration.dotnet.server.waitForDebugger": "Übergibt das Flag \"--debug\" beim Starten des Servers, damit ein Debugger angefügt werden kann.", + "configuration.dotnet.server.waitForDebugger": "Übergibt das Flag \"--debug\" beim Starten des Servers, damit ein Debugger angefügt werden kann. (Zuvor \"omnisharp.waitForDebugger\")", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "Symbole in Verweisassemblys suchen. Dies wirkt sich auf Features aus, die eine Symbolsuche erfordern, z. B. Importe hinzufügen.", - "configuration.dotnet.unitTestDebuggingOptions": "Optionen, die mit dem Debugger beim Starten des Komponententestdebuggings verwendet werden können.", + "configuration.dotnet.unitTestDebuggingOptions": "Optionen, die mit dem Debugger beim Starten des Komponententestdebuggings verwendet werden können. (Zuvor \"csharp.unitTestDebuggingOptions\")", "configuration.razor.languageServer.debug": "Gibt an, ob beim Starten des Sprachservers auf die Debuganfügung gewartet werden soll.", "configuration.razor.languageServer.directory": "Überschreibt den Pfad zum Razor-Sprachserver-Verzeichnis.", "configuration.razor.trace": "Gibt an, ob alle Nachrichten [Verbose], einige Nachrichten [Messages] oder gar nicht [Off] ausgegeben werden sollen.", "configuration.razor.trace.messages": "Protokolliert nur einige Nachrichten von der Razor-Erweiterung.", "configuration.razor.trace.off": "Protokolliert keine Nachrichten von der Razor-Erweiterung.", "configuration.razor.trace.verbose": "Protokolliert alle Nachrichten aus der Razor-Erweiterung.", + "debuggers.coreclr.configurationSnippets.description.attach": "Fügen Sie den .NET-Debugger (coreclr) an einen laufenden Prozess an. Dies kann auch mit dem Befehl \"An einen .NET 5+- oder .NET Core-Prozess anfügen\" erfolgen.", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "Dieser Codeschnipsel wird verwendet, um einen neuen Prozess unter dem Blazor WebAssembly-Debugger (blazorwasm) zu starten. Dabei wird der Pfad zu der ausführbaren Datei angegeben, die gestartet werden soll. In den meisten Fällen ist der Codeschnipsel \".NET: C#-Projekt starten\" die bessere Wahl. Dieser Codeschnipsel kann jedoch verwendet werden, um Vollzugriff auf alle Startoptionen zu erhalten. Dieser Codeschnipsel ist für gehostete Blazor-Projekte vorgesehen. Dabei handelt es sich um ein Projekt, das im Back-End über eine ASP.NET Core-App zum Verarbeiten der Dateien verfügt.", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "Dieser Codeschnipsel wird verwendet, um einen neuen Prozess unter dem Blazor WebAssembly-Debugger (blazorwasm) zu starten. In den meisten Fällen ist der Codeschnipsel \".NET: C#-Projekt starten\" die bessere Wahl. Dieser Codeschnipsel kann jedoch verwendet werden, um Vollzugriff auf alle Startoptionen zu erhalten. Dieser Codeschnipsel ist für eigenständige Blazor-Projekte vorgesehen. Dabei handelt es sich um ein Projekt, das im Back-End über keine ASP.NET Core-App zum Verarbeiten der Dateien verfügt.", + "debuggers.coreclr.configurationSnippets.description.console-local": "Dieser Codeschnipsel wird verwendet, um einen neuen Prozess unter dem .NET-Debugger (coreclr) zu starten. Dabei wird der Pfad zu der ausführbaren Datei angegeben, die gestartet werden soll. In den meisten Fällen ist der Codeschnipsel \".NET: C#-Projekt starten\" die bessere Wahl. Dieser Codeschnipsel ist nützlich, wenn das Projekt außerhalb dieser VS Code-Instanz erstellt wurde, wenn Sie Ihren .NET-Code in einer benutzerdefinierten ausführbaren Datei (z. B. in einer bestimmten Version von \"dotnet.exe\"/\"dotnet\") hosten möchten oder wenn der .NET-Code von einer nativen Anwendung gehostet wird. Dieser Codeschnipsel ist für Konsolenanwendungen vorgesehen.", + "debuggers.coreclr.configurationSnippets.description.remote": "Dieser Codeschnipsel zeigt, wie Sie ein Remotedebuggen von .NET Code **ohne** die Remotefunktion von VS Code durchführen. Dies sollte in Fällen verwendet werden, in denen Sie Ihr Projekt lokal erstellen, aber auf einem anderen Computer ausführen möchten.", + "debuggers.coreclr.configurationSnippets.description.web-local": "Dieser Codeschnipsel wird verwendet, um einen neuen Prozess unter dem .NET-Debugger (coreclr) zu starten. Dabei wird der Pfad zu der ausführbaren Datei angegeben, die gestartet werden soll. In den meisten Fällen ist der Codeschnipsel \".NET: C#-Projekt starten\" die bessere Wahl. Dieser Codeschnipsel ist nützlich, wenn das Projekt außerhalb dieser VS Code-Instanz erstellt wurde, wenn Sie Ihren .NET-Code in einer benutzerdefinierten ausführbaren Datei (z. B. in einer bestimmten Version von \"dotnet.exe\"/\"dotnet\") hosten möchten oder wenn der .NET-Code von einer nativen Anwendung gehostet wird. Dieser Codeschnipsel ist für Webanwendungen (ASP.NET Core) geeignet.", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: An einen .NET-Prozess anfügen", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: Remotedebuggen – An .NET-Prozess anfügen", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Webassembly – Gehostetes Blazor-Projekt starten", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Webassembly – Eigenständiges Blazor-Projekt starten", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Ausführbare Datei starten (Konsole)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: Remotedebuggen – Ausführbare Datei starten (Konsole)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Ausführbare Datei starten (Web)", + "debuggers.dotnet.configurationSnippets.description": "Dieser Codeschnipsel konfiguriert VS Code für das Debuggen eines C#-Projekts. Debugoptionen (zum Beispiel Argumente für die ausführbare Datei) können über die Datei '/Properties/launchSettings.json' konfiguriert werden.", + "debuggers.dotnet.configurationSnippets.label": ".NET: C#-Projekt starten", "debuggers.dotnet.launch.launchConfigurationId.description": "Die zu verwendende Startkonfigurations-ID. Eine leere Zeichenfolge verwendet die aktuelle aktive Konfiguration.", "debuggers.dotnet.launch.projectPath.description": "Pfad zur CSPROJ-Datei.", "generateOptionsSchema.allowFastEvaluate.description": "Bei \"true\" (Standardzustand) versucht der Debugger eine schnellere Auswertung, indem er die Ausführung einfacher Eigenschaften und Methoden simuliert.", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "Gibt bei Angabe den Namen des Profils in \"launchSettings.json\" an, das verwendet werden soll. Dies wird ignoriert, wenn launchSettings.json nicht gefunden wird. \"launchSettings.json\" wird aus dem angegebenen Pfad gelesen. Dabei muss es sich um die Eigenschaft \"launchSettingsFilePath\" oder um {cwd}/Properties/launchSettings.json handeln, wenn dies nicht festgelegt ist. Wenn dieser Wert auf NULL oder eine leere Zeichenfolge festgelegt ist, wird launchSettings.json ignoriert. Wenn dieser Wert nicht angegeben ist, wird das erste Projekt-Profil verwendet.", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "Kennzeichnung, um zu bestimmen, ob stdout-Text vom Start des Webbrowsers im Ausgabefenster protokolliert werden soll. Diese Option wird standardmäßig auf \"true\" festgelegt.", "generateOptionsSchema.logging.description": "Kennzeichnungen, um zu bestimmen, welche Nachrichtentypen im Ausgabefenster protokolliert werden sollen.", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Bei \"True\" beinhaltet die Engine-Protokollierung die Eigenschaften \"adapterElapsedTime\" und \"engineElapsedTime\", um anzugeben, wie lange eine Anforderung in Mikrosekunden gedauert hat. Diese Option ist standardmäßig auf \"false\" festgelegt.", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "Kennzeichnung, um zu bestimmen, ob Protokolle der Diagnose-Engine im Ausgabefenster protokolliert werden sollen. Diese Option ist standardmäßig auf \"false\" festgelegt.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "Hiermit werden alle Debugger-API-Aufrufe ausgegeben. Diese Option ist sehr ausführlich.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "Hiermit werden Fehler aus Debugger-API-Aufrufen ausgegeben.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Steuert, ob API-Aufrufe an \"Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h\" im Ausgabefenster ausgegeben werden sollen. Diese Option ist standardmäßig auf \"none\" festgelegt.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "Ablaufverfolgung für API-Aufrufe deaktivieren", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "Flag, mit dem festgelegt wird, ob die ausführliche Ablaufverfolgung für Ereignisse aktiviert werden soll, die von der zugrunde liegenden Runtime ausgelöst werden. Diese Option ist standardmäßig auf \"false\" festgelegt.", + "generateOptionsSchema.logging.diagnosticsLog.description": "Einstellungen, mit denen festgelegt wird, welche Meldungen aus dem Diagnoseprotokoll des Debuggers im Ausgabefenster ausgegeben werden. Dieses Protokoll dient zur Unterstützung bei der Behandlung von Problemen mit dem Debugger.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "Hiermit werden Diagnosemeldungen auf Fehlerebene ausgegeben.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "Hiermit werden wichtige Diagnosemeldungen ausgegeben.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "Steuert, welche Meldungen vom Dispatcher des Debuggers im Ausgabefenster ausgegeben werden. Sofern nicht angegeben, wird standardmäßig \"none\" verwendet – es sei denn, eine der ausführlichen Protokolleinstellungen ist aktiviert (\"debugEngineAPITracing\", \"debugRuntimeEventTracing\", \"expressionEvaluationTracing\" oder \"startDebuggingTracing\"). In diesem Fall wird der Standardwert in \"normal\" geändert.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "Hiermit werden keine zusätzlichen Diagnosemeldungen ausgegeben.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "Hiermit werden alle nicht ausführlichen Diagnosemeldungen ausgegeben.", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "Flag, mit dem festgelegt wird, ob die ausführliche Ablaufverfolgung für die Ausdrucksauswertung aktiviert werden soll. Diese Option ist standardmäßig auf \"false\" festgelegt.", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "Flag, mit dem festgelegt wird, ob die zwischen dem C#-Debugger und der Benutzeroberfläche ausgetauschten DAP-Protokollnachrichten im Ausgabefenster protokolliert werden sollen. Diese Option ist standardmäßig auf \"false\" festgelegt.", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "Flag zur Festlegung, ob die ausführliche Ablaufverfolgung beim Starten des Debuggens aktiviert werden soll. Diese Option ist standardmäßig auf \"false\" festgelegt.", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Bei einer Festlegung auf \"true\" umfasst die Nachrichtenprotokollierung die Eigenschaften \"adapterElapsedTime\" und \"engineElapsedTime\", um die Zeitspanne in Mikrosekunden anzugeben, die für eine Anforderung benötigt wurde. Diese Option ist standardmäßig auf \"false\" festgelegt.", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "Die Einstellung \"logging.engineLogging\" wurde zugunsten von \"logging.diagnosticsLog.protocolMessages\" als veraltet eingestuft.", "generateOptionsSchema.logging.exceptions.markdownDescription": "Kennzeichnung, um zu bestimmen, ob Ausnahmemeldungen im Ausgabefenster protokolliert werden sollen. Diese Option wird standardmäßig auf \"true\" festgelegt.", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "Kennzeichnung, um zu bestimmen, ob Modulladeereignisse im Ausgabefenster protokolliert werden sollen. Diese Option wird standardmäßig auf \"true\" festgelegt.", "generateOptionsSchema.logging.processExit.markdownDescription": "Steuert, ob eine Nachricht protokolliert wird, wenn der Zielprozess beendet oder das Debuggen beendet wird. Diese Option wird standardmäßig auf \"true\" festgelegt.", @@ -137,8 +193,8 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadAllButExcluded.enumDescription": "Laden Sie Symbole für alle Module, es sei denn, das Modul befindet sich im Array „excludedModules“.", "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "Versuchen Sie nicht, Symbole für IRGENDEIN Modul zu laden, es sei denn, es befindet sich im Array „includedModules“, oder es wird über die Einstellung „includeSymbolsNextToModules“ hinzugefügt.", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "Wenn „true“, wird der Microsoft-Symbolserver (https​://msdl.microsoft.com​/download/symbols) dem Symbolsuchpfad hinzugefügt. Wenn nicht angegeben, wird diese Option standardmäßig auf „false“ eingestellt.", - "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Bei \"true\" wird der NuGet.org-Symbolserver (https://symbols.nuget.org/download/symbols) dem Symbolsuchpfad hinzugefügt. Wenn keine Angabe erfolgt, wird diese Option standardmäßig auf \"false\" festgelegt.", - "generateOptionsSchema.symbolOptions.searchPaths.description": "Ein Array von Symbolserver-URLs (Beispiel: http​://MyExampleSymbolServer) oder Verzeichnisse (Beispiel:/Build/Symbols) für die Suche nach PDB-Dateien. Diese Verzeichnisse werden zusätzlich zu den Standardspeicherorten durchsucht – neben dem Modul und dem Pfad, in dem die PDB ursprünglich abgelegt wurde.", + "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Bei \"true\" wird der NuGet.org-Symbolserver (https​://symbols.nuget.org​/download/symbols) dem Symbolsuchpfad hinzugefügt. Wenn keine Angabe erfolgt, wird diese Option standardmäßig auf \"false\" festgelegt.", + "generateOptionsSchema.symbolOptions.searchPaths.description": "Array von Symbolserver-URLs (example: http​://MyExampleSymbolServer) oder Verzeichnisse (example: /build/symbols), um nach PDB-Dateien zu suchen. Diese Verzeichnisse werden zusätzlich zu den Standardspeicherorten durchsucht – neben dem Modul und dem Pfad, in dem die PDB-Datei ursprünglich abgelegt wurde.", "generateOptionsSchema.targetArchitecture.markdownDescription": "[Nur beim lokalen macOS-Debuggen unterstützt]\r\n\r\nDie Architektur des Debuggens. Dies wird automatisch erkannt, es sei denn, dieser Parameter ist festgelegt. Zulässige Werte sind \"x86_64\" oder \"arm64\".", "generateOptionsSchema.targetOutputLogPath.description": "Bei Festlegung wird Text, den die Zielanwendung in \"stdout\" und \"stderr\" (z. B. Console.WriteLine) schreibt, in der angegebenen Datei gespeichert. Diese Option wird ignoriert, wenn die Konsole auf einen anderen Wert als internalConsole festgelegt ist. Beispiel: \"${workspaceFolder}/out.txt\"", "viewsWelcome.debug.contents": "[C#-Objekte für Build und Debuggen generieren](command:dotnet.generateAssets)\r\n\r\nWeitere Informationen zu launch.json finden Sie unter [Konfigurieren von launch.json für das C#-Debuggen](https://aka.ms/VSCode-CS-LaunchJson)." diff --git a/package.nls.es.json b/package.nls.es.json index e27173514..779c7817a 100644 --- a/package.nls.es.json +++ b/package.nls.es.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": "Adjuntar a un proceso de .NET 5 (o posterior) o .NET Core", + "command.csharp.downloadDebugger": "Descargar depurador de .NET Core", + "command.csharp.listProcess": "Enumerar proceso que se va a adjuntar", + "command.csharp.listRemoteDockerProcess": "Enumerar procesos en conexión de Docker", + "command.csharp.listRemoteProcess": "Enumerar procesos en conexión remota para adjuntar", + "command.csharp.reportIssue": "Informar de un problema", + "command.csharp.showDecompilationTerms": "Mostrar el contrato de términos del descompilador", + "command.dotnet.generateAssets.currentProject": "Generar recursos para compilar y depurar", + "command.dotnet.openSolution": "Abrir solución", + "command.dotnet.restartServer": "Reiniciar servidor de lenguaje", + "command.dotnet.restore.all": "Restaurar todos los proyectos", + "command.dotnet.restore.project": "Restaurar proyecto", + "command.dotnet.test.debugTestsInContext": "Depurar pruebas en contexto", + "command.dotnet.test.runTestsInContext": "Ejecutar pruebas en contexto", + "command.extension.showRazorCSharpWindow": "Mostrar CSharp de Razor", + "command.extension.showRazorHtmlWindow": "Mostrar HTML de Razor", + "command.o.fixAll.document": "Corregir todas las repeticiones de un problema de código en el documento", + "command.o.fixAll.project": "Corregir todas las repeticiones de un problema de código en el proyecto", + "command.o.fixAll.solution": "Corregir todas las repeticiones de un problema de código en la solución", + "command.o.pickProjectAndStart": "Seleccionar proyecto", + "command.o.reanalyze.allProjects": "Analizar todos los proyectos", + "command.o.reanalyze.currentProject": "Analizar proyecto actual", + "command.o.restart": "Reiniciar OmniSharp", + "command.razor.reportIssue": "Notificar un problema de Razor", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "Mostrar sugerencias para la creación implícita de objetos", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "Mostrar sugerencias para las variables con tipos inferidos", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "Mostrar sugerencias para indizadores", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "Mostrar sugerencias para los tipos de parámetros lambda", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "Mostrar sugerencias de tipo insertado", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Ejecutar el análisis del código en segundo plano para:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Ejecutar análisis de código en segundo plano para: (anteriormente \"omnisharp.enableRoslynAnalyzers\")", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "Toda la solución", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "Ninguno", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "Documentos abiertos", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "Toda la solución", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "Ninguno", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "Documentos abiertos", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "Especifica si se deben mostrar las referencias a CodeLens.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "Especifica si se debe mostrar CodeLens de prueba de ejecución y depuración.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "Especifica si se deben mostrar las referencias CodeLens. (Anteriormente \"csharp.referencesCodeLens.enabled\")", + "configuration.dotnet.codeLens.enableTestsCodeLens": "Especifica si se debe mostrar CodeLens de prueba de ejecución y depuración. (Anteriormente \"csharp.testsCodeLens.enabled\")", "configuration.dotnet.completion.provideRegexCompletions": "Mostrar expresiones regulares en la lista de finalización.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Habilita la compatibilidad para mostrar tipos no importados y métodos de extensión no importados en listas de finalización. Cuando se confirme, la directiva de uso adecuada se agregará en la parte superior del archivo actual.", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Habilita la compatibilidad para mostrar tipos no importados y métodos de extensión no importados en listas de finalización. Cuando se confirme, se agregará la directiva de uso adecuada en la parte superior del archivo actual. (Anteriormente \"omnisharp.enableImportCompletion\")", "configuration.dotnet.completion.showNameCompletionSuggestions": "Realice la finalización automática del nombre de objeto para los miembros que ha seleccionado recientemente.", - "configuration.dotnet.defaultSolution.description": "Ruta de acceso de la solución predeterminada que se va a abrir en el área de trabajo o que se establece en \"deshabilitar\" para omitirla.", + "configuration.dotnet.defaultSolution.description": "Ruta de acceso de la solución predeterminada que se va a abrir en el área de trabajo o se establece en \"deshabilitar\" para omitirla. (Anteriormente \"omnisharp.defaultLaunchSolution\")", "configuration.dotnet.dotnetPath": "Especifica la ruta de acceso a un directorio de instalación de dotnet que se va a usar en lugar del predeterminado del sistema. Esto solo influye en la instalación de dotnet que se va a usar para hospedar el propio servidor de idioma. Ejemplo: \"/home/username/mycustomdotnetdirectory\".", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "Resaltar los componentes JSON relacionados bajo el cursor.", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "Resaltar los componentes de expresiones regulares relacionados bajo el cursor.", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "Suprimir las sugerencias cuando el argumento coincide con el nombre del parámetro", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "Suprimir las sugerencias cuando el nombre del parámetro coincida con la intención del método", "configuration.dotnet.navigation.navigateToDecompiledSources": "Habilitar la navegación a fuentes descompiladas.", + "configuration.dotnet.preferCSharpExtension": "Fuerza la carga de proyectos solo con la extensión de C#. Esto puede ser útil cuando se usan tipos de proyecto heredados que no son compatibles con el kit de desarrollo de C#. (Requiere volver a cargar la ventana)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "Mostrar información de comentarios cuando se muestra el símbolo.", + "configuration.dotnet.server.crashDumpPath": "Establece una ruta de acceso de carpeta en la que se escriben los volcados de memoria si el servidor de lenguaje se bloquea. El usuario debe poder escribir en él.", "configuration.dotnet.server.extensionPaths": "Invalidación de la ruta de acceso a los argumentos --extension del servidor de lenguaje", - "configuration.dotnet.server.path": "Especifica la ruta de acceso absoluta al ejecutable del servidor (LSP o O#). Cuando se deja vacía, se usa la versión anclada a la extensión de C#.", + "configuration.dotnet.server.path": "Especifica la ruta absoluta al ejecutable del servidor (LSP u O#). Cuando se deja vacío, se utiliza la versión anclada a la extensión C#. (Anteriormente \"omnisharp.path\")", + "configuration.dotnet.server.startTimeout": "Especifica un tiempo de espera (en ms) para que el cliente se inicie correctamente y se conecte al servidor de lenguaje.", "configuration.dotnet.server.trace": "Establece el nivel de registro para el servidor de lenguaje", - "configuration.dotnet.server.waitForDebugger": "Pasa la marca --debug al iniciar el servidor para permitir que se adjunte un depurador.", + "configuration.dotnet.server.waitForDebugger": "Pasa la marca --debug al iniciar el servidor para permitir que se adjunte un depurador. (Anteriormente \"omnisharp.waitForDebugger\")", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "Buscar símbolos en ensamblados de referencia. Afecta a las características y requiere la búsqueda de símbolos, como agregar importaciones.", - "configuration.dotnet.unitTestDebuggingOptions": "Opciones que se van a usar con el depurador al iniciar para la depuración de pruebas unitarias.", + "configuration.dotnet.unitTestDebuggingOptions": "Opciones que se van a usar con el depurador al iniciar para la depuración de pruebas unitarias. (Anteriormente \"csharp.unitTestDebuggingOptions\")", "configuration.razor.languageServer.debug": "Especifica si se debe esperar a que se adjunte la depuración al iniciar el servidor de lenguaje.", "configuration.razor.languageServer.directory": "Invalida la ruta de acceso al directorio del servidor de lenguaje Razor.", "configuration.razor.trace": "Especifica si se deben generar todos los mensajes [Verbose], algunos mensajes [Messages] o no [Off].", "configuration.razor.trace.messages": "Registra solo algunos mensajes de la extensión Razor.", "configuration.razor.trace.off": "No registra mensajes de la extensión Razor", "configuration.razor.trace.verbose": "Registra todos los mensajes de la extensión Razor.", + "debuggers.coreclr.configurationSnippets.description.attach": "Adjunte el depurador de .NET (coreclr) a un proceso en ejecución. Esto también se puede hacer mediante el comando \"Asociar a un proceso de .NET 5+ o .NET Core\".", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "Este fragmento de código se usa para iniciar un nuevo proceso en el depurador Blazor WebAssembly (blazorwasm), especificando la ruta de acceso al ejecutable que se va a iniciar. En la mayoría de los casos, \".NET: Launch C# project\" (Iniciar proyecto de C#) es una mejor opción, pero este fragmento de código se puede usar para tener control total sobre todas las opciones de inicio. Este fragmento de código es para proyectos de Blazor hospedados, que es un proyecto que tiene un back-end ASP.NET aplicación Core para atender sus archivos.", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "Este fragmento de código se usa para iniciar un nuevo proceso en el depurador WebAssembly de Blazor (blazorwasm). En la mayoría de los casos, \".NET: Launch C# project\" (Iniciar proyecto de C#) es una mejor opción, pero este fragmento de código se puede usar para tener control total sobre todas las opciones de inicio. Este fragmento de código es para proyectos independientes de Blazor, que es un proyecto que no tiene un back-end ASP.NET aplicación core para atender sus archivos.", + "debuggers.coreclr.configurationSnippets.description.console-local": "Este fragmento de código se usa para iniciar un nuevo proceso en el depurador de .NET (coreclr), especificando la ruta de acceso al ejecutable que se va a iniciar. En la mayoría de los casos, \".NET: El fragmento de código \"Launch C# project\" (Iniciar proyecto de C#) es una mejor opción. Este fragmento de código es útil cuando el proyecto se compiló fuera de esta instancia de VS Code o si desea hospedar el código .NET en un archivo ejecutable personalizado, como una versión específica de \"dotnet.exe\"/\"dotnet\" o el código .NET se hospeda en una aplicación nativa. Este fragmento de código es para aplicaciones de consola.", + "debuggers.coreclr.configurationSnippets.description.remote": "Este fragmento de código muestra cómo depurar de forma remota .NET Code **sin** mediante VS Code comunicación remota. Debe usarse en los casos en los que desea compilar el proyecto localmente, pero ejecutarlo en otro equipo.", + "debuggers.coreclr.configurationSnippets.description.web-local": "Este fragmento de código se usa para iniciar un nuevo proceso en el depurador de .NET (coreclr), especificando la ruta de acceso al ejecutable que se va a iniciar. En la mayoría de los casos, \".NET: El fragmento de código \"Launch C# project\" (Iniciar proyecto de C#) es una mejor opción. Este fragmento de código es útil cuando el proyecto se compiló fuera de esta instancia de VS Code o si desea hospedar el código .NET en un archivo ejecutable personalizado, como una versión específica de \"dotnet.exe\"/\"dotnet\" o el código .NET se hospeda en una aplicación nativa. Este fragmento de código es para aplicaciones web (ASP.NET Core).", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: Asociación a un proceso de .NET", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: Depuración remota: Asociación a un proceso de .NET", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Ensamblado web: Inicio del proyecto de Blazor hospedado", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Ensamblado web: Inicio de un proyecto de Blazor independiente", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Iniciar archivo ejecutable (consola)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: Depuración remota: Iniciar archivo ejecutable (consola)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Iniciar archivo ejecutable (Web)", + "debuggers.dotnet.configurationSnippets.description": "Este fragmento de código configura VS Code para depurar un proyecto de C#. Las opciones de depuración (ejemplo: argumentos para el ejecutable) se pueden configurar a través del archivo \"/Properties/launchSettings.json\".", + "debuggers.dotnet.configurationSnippets.label": ".NET: Iniciar proyecto de C#", "debuggers.dotnet.launch.launchConfigurationId.description": "Identificador de configuración de inicio que se va a usar. La cadena vacía usará la configuración activa actual.", "debuggers.dotnet.launch.projectPath.description": "Ruta de acceso al archivo .csproj.", "generateOptionsSchema.allowFastEvaluate.description": "Cuando es true (el estado predeterminado), el depurador intentará una evaluación más rápida simulando la ejecución de propiedades y métodos simples.", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "Si se especifica, indica el nombre del perfil en launchSettings.json que se va a usar. Esto se omite si no se encuentra launchSettings.json. launchSettings.json se leerá desde la ruta de acceso especificada si se establece la propiedad \"launchSettingsFilePath\" o {cwd}/Properties/launchSettings.json si no está establecida. Si se establece en null o en una cadena vacía, se omite launchSettings.json. Si no se especifica este valor, se usará el primer perfil “Project”.", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "Marca para determinar si el texto stdout del inicio del explorador web debe registrarse en la ventana de salida. Esta opción tiene como valor predeterminado \"true\".", "generateOptionsSchema.logging.description": "Marcas para determinar qué tipos de mensajes se deben registrar en la ventana de salida.", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Si es true, el registro del motor incluirá las propiedades \"adapterElapsedTime\" y \"engineElapsedTime\" para indicar la cantidad de tiempo, en microsegundos, que tardó una solicitud. El valor predeterminado de esta opción es \"false\".", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "Marca para determinar si los registros del motor de diagnóstico se deben registrar en la ventana de salida. El valor predeterminado de esta opción es \"false\".", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "Imprima todas las llamadas API del depurador. Esto es muy detallado.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "Errores de impresión de llamadas API del depurador.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Controla si las llamadas API a Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h se deben imprimir en la ventana de salida. El valor predeterminado de esta opción es \"none\".", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "Deshabilitar llamadas API de seguimiento", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "Marca para determinar si debe habilitarse el seguimiento detallado de eventos generados por el tiempo de ejecución subyacente. El valor predeterminado de esta opción es \"false\".", + "generateOptionsSchema.logging.diagnosticsLog.description": "Configuración para controlar los mensajes que se imprimen en la ventana de salida desde el registro de diagnóstico del depurador. Este registro está diseñado para ayudar a solucionar problemas con el depurador.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "Imprima mensajes de diagnóstico de nivel de error.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "Imprima mensajes de diagnóstico importantes.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "Controla los mensajes que se imprimen en la ventana de salida desde el Dispatcher del depurador. Si no se especifica, el valor predeterminado será \"none\" a menos que se habilite una de las opciones de registro detalladas (\"debugEngineAPITracing\", \"debugRuntimeEventTracing\", \"expressionEvaluationTracing\" o \"startDebuggingTracing\"), en cuyo caso el valor predeterminado cambia a \"normal\".", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "No imprimir mensajes de diagnóstico adicionales.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "Imprima todos los mensajes de diagnóstico no detallados.", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "Marca para determinar si debe habilitarse el seguimiento detallado para la evaluación de expresiones. El valor predeterminado de esta opción es \"false\".", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "Marca para determinar si los mensajes de protocolo DAP intercambiados entre el depurador de C# y la interfaz de usuario deben registrarse en la ventana de salida. El valor predeterminado de esta opción es \"false\".", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "Marca para determinar si debe habilitarse el seguimiento detallado para iniciar la depuración. El valor predeterminado de esta opción es \"false\".", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Si es true, el registro del mensaje de protocolo incluirá las propiedades \"adapterElapsedTime\" y \"engineElapsedTime\" para indicar la cantidad de tiempo, en microsegundos, que tardó una solicitud. El valor predeterminado de esta opción es \"false\".", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "La configuración \"logging.engineLogging\" ha quedado en desuso en favor de \"logging.diagnosticsLog.protocolMessages\".", "generateOptionsSchema.logging.exceptions.markdownDescription": "Marca para determinar si los mensajes de excepción se deben registrar en la ventana de salida. Esta opción tiene como valor predeterminado \"true\".", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "Marca para determinar si los eventos de carga del módulo se deben registrar en la ventana de salida. Esta opción tiene como valor predeterminado \"true\".", "generateOptionsSchema.logging.processExit.markdownDescription": "Controla si se registra un mensaje cuando se cierra el proceso de destino o se detiene la depuración. Esta opción tiene como valor predeterminado \"true\".", @@ -137,8 +193,8 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadAllButExcluded.enumDescription": "Cargar símbolos para todos los módulos a menos que el módulo esté en la matriz «excludedModules».", "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "No intente cargar los símbolos de NINGÚN módulo a menos que esté en la matriz «includedModules» o se incluya a través de la configuración «includeSymbolsNextToModules».", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "Si es «verdadero», se agrega el servidor de símbolos de Microsoft (https​://msdl.microsoft.com​/download/symbols) a la ruta de búsqueda de símbolos. Si no se especifica, esta opción tendrá el valor predeterminado de «falso».", - "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Si es \"true\", el servidor de símbolos de NuGet.org (https://symbols.nuget.org/download/symbols) se agrega a la ruta de acceso de búsqueda de símbolos. Si no se especifica, el valor predeterminado de esta opción es \"false\".", - "generateOptionsSchema.symbolOptions.searchPaths.description": "Matriz de direcciones URL del servidor de símbolos (ejemplo: http​://MiServidordeSímblosdeEjemplo) o de directorios (ejemplo: /compilar/symbols) para buscar archivos. pdb. Se buscarán estos directorios además de las ubicaciones predeterminadas, junto al módulo y la ruta de acceso en la que se anuló originalmente el archivo pdb.", + "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Si es \"true\", el servidor de símbolos de NuGet.org (https​://symbols.nuget.org​/download/symbols) se agrega a la ruta de acceso de búsqueda de símbolos. Si no se especifica, el valor predeterminado de esta opción es \"false\".", + "generateOptionsSchema.symbolOptions.searchPaths.description": "Matriz de direcciones URL del servidor de símbolos (ejemplo: http​://MyExampleSymbolServer) o directorios (ejemplo: /build/symbols) para buscar archivos .pdb. Se buscarán estos directorios además de las ubicaciones predeterminadas, junto al módulo y la ruta de acceso en la que se anuló originalmente el archivo pdb.", "generateOptionsSchema.targetArchitecture.markdownDescription": "[Solo se admite en la depuración local de macOS]\r\n\r\nArquitectura del depurado. Esto se detectará automáticamente a menos que se establezca este parámetro. Los valores permitidos son \"x86_64\" o \"arm64\".", "generateOptionsSchema.targetOutputLogPath.description": "Cuando se establece, el texto que la aplicación de destino escribe en stdout y stderr (por ejemplo, Console.WriteLine) se guardará en el archivo especificado. Esta opción se omite si la consola se establece en un valor distinto de internalConsole. Por ejemplo, \"${workspaceFolder}/out.txt\"", "viewsWelcome.debug.contents": "[Generar recursos de C# para compilación y depuración](command:dotnet.generateAssets)\r\n\r\nPara obtener más información sobre launch.json, consulte [Configuración de launch.json para la depuración de C#](https://aka.ms/VSCode-CS-LaunchJson)." diff --git a/package.nls.fr.json b/package.nls.fr.json index 408e61f54..4ac3e4989 100644 --- a/package.nls.fr.json +++ b/package.nls.fr.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": "Attacher à un processus .NET 5+ ou .NET Core", + "command.csharp.downloadDebugger": "Télécharger le débogueur .NET Core", + "command.csharp.listProcess": "Processus de liste pour la pièce jointe", + "command.csharp.listRemoteDockerProcess": "Répertorier les processus sur la connexion Docker", + "command.csharp.listRemoteProcess": "Répertorier les processus sur la connexion à distance pour la pièce jointe", + "command.csharp.reportIssue": "Signaler un problème", + "command.csharp.showDecompilationTerms": "Afficher l'accord sur les termes du décompilateur", + "command.dotnet.generateAssets.currentProject": "Générer des actifs pour la construction et le débogage", + "command.dotnet.openSolution": "Solution ouverte", + "command.dotnet.restartServer": "Redémarrer le serveur de langue", + "command.dotnet.restore.all": "Restaurer tous les projets", + "command.dotnet.restore.project": "Restaurer le projet", + "command.dotnet.test.debugTestsInContext": "Tests de débogage en contexte", + "command.dotnet.test.runTestsInContext": "Exécuter des tests en contexte", + "command.extension.showRazorCSharpWindow": "Afficher le rasoir CSharp", + "command.extension.showRazorHtmlWindow": "Afficher le code HTML du rasoir", + "command.o.fixAll.document": "Corriger toutes les occurrences d'un problème de code dans le document", + "command.o.fixAll.project": "Corriger toutes les occurrences d'un problème de code dans le projet", + "command.o.fixAll.solution": "Corriger toutes les occurrences d'un problème de code dans la solution", + "command.o.pickProjectAndStart": "Sélectionner un projet", + "command.o.reanalyze.allProjects": "Analyser tous les projets", + "command.o.reanalyze.currentProject": "Analyser le projet en cours", + "command.o.restart": "Redémarrez OmniSharp", + "command.razor.reportIssue": "Signaler un problème avec le rasoir", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "Afficher les indicateurs pour la création d'objet implicite", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "Afficher les indicateurs pour les variables ayant des types déduits", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "Afficher les indicateurs pour les indexeurs", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "Afficher les indicateurs pour les types de paramètre lambda", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "Afficher les indicateurs de type inline", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Exécuter une analyse de code en arrière-plan pour :", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Exécuter l’analyse du code en arrière-plan pour : (précédemment, « omnisharp.enableRoslynAnalyzers »)", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "Solution complète", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "Aucun", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "Documents ouverts", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "Solution complète", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "Aucun", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "Documents ouverts", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "Spécifie si les références CodeLens doivent être affichées.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "Spécifie si le codeLens de test d’exécution et de débogage doit être affiché.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "Spécifie si les références CodeLens doivent être affichées. (Précédemment `csharp.referencesCodeLens.enabled`)", + "configuration.dotnet.codeLens.enableTestsCodeLens": "Spécifie si les tests d’exécution et de débogage CodeLens doivent être affichés. (Précédemment `csharp.testsCodeLens.enabled`)", "configuration.dotnet.completion.provideRegexCompletions": "Afficher les expressions régulières dans la liste de saisie semi-automatique.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Active la prise en charge de l’affichage des types non pris en charge et des méthodes d’extension non prises en charge dans les listes de saisie semi-automatique. Une fois validée, la directive using appropriée est ajoutée en haut du fichier actif.", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Active la prise en charge de l’affichage des types non pris en charge et des méthodes d’extension non prises en charge dans les listes de saisie semi-automatique. Une fois validée, la directive using appropriée est ajoutée en haut du fichier actif. (Précédemment `omnisharp.enableImportCompletion`)", "configuration.dotnet.completion.showNameCompletionSuggestions": "Effectuez la complétion automatique du nom d’objet pour les membres que vous avez récemment sélectionnés.", - "configuration.dotnet.defaultSolution.description": "Chemin de la solution par défaut à ouvrir dans l’espace de travail ou définir sur « désactiver » pour l’ignorer.", + "configuration.dotnet.defaultSolution.description": "Le chemin d’accès de la solution par défaut à ouvrir dans l’espace de travail, ou la valeur ’disable’ pour l’ignorer. (Précédemment `omnisharp.defaultLaunchSolution`)", "configuration.dotnet.dotnetPath": "Spécifie le chemin d’accès à un répertoire d’installation de dotnet à utiliser à la place du répertoire par défaut du système. Cela n’a d’influence que sur l’installation dotnet à utiliser pour héberger le serveur de langues lui-même. Exemple : \"/home/username/mycustomdotnetdirect\" : \"/home/nom d’utilisateur/monrépertoiredotnetpersonnalisé\".", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "Mettez en surbrillance les composants JSON associés sous le curseur.", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "Mettre en surbrillance les composants d’expression régulière associés sous le curseur.", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "Supprimer les conseils lorsque l'argument correspond au nom du paramètre", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "Supprimer les indicateurs quand le nom de paramètre correspond à l'intention de la méthode", "configuration.dotnet.navigation.navigateToDecompiledSources": "Activez la navigation vers les sources décompliées.", + "configuration.dotnet.preferCSharpExtension": "Force le chargement des projets avec l'extension C# uniquement. Cela peut être utile lors de l’utilisation de types de projets hérités qui ne sont pas pris en charge par C# Dev Kit. (Nécessite le rechargement de la fenêtre)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "Afficher les informations sur les remarques lors de l’affichage du symbole.", + "configuration.dotnet.server.crashDumpPath": "Définit un chemin de dossier dans lequel les vidages sur incident sont écrits en cas de panne du serveur de langue. Doit être accessible en écriture par l'utilisateur.", "configuration.dotnet.server.extensionPaths": "Remplacer le chemin d’accès au serveur de langage --extension arguments", - "configuration.dotnet.server.path": "Spécifie le chemin absolu du fichier exécutable du serveur (LSP ou O#). Lorsqu’elle est laissée vide, la version épinglée à l’extension C# est utilisée.", + "configuration.dotnet.server.path": "Spécifie le chemin absolu du fichier exécutable du serveur (LSP ou O#). Lorsqu’elle est laissée vide, la version épinglée à l’extension C# est utilisée. (Précédemment `omnisharp.path`)", + "configuration.dotnet.server.startTimeout": "Spécifie un délai d'attente (en ms) pour que le client démarre et se connecte avec succès au serveur de langue.", "configuration.dotnet.server.trace": "Définit le niveau de journalisation pour le serveur de langage", - "configuration.dotnet.server.waitForDebugger": "Passe l’indicateur --debug au lancement du serveur pour permettre l’attachement d’un débogueur.", + "configuration.dotnet.server.waitForDebugger": "Passe le drapeau – debug lors du lancement du serveur pour permettre à un débogueur d’être attaché. (Précédemment `omnisharp.waitForDebugger`)", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "Rechercher des symboles dans les assemblys de référence. Elle affecte les fonctionnalités nécessitant une recherche de symboles, comme l’ajout d’importations.", - "configuration.dotnet.unitTestDebuggingOptions": "Options à utiliser avec le débogueur lors du lancement pour le débogage de test unitaire.", + "configuration.dotnet.unitTestDebuggingOptions": "Options à utiliser avec le débogueur lors du lancement du débogage des tests unitaires. (Précédemment `csharp.unitTestDebuggingOptions`)", "configuration.razor.languageServer.debug": "Spécifie s’il faut attendre l’attachement du débogage au lancement du serveur de langage.", "configuration.razor.languageServer.directory": "Remplace le chemin d’accès au répertoire du serveur de langage Razor.", "configuration.razor.trace": "Spécifie s’il faut générer tous les messages [Verbose], certains messages [Messages] ou pas du tout [Off].", "configuration.razor.trace.messages": "Journalise uniquement certains messages de l’extension Razor", "configuration.razor.trace.off": "Ne consigne pas les messages de l’extension Razor", "configuration.razor.trace.verbose": "Journalise tous les messages de l’extension Razor", + "debuggers.coreclr.configurationSnippets.description.attach": "Attachez le débogueur .NET (coreclr) à un processus en cours d'exécution. Cela peut également être fait à l'aide de la commande « Attacher à un processus .NET 5+ ou .NET Core ».", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "Cet extrait est utilisé pour lancer un nouveau processus sous le débogueur Blazor WebAssembly (blazorwasm), en spécifiant le chemin d'accès à l'exécutable à lancer. Dans la plupart des cas, le \".NET : L'extrait \"Lancer le projet C#\" est un meilleur choix, mais cet extrait peut être utilisé pour avoir un contrôle total sur toutes les options de lancement. Cet extrait est destiné aux projets Blazor hébergés, qui sont un projet doté d'une application backend ASP.NET Core pour servir ses fichiers.", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "Cet extrait est utilisé pour lancer un nouveau processus sous le débogueur Blazor WebAssembly (blazorwasm). Dans la plupart des cas, le \".NET : L'extrait \"Lancer le projet C#\" est un meilleur choix, mais cet extrait peut être utilisé pour avoir un contrôle total sur toutes les options de lancement. Cet extrait concerne les projets Blazor autonomes, qui ne disposent pas d'une application backend ASP.NET Core pour servir ses fichiers.", + "debuggers.coreclr.configurationSnippets.description.console-local": "Cet extrait est utilisé pour lancer un nouveau processus sous le débogueur .NET (coreclr), en spécifiant le chemin d'accès à l'exécutable à lancer. Dans la plupart des cas, le \".NET : L'extrait \"Lancer le projet C#\" est un meilleur choix. Cet extrait est utile lorsque le projet a été créé en dehors de cette instance de VS Code ou que vous souhaitez héberger votre code .NET dans un exécutable personnalisé, tel qu'une version spécifique de 'dotnet.exe'/'dotnet' ou que le code .NET est hébergé. par une application native. Cet extrait est destiné aux applications console.", + "debuggers.coreclr.configurationSnippets.description.remote": "Cet extrait montre comment déboguer à distance le code .NET **sans** utiliser l'accès à distance VS Code. Il doit être utilisé dans les cas où vous souhaitez créer votre projet localement mais l'exécuter sur un autre ordinateur.", + "debuggers.coreclr.configurationSnippets.description.web-local": "Cet extrait est utilisé pour lancer un nouveau processus sous le débogueur .NET (coreclr), en spécifiant le chemin d'accès à l'exécutable à lancer. Dans la plupart des cas, le \".NET : L'extrait \"Lancer le projet C#\" est un meilleur choix. Cet extrait est utile lorsque le projet a été créé en dehors de cette instance de VS Code ou que vous souhaitez héberger votre code .NET dans un exécutable personnalisé, tel qu'une version spécifique de 'dotnet.exe'/'dotnet' ou que le code .NET est hébergé. par une application native. Cet extrait est destiné aux applications Web (ASP.NET Core).", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: Attacher à un processus .NET", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: Débogage à distance – Attacher à un processus .NET", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Web Assembly – Lancement du projet Blazor hébergé", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Web Assembly – Lancer un projet Blazor autonome", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Lancer le fichier exécutable (Console)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: Débogage à distance – Lancer le fichier exécutable (Console)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Lancer le fichier exécutable (Web)", + "debuggers.dotnet.configurationSnippets.description": "Cet extrait configure VS Code pour déboguer un projet C#. Les options de débogage (exemple : arguments de l'exécutable) peuvent être configurées via le fichier '/Properties/launchSettings.json'.", + "debuggers.dotnet.configurationSnippets.label": ".NET: Lancer le projet C#", "debuggers.dotnet.launch.launchConfigurationId.description": "ID de configuration de lancement à utiliser. Une chaîne vide utilisera la configuration active actuelle.", "debuggers.dotnet.launch.projectPath.description": "Chemin du fichier .csproj.", "generateOptionsSchema.allowFastEvaluate.description": "Quand la valeur est true (état par défaut), le débogueur tente une évaluation plus rapide en simulant l’exécution de propriétés et de méthodes simples.", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "Si ce paramètre est spécifié, indique le nom du profil dans launchSettings.json à utiliser. Ceci est ignoré si launchSettings.json est introuvable. launchSettings.json sera lu à partir du chemin spécifié doit être la propriété 'launchSettingsFilePath', ou {cwd}/Properties/launchSettings.json si ce paramètre n’est pas défini. Si cette valeur est définie sur null ou une chaîne vide, launchSettings.json est ignoré. Si cette valeur n’est pas spécifiée, le premier profil 'Project' est utilisé.", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "Indicateur pour déterminer si le texte stdout du lancement du navigateur web doit être enregistré dans la fenêtre Sortie. Cette option a la valeur par défaut 'true'.", "generateOptionsSchema.logging.description": "Indicateurs permettant de déterminer les types de messages à enregistrer dans la fenêtre de sortie.", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Si la valeur est true, la journalisation du moteur inclut les propriétés « adapterElapsedTime » et « engineElapsedTime » pour indiquer la durée, en microsecondes, nécessaire à une demande. Cette option a la valeur par défaut « false ».", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "Indicateur permettant de déterminer si les journaux du moteur de diagnostic doivent être enregistrés dans la fenêtre de sortie. Cette option a la valeur par défaut « false ».", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "Imprimez tous les appels d'API du débogueur. C'est très verbeux.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "Échecs d'impression des appels d'API du débogueur.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Contrôle si les appels d'API à Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h doivent être imprimés dans la fenêtre de sortie. Cette option est par défaut « aucun ».", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "Désactiver les appels d'API de traçage", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "Indicateur permettant de déterminer si le suivi détaillé des événements déclenchés par le runtime sous-jacent doit être activé. Cette option est par défaut « false ».", + "generateOptionsSchema.logging.diagnosticsLog.description": "Paramètres permettant de contrôler quels messages sont imprimés dans la fenêtre de sortie à partir du journal de diagnostics du débogueur. Ce journal est destiné à aider à résoudre les problèmes liés au débogueur.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "Imprimez les messages de diagnostic de niveau d'erreur.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "Imprimez les messages de diagnostic importants.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "Contrôle quels messages sont imprimés dans la fenêtre de sortie à partir du répartiteur du débogueur. S'il n'est pas spécifié, la valeur par défaut sera « aucun », sauf si l'un des paramètres de journal détaillés est activé (`debugEngineAPITracing`, `debugRuntimeEventTracing`, `expressionEvaluationTracing` ou `startDebuggingTracing`), auquel cas la valeur par défaut passe à `normal`.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "N'imprimez pas de messages de diagnostic supplémentaires.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "Imprimez tous les messages de diagnostic non détaillés.", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "Indicateur permettant de déterminer si le suivi détaillé pour l’évaluation des expressions doit être activé. Cette option est par défaut « false ».", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "Indicateur permettant de déterminer si les messages du protocole DAP échangés entre le débogueur C# et l'interface utilisateur doivent être enregistrés dans la fenêtre de sortie. Cette option est par défaut « false ».", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "Indicateur permettant de déterminer si le suivi détaillé pour le démarrage du débogage doit être activé. Cette option est par défaut « false ».", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Si c'est vrai, la journalisation des messages de protocole inclura les propriétés `adapterElapsedTime` et `engineElapsedTime` pour indiquer la durée, en microsecondes, qu'une requête a prise. Cette option est par défaut « false ».", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "Le paramètre « logging.engineLogging » a été obsolète au profit de « logging.diagnosticsLog.protocolMessages ».", "generateOptionsSchema.logging.exceptions.markdownDescription": "Indicateur pour déterminer si les messages d’exception doivent être enregistrés dans la fenêtre de sortie. Cette option a la valeur par défaut « true ».", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "Indicateur pour déterminer si les événements de chargement de module doivent être enregistrés dans la fenêtre de sortie. Cette option a la valeur par défaut « true ».", "generateOptionsSchema.logging.processExit.markdownDescription": "Contrôle si un message est journalisé à la fermeture du processus cible ou si le débogage est arrêté. Cette option a la valeur par défaut 'true'.", @@ -137,8 +193,8 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadAllButExcluded.enumDescription": "Chargez des symboles pour tous les modules, sauf si le module se trouve dans le tableau « excludedModules ».", "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "N’essayez pas de charger des symboles pour le module ANY, sauf s’il se trouve dans le tableau « includedModules » ou s’il est inclus par le biais du paramètre « includeSymbolsNextToModules ».", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "Si la valeur est « true », le serveur de symboles Microsoft (https​://msdl.microsoft.com​/download/symbols) est ajouté au chemin de recherche des symboles. Si elle n’est pas spécifiée, cette option a la valeur par défaut « false ».", - "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Si la valeur est « true », le serveur de symboles NuGet.org (https://symbols.nuget.org/download/symbols) est ajouté au chemin de recherche des symboles. Si elle n’est pas spécifiée, cette option a la valeur par défaut « false ».", - "generateOptionsSchema.symbolOptions.searchPaths.description": "Tableau d’URL de serveur de symboles (exemple : http​://MyExampleSymbolServer) ou répertoires (exemple : /build/symbols) pour rechercher des fichiers .pdb. Ces répertoires seront recherchés en plus des emplacements par défaut, en regard du module et du chemin d’accès vers lequel le fichier pdb a été supprimé à l’origine.", + "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Si la valeur est « true », le serveur de symboles NuGet.org (https​://symbols.nuget.org​/download/symbols) est ajouté au chemin de recherche des symboles. Si elle n’est pas spécifiée, cette option a la valeur par défaut « false ».", + "generateOptionsSchema.symbolOptions.searchPaths.description": "Tableau d’URL de serveur de symboles (example: http​://MyExampleSymbolServer) ou répertoires (exemple : /build/symbols) pour rechercher des fichiers .pdb. Ces répertoires seront recherchés en plus des emplacements par défaut, en regard du module et du chemin d’accès vers lequel le fichier pdb a été supprimé à l’origine.", "generateOptionsSchema.targetArchitecture.markdownDescription": "[Uniquement pris en charge dans le débogage macOS local]\r\n\r\nArchitecture du débogué. Ce paramètre est automatiquement détecté, sauf si ce paramètre est défini. Les valeurs autorisées sont « x86_64 » ou « arm64 ».", "generateOptionsSchema.targetOutputLogPath.description": "Lorsqu’il est défini, le texte écrit par l’application cible dans stdout et stderr (par exemple, Console.WriteLine) est enregistré dans le fichier spécifié. Cette option est ignorée si la console a une valeur autre que internalConsole. Exemple : « ${workspaceFolder}/out.txt »", "viewsWelcome.debug.contents": "[Générer des ressources C# pour la génération et le débogage](command:dotnet.generateAssets)\r\n\r\nPour en savoir plus sur launch.json, consultez [Configuration de launch.json pour le débogage C#](https://aka.ms/VSCode-CS-LaunchJson)." diff --git a/package.nls.it.json b/package.nls.it.json index 17495d004..5faf24fdd 100644 --- a/package.nls.it.json +++ b/package.nls.it.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": "Allega a un processo .NET 5+ o .NET Core", + "command.csharp.downloadDebugger": "Scarica il debugger di .NET Core", + "command.csharp.listProcess": "Elenca i processi per il collegamento", + "command.csharp.listRemoteDockerProcess": "Elenca i processi nella connessione Docker", + "command.csharp.listRemoteProcess": "Elenca i processi nella connessione remota per il collegamento", + "command.csharp.reportIssue": "Segnala un problema", + "command.csharp.showDecompilationTerms": "Mostra il contratto per i termini del decompilatore", + "command.dotnet.generateAssets.currentProject": "Genera gli asset per la compilazione e il debug", + "command.dotnet.openSolution": "Apri soluzione", + "command.dotnet.restartServer": "Riavvia il server di linguaggio", + "command.dotnet.restore.all": "Ripristina tutti i progetti", + "command.dotnet.restore.project": "Ripristina progetto", + "command.dotnet.test.debugTestsInContext": "Esegui il debug dei test nel contesto", + "command.dotnet.test.runTestsInContext": "Esegui test nel contesto", + "command.extension.showRazorCSharpWindow": "Mostra CSharp di Razor", + "command.extension.showRazorHtmlWindow": "Mostra HTML di Razor", + "command.o.fixAll.document": "Correggi tutte le occorrenze di un problema di codice all'interno del documento", + "command.o.fixAll.project": "Correggi tutte le occorrenze di un problema di codice all'interno del progetto", + "command.o.fixAll.solution": "Correggi tutte le occorrenze di un problema di codice all'interno della soluzione", + "command.o.pickProjectAndStart": "Seleziona progetto", + "command.o.reanalyze.allProjects": "Analizza tutti i progetti", + "command.o.reanalyze.currentProject": "Analizza il progetto corrente", + "command.o.restart": "Riavvia OmniSharp", + "command.razor.reportIssue": "Segnala problema Razor", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "Mostra i suggerimenti per la creazione implicita di oggetti", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "Mostra suggerimenti per variabili con tipi dedotti", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "Mostra suggerimenti per i valori letterali", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "Mostra suggerimenti per i tipi di parametro lambda", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "Visualizza suggerimenti di tipo inline", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Eseguire l'analisi del codice in background per:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Eseguire l'analisi del codice in background per: (In precedenza “omnisharp.enableRoslynAnalyzers”)", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "Intera soluzione", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "Nessuno", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "Apri documenti", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "Intera soluzione", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "Nessuno", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "Apri documenti", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "Specifica se i riferimenti a CodeLens devono essere visualizzati.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "Specifica se devono essere mostrati i CodeLens dei test di esecuzione e di debug.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "Specifica se devono essere mostrati i CodeLens dei riferimenti. (In precedenza “csharp.referencesCodeLens.enabled”)", + "configuration.dotnet.codeLens.enableTestsCodeLens": "Specifica se devono essere mostrati i CodeLens dei test di esecuzione e di debug. (In precedenza “csharp.testsCodeLens.enabled”)", "configuration.dotnet.completion.provideRegexCompletions": "Mostra espressioni regolari nell'elenco di completamento.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Abilita il supporto per mostrare i tipi non importati e i metodi di estensione non importati negli elenchi di completamento. Quando viene eseguito il commit, la direttiva using appropriata verrà aggiunta all'inizio del file corrente.", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Abilita il supporto per mostrare i tipi non importati e i metodi di estensione non importati negli elenchi di completamento. Quando viene eseguito il commit, la direttiva using appropriata verrà aggiunta all'inizio del file corrente. (In precedenza “omnisharp.enableImportCompletion”)", "configuration.dotnet.completion.showNameCompletionSuggestions": "Consente di eseguire il completamento automatico del nome dell'oggetto per i membri selezionati di recente.", - "configuration.dotnet.defaultSolution.description": "Percorso della soluzione predefinita da aprire nell'area di lavoro o impostare su 'disabilita' per ignorarla.", + "configuration.dotnet.defaultSolution.description": "Percorso della soluzione predefinita da aprire nell'area di lavoro o impostare su 'disabilita' per ignorarla. (In precedenza “omnisharp.defaultLaunchSolution”)", "configuration.dotnet.dotnetPath": "Specifica il percorso di una directory di installazione dotnet da usare al posto di quella predefinita del sistema. Ciò influisce solo sull'installazione di dotnet da usare per ospitare il server di linguaggio stesso. Esempio: \"/home/username/mycustomdotnetdirectory\".", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "Evidenziare i componenti JSON correlati sotto il cursore.", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "Evidenzia i componenti dell'espressione regolare correlati sotto il cursore.", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "Elimina hint quando l'argomento corrisponde al nome del parametro", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "Non visualizzare suggerimenti quando il nome del parametro corrisponde alla finalità del metodo", "configuration.dotnet.navigation.navigateToDecompiledSources": "Abilita la navigazione verso origini decompilate.", + "configuration.dotnet.preferCSharpExtension": "Forza il caricamento dei progetti solo con l'estensione C#. Può essere utile quando si usano tipi di progetto legacy non supportati dal Kit di sviluppo C#. (Richiede il ricaricamento della finestra)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "Mostra le informazioni sulle note quando viene visualizzato il simbolo.", + "configuration.dotnet.server.crashDumpPath": "Imposta un percorso cartella in cui vengono scritti i dump di arresto anomalo del sistema in caso di arresto anomalo del server di linguaggio. Deve essere scrivibile dall'utente.", "configuration.dotnet.server.extensionPaths": "Eseguire l’override per il percorso del server di linguaggio --argomenti estensione", - "configuration.dotnet.server.path": "Specifica il percorso assoluto dell'eseguibile del server (LSP od O#). Se lasciato vuoto, viene usata la versione aggiunta all'estensione C#.", + "configuration.dotnet.server.path": "Specifica il percorso assoluto dell'eseguibile del server (LSP od O#). Se lasciato vuoto, viene usata la versione aggiunta all'estensione C#. (In precedenza “omnisharp.path”)", + "configuration.dotnet.server.startTimeout": "Specifica un timeout (in ms) per l'avvio del client e la sua connessione al server di linguaggio.", "configuration.dotnet.server.trace": "Imposta il livello di registrazione per il server di linguaggio", - "configuration.dotnet.server.waitForDebugger": "Passa il flag --debug all'avvio del server per consentire il collegamento di un debugger.", + "configuration.dotnet.server.waitForDebugger": "Passa il flag --debug all'avvio del server per consentire il collegamento di un debugger. (In precedenza “omnisharp.waitForDebugger”)", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "Cerca simboli negli assembly di riferimento. Influisce sulle funzionalità che richiedono la ricerca di simboli, ad esempio l'aggiunta di importazioni.", - "configuration.dotnet.unitTestDebuggingOptions": "Opzioni da usare con il debugger durante l'avvio per unit test debug.", + "configuration.dotnet.unitTestDebuggingOptions": "Opzioni da usare con il debugger durante l'avvio per unit test debug. (In precedenza “csharp.unitTestDebuggingOptions”)", "configuration.razor.languageServer.debug": "Specifica se attendere il collegamento di debug all'avvio del server di linguaggio.", "configuration.razor.languageServer.directory": "Esegue l'override del percorso della directory del server di linguaggio Razor.", "configuration.razor.trace": "Specifica se visualizzare tutti i messaggi [Verbose], alcuni messaggi [Messages] o meno [Off].", "configuration.razor.trace.messages": "Registra solo alcuni messaggi dall'estensione Razor", "configuration.razor.trace.off": "Non registra i messaggi dall'estensione Razor", "configuration.razor.trace.verbose": "Registra tutti i messaggi dall'estensione Razor", + "debuggers.coreclr.configurationSnippets.description.attach": "Collegare il debugger .NET (coreclr) a un processo in esecuzione. Questa operazione può essere eseguita anche utilizzando il comando \"Collega a un processo .NET 5+ o .NET Core\".", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "Questo frammento di codice viene usato per avviare un nuovo processo nel debugger Blazor WebAssembly (blazorwasm), specificando il percorso dell'eseguibile da avviare. Nella maggior parte dei casi, il frammento di codice \".NET: Il frammento di codice Launch C# project\" è una scelta migliore, ma può essere utilizzato per avere il controllo completo su tutte le opzioni di avvio. Questo frammento di codice riguarda i progetti Blazor ospitati, ovvero un progetto che dispone di un'app ASP.NET Core back-end per gestire i file.", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "Questo frammento di codice viene usato per avviare un nuovo processo nel debugger Blazor WebAssembly (blazorwasm). Nella maggior parte dei casi, il frammento di codice \".NET: Il frammento di codice Launch C# project\" è una scelta migliore, ma può essere utilizzato per avere il controllo completo su tutte le opzioni di avvio. Questo frammento di codice è per progetti Blazor autonomi, ovvero un progetto che non dispone di un'app ASP.NET Core back-end per gestire i file.", + "debuggers.coreclr.configurationSnippets.description.console-local": "Questo frammento di codice viene utilizzato per avviare un nuovo processo nel debugger .NET (coreclr), specificando il percorso dell'eseguibile da avviare. Nella maggior parte dei casi, il frammento di codice \".NET: Launch C# project\" è una scelta migliore. Questo frammento di codice è utile quando il progetto è stato creato all'esterno di questa istanza di VS Code o se si desidera ospitare il codice .NET in un eseguibile personalizzato, ad esempio una versione specifica di \"dotnet.exe\"/\"dotnet\" o il codice .NET è ospitato da un'applicazione nativa. Questo frammento di codice è per applicazioni console.", + "debuggers.coreclr.configurationSnippets.description.remote": "Questo frammento di codice mostra come eseguire il debug remoto di .NET Code **senza** utilizzare la comunicazione remota VS Code. Dovrebbe essere utilizzato nei casi in cui si desidera creare il progetto localmente ma eseguirlo su un altro computer.", + "debuggers.coreclr.configurationSnippets.description.web-local": "Questo frammento di codice viene utilizzato per avviare un nuovo processo nel debugger .NET (coreclr), specificando il percorso dell'eseguibile da avviare. Nella maggior parte dei casi, il frammento di codice \".NET: Launch C# project\" è una scelta migliore. Questo frammento di codice è utile quando il progetto è stato creato all'esterno di questa istanza di VS Code o se si desidera ospitare il codice .NET in un eseguibile personalizzato, ad esempio una versione specifica di \"dotnet.exe\"/\"dotnet\" o il codice .NET è ospitato da un'applicazione nativa. Questo frammento di codice è per le applicazioni Web (ASP.NET Core).", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: Collega a un processo .NET", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: Debug remoto: collegamento a un processo .NET", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Web Assembly - Avvia il progetto Blazor ospitato", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Web Assembly: avvia il progetto Blazor autonomo", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Avvia il file eseguibile (Console)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: Debug remoto: avvia il file eseguibile (Console)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Avvia il file eseguibile (Web)", + "debuggers.dotnet.configurationSnippets.description": "Questo frammento di codice configura VS Code per eseguire il debug di un progetto C#. Le opzioni di debug, ad esempio gli argomenti dell'eseguibile, possono essere configurate tramite il file \"/Properties/launchSettings.json\".", + "debuggers.dotnet.configurationSnippets.label": ".NET: Launch C# project", "debuggers.dotnet.launch.launchConfigurationId.description": "ID configurazione di avvio da usare. Se la stringa è vuota, verrà usata la configurazione attiva corrente.", "debuggers.dotnet.launch.projectPath.description": "Percorso del file con estensione csproj.", "generateOptionsSchema.allowFastEvaluate.description": "Se impostato su true (che è lo stato predefinito), il debugger cercherà di effettuare una valutazione più rapida, simulando l'esecuzione di metodi e proprietà semplici.", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "Se specificato, questo parametro indica il nome del profilo da utilizzare in launchSettings.json. Se launchSettings.json non viene trovato, l'opzione viene ignorata. Il file verrà letto dal percorso indicato nella proprietà 'launchSettingsFilePath' o da {cwd}/Properties/launchSettings.json se tale proprietà non è impostata. Se questa opzione è impostata su null o su una stringa vuota, launchSettings.json verrà completamente ignorato. Se il valore non è specificato, verrà utilizzato il primo profilo denominato 'Progetto'.", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "Flag utilizzato per stabilire se il testo di stdout proveniente dall'avvio del browser Web debba essere registrato nella finestra di output. Il valore predefinito per questa opzione è 'true'.", "generateOptionsSchema.logging.description": "Flag utilizzato per stabilire i tipi di messaggi da registrare nella finestra di output.", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Se impostata su true, la registrazione del motore includerà le proprietà 'adapterElapsedTime' ed 'engineElapsedTime' per indicare la quantità di tempo, misurata in microsecondi, impiegata per una richiesta. Il valore predefinito di questa opzione è 'false'.", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "Flag utilizzato per stabilire se i log del motore di diagnostica devono essere registrati nella finestra di output. Il valore predefinito per questa opzione è 'false'.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "Stampa tutte le chiamate API del debugger. Si tratta di un documento molto dettagliato.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "Errori di stampa dalle chiamate API del debugger.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Controlla se le chiamate API a Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h debbano essere stampate nella finestra di output. Il valore predefinito di questa opzione è 'none'.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "Disabilita chiamate API di traccia", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "Contrassegna per stabilire se è necessario abilitare la traccia dettagliata per gli eventi generati dal runtime sottostante. Il valore predefinito di questa opzione è 'false'.", + "generateOptionsSchema.logging.diagnosticsLog.description": "Impostazioni per controllare quali messaggi vengono stampati nella finestra di output dal log di diagnostica del debugger. Questo log contribuisce alla risoluzione dei problemi del debugger.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "Stampa messaggi di diagnostica a livello di errore.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "Stampa messaggi di diagnostica importanti.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "Controlla quali messaggi vengono stampati nella finestra di output dal dispatcher del debugger. Se non è specificato, verrà impostato su 'none' a meno che non sia abilitata una delle impostazioni del log dettagliate ('debugEngineAPITracing', 'debugRuntimeEventTracing', 'expressionEvaluationTracing' o 'startDebuggingTracing'), nel qual caso il valore predefinito viene modificato in 'normal'.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "Non stampare altri messaggi di diagnostica.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "Stampa tutti i messaggi di diagnostica non dettagliati.", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "Contrassegna per stabilire se è necessario abilitare la traccia dettagliata per la valutazione dell'espressione. Il valore predefinito di questa opzione è 'false'.", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "Contrassegna per stabilire se i messaggi del protocollo DAP scambiati tra il debugger C# e l'interfaccia utente devono essere registrati nella finestra di output. Il valore predefinito di questa opzione è 'false'.", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "Contrassegna per stabilire se è necessario abilitare la traccia dettagliata per l'avvio del debug. Il valore predefinito di questa opzione è 'false'.", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Se impostata su true, la registrazione dei messaggi di protocollo includerà le proprietà 'adapterElapsedTime' ed 'engineElapsedTime' per indicare la quantità di tempo, misurata in microsecondi, impiegata per una richiesta. Il valore predefinito di questa opzione è 'false'.", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "L'impostazione 'logging.engineLogging' è stata deprecata e sostituita da 'logging.diagnosticsLog.protocolMessages'.", "generateOptionsSchema.logging.exceptions.markdownDescription": "Flag utilizzato per stabilire se i messaggi di eccezione devono essere registrati nella finestra di output. L'impostazione predefinita di questa opzione è 'true'.", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "Flag utilizzato per stabilire se gli eventi di caricamento del modulo devono essere registrati nella finestra di output. Il valore predefinito per questa opzione è 'true'.", "generateOptionsSchema.logging.processExit.markdownDescription": "Controlla se un messaggio viene registrato alla chiusura del processo di destinazione o se il debug viene arrestato. Il valore predefinito per questa opzione è 'true'.", @@ -138,7 +194,7 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "Non provare a caricare i simboli per qualsiasi modulo a meno che non si trovi nella matrice 'includedModules' oppure non sia incluso tramite l'impostazione 'includeSymbolsNextToModules'.", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "Se 'true', il server dei simboli Microsoft (https​://msdl.microsoft.com​/download/symbols) viene aggiunto al percorso di ricerca dei simboli. Se non è specificata, l'impostazione predefinita di questa opzione è 'false'.", "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Se impostato su 'true', il server dei simboli NuGet.org (https​://symbols.nuget.org​/download/symbols) verrà aggiunto al percorso di ricerca dei simboli. Se non viene specificato, il valore predefinito per questa opzione è 'false'.", - "generateOptionsSchema.symbolOptions.searchPaths.description": "Matrice di URL del server dei simboli, ad esempio http​://MyExampleSymbolServer, o di directory, ad esempio /build/symbols, in cui eseguire la ricerca dei file PDB. La ricerca verrà eseguita in queste directory oltre che nei percorsi predefiniti, in aggiunta al modulo e al percorso in cui è stato rilasciato originariamente il file PDB.", + "generateOptionsSchema.symbolOptions.searchPaths.description": "Matrice di URL del server dei simboli (ad esempio: http​://MyExampleSymbolServer) o directory (ad esempio: /build/symbols) per cercare file .pdb. Verranno eseguite ricerche in queste directory oltre ai percorsi predefiniti, accanto al modulo e al percorso in cui è stato originariamente eliminato il pdb.", "generateOptionsSchema.targetArchitecture.markdownDescription": "[Supportato solo nel debug di macOS in locale]\r\n\r\nArchitettura dell'oggetto del debug. Verrà rilevata automaticamente a meno che non sia impostato questo parametro. I valori consentiti sono `x86_64` or `arm64`.", "generateOptionsSchema.targetOutputLogPath.description": "Quando questa opzione è impostata, il testo che l'applicazione di destinazione scrive in stdout e stderr, ad esempio Console.WriteLine, verrà salvato nel file specificato. Questa opzione viene ignorata se la console è impostata su un valore diverso da internalConsole. Ad esempio '${workspaceFolder}/out.txt'.", "viewsWelcome.debug.contents": "[Genera risorse C# per compilazione e debug](command:dotnet.generateAssets)\r\n\r\nPer altre informazioni su launch.json, vedere [Configurazione di launch.json per il debug di C#](https://aka.ms/VSCode-CS-LaunchJson)." diff --git a/package.nls.ja.json b/package.nls.ja.json index 7bd78cb2b..072608fc0 100644 --- a/package.nls.ja.json +++ b/package.nls.ja.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": ".NET 5 以降または .NET Core プロセスにアタッチする", + "command.csharp.downloadDebugger": ".NET Core デバッガーをダウンロードする", + "command.csharp.listProcess": "アタッチのプロセスをリスト表示する", + "command.csharp.listRemoteDockerProcess": "Docker 接続のプロセスをリスト表示する", + "command.csharp.listRemoteProcess": "アタッチ用のリモート接続のプロセスをリスト表示する", + "command.csharp.reportIssue": "問題の報告", + "command.csharp.showDecompilationTerms": "逆コンパイラの使用契約条件を表示する", + "command.dotnet.generateAssets.currentProject": "ビルド用およびデバッグ用の資産を生成する", + "command.dotnet.openSolution": "ソリューションを開く", + "command.dotnet.restartServer": "言語サーバーを再起動する", + "command.dotnet.restore.all": "すべてのプロジェクトを復元する", + "command.dotnet.restore.project": "プロジェクトの復元", + "command.dotnet.test.debugTestsInContext": "コンテキストでテストをデバッグする", + "command.dotnet.test.runTestsInContext": "コンテキストでテストを実行する", + "command.extension.showRazorCSharpWindow": "Razor CSharp を表示する", + "command.extension.showRazorHtmlWindow": "Razor Html を表示する", + "command.o.fixAll.document": "ドキュメント内のコードの問題のすべての出現箇所を修正する", + "command.o.fixAll.project": "プロジェクト内のコードの問題のすべての出現箇所を修正する", + "command.o.fixAll.solution": "ソリューション内のコードの問題のすべての出現箇所を修正する", + "command.o.pickProjectAndStart": "プロジェクトの選択", + "command.o.reanalyze.allProjects": "すべてのプロジェクトを分析する", + "command.o.reanalyze.currentProject": "現在のプロジェクトを分析する", + "command.o.restart": "OmniSharp を再起動する", + "command.razor.reportIssue": "Razor の問題を報告する", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "暗黙的なオブジェクト作成のヒントを表示します", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "推論された型の変数のヒントを表示する", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "インデクサーのヒントを表示する", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "ラムダ パラメーター型のヒントを表示する", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "インライン型のヒントを表示する", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "バックグラウンド コード分析の対象:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "次のバックグラウンド コード分析を実行します: (以前の `omnisharp.enableRoslynAnalyzers`)", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "ソリューション全体", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "なし", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "開かれているドキュメント", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "ソリューション全体", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "なし", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "開かれているドキュメント", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "参照 CodeLens を表示するかどうかを指定します。", - "configuration.dotnet.codeLens.enableTestsCodeLens": "CodeLens のテストの実行とデバッグを表示するかどうかを指定します。", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "参照 CodeLens を表示するかどうかを指定します。(以前は `csharp.referencesCodeLens.enabled`)", + "configuration.dotnet.codeLens.enableTestsCodeLens": "CodeLens の実行テストとデバッグ テストを表示するかどうかを指定します。(以前の `csharp.testsCodeLens.enabled`)", "configuration.dotnet.completion.provideRegexCompletions": "入力候補一覧に正規表現を表示します。", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "インポートされていない型とインポートされていない拡張メソッドを入力候補一覧に表示するサポートを有効にします。コミットすると、適切な using ディレクティブが現在のファイルの先頭に追加されます。", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "インポートされていない型とインポートされていない拡張メソッドを入力候補一覧に表示するためのサポートを有効にします。コミットすると、現在のファイルの先頭に適切な using ディレクティブが追加されます。(以前の `omnisharp.enableImportCompletion`)", "configuration.dotnet.completion.showNameCompletionSuggestions": "最近選択したメンバーの自動オブジェクト名の完了を実行します。", - "configuration.dotnet.defaultSolution.description": "ワークスペースで開く既定のソリューションのパス。スキップするには 'disable' に設定します。", + "configuration.dotnet.defaultSolution.description": "ワークスペースで開く既定のソリューションのパス。スキップするには 'disable' に設定します。(以前の `omnisharp.defaultLaunchSolution`)", "configuration.dotnet.dotnetPath": "既定のシステム ディレクトリの代わりに使用する dotnet インストール ディレクトリへのパスを指定します。これは、言語サーバー自体をホストするために使用する dotnet インストールにのみ影響します。例: \"/home/username/mycustomdotnetdirectory\"。", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "カーソルの下にある関連する JSON コンポーネントをハイライトします。", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "カーソルの下にある関連する正規表現コンポーネントをハイライトします。", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "引数がパラメーター名と一致するとき、ヒントを抑制する", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "パラメーター名がメソッドの意図と一致する場合にヒントを非表示にする", "configuration.dotnet.navigation.navigateToDecompiledSources": "逆コンパイルされたソースへのナビゲーションを有効にします。", + "configuration.dotnet.preferCSharpExtension": "C# 拡張機能のみを使用してプロジェクトを強制的に読み込みます。 これは、C# Dev Kit でサポートされていないレガシ プロジェクトの種類を使用する場合に役立ちます。(ウィンドウの再読み込みが必要)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "シンボルを表示するときに注釈情報を表示します。", + "configuration.dotnet.server.crashDumpPath": "言語サーバーがクラッシュした場合にクラッシュ ダンプの書き込み先フォルダー パスを設定します。ユーザーによる書き込みが可能であることが必要です。", "configuration.dotnet.server.extensionPaths": "言語サーバーへのパスのオーバーライド --拡張引数", - "configuration.dotnet.server.path": "サーバー (LSP または O#) 実行可能ファイルに絶対パスを指定します。空のままにすると、C# 拡張機能にピン留めされたバージョンが使用されます。", + "configuration.dotnet.server.path": "サーバー (LSP または O#) 実行可能ファイルに絶対パスを指定します。空のままにすると、C# 拡張機能にピン留めされたバージョンが使用されます。(以前の `omnisharp.path`)", + "configuration.dotnet.server.startTimeout": "クライアントが正常に起動して言語サーバーに接続するためのタイムアウト (ミリ秒) を指定します。", "configuration.dotnet.server.trace": "言語サーバーのログ記録レベルを設定する", - "configuration.dotnet.server.waitForDebugger": "サーバーの起動時に --debug フラグを渡して、デバッガーのアタッチを許可します。", + "configuration.dotnet.server.waitForDebugger": "デバッガーのアタッチを許可するために、サーバーを起動するときに --debug フラグを渡します。(以前の `omnisharp.waitForDebugger`)", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "参照アセンブリ内のシンボルを検索します。影響を受ける機能には、インポートの追加などのシンボル検索が必要です。", - "configuration.dotnet.unitTestDebuggingOptions": "単位テスト デバッグの起動時にデバッガーで使用するオプションです。", + "configuration.dotnet.unitTestDebuggingOptions": "単体テスト デバッグの起動時にデバッガーで使用するオプション。(以前の `csharp.unitTestDebuggingOptions`)", "configuration.razor.languageServer.debug": "言語サーバーの起動時にデバッグ アタッチを待機するかどうかを指定します。", "configuration.razor.languageServer.directory": "Razor Language Server ディレクトリへのパスをオーバーライドします。", "configuration.razor.trace": "すべてのメッセージ [詳細] を出力するか、一部のメッセージ [メッセージ] を出力するか、何も出力しない [オフ] かを指定します。", "configuration.razor.trace.messages": "Razor 拡張機能からの一部のメッセージのみをログに記録します", "configuration.razor.trace.off": "Razor 拡張機能からのメッセージをログに記録しません", "configuration.razor.trace.verbose": "Razor 拡張機能からのすべてのメッセージをログに記録します", + "debuggers.coreclr.configurationSnippets.description.attach": "実行中のプロセスに .NET デバッガー (coreclr) をアタッチします。これは、'.NET 5 以降または .NET Core プロセスにアタッチする' コマンドを使用して行うこともできます。", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "このスニペットは、起動する実行可能ファイルへのパスを指定して、Blazor WebAssembly デバッガー (blazorwasm) で新しいプロセスを起動するために使用されます。ほとんどの場合、\".NET: Launch C# プロジェクト\" スニペットの方が適切ですが、このスニペットを使用すると、すべての起動オプションを完全に制御できます。このスニペットは、ホストされている Blazor プロジェクト用です。これは、ファイルを提供するバックエンド ASP.NET Core アプリを持つプロジェクトです。", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "このスニペットは、Blazor WebAssembly デバッガー (blazorwasm) で新しいプロセスを起動するために使用されます。ほとんどの場合、\".NET: Launch C# プロジェクト\" スニペットの方が適切ですが、このスニペットを使用すると、すべての起動オプションを完全に制御できます。このスニペットは、スタンドアロン Blazor プロジェクト用です。これは、ファイルを提供するバックエンド ASP.NET Core アプリを持たないプロジェクトです。", + "debuggers.coreclr.configurationSnippets.description.console-local": "このスニペットは、.NET デバッガー (coreclr) の下で新しいプロセスを起動するために使用され、起動する実行可能ファイルへのパスを指定します。ほとんどの場合、\".NET: C# プロジェクトを起動する\" スニペットが最適です。このスニペットは、プロジェクトがこの VS Code インスタンスの外部でビルドされた場合、または .NET Code をカスタム実行可能ファイル (特定のバージョンの 'dotnet.exe'/'dotnet' など) でホストする場合、または .NET Code がネイティブ アプリケーションによってホストされている場合に役立ちます。このスニペットはコンソール アプリケーション用です。", + "debuggers.coreclr.configurationSnippets.description.remote": "このスニペットは、VS Code リモートを使用して .NET Code **without** をリモートでデバッグする方法示します。プロジェクトをローカルでビルドし、別のコンピューターで実行する場合に使用する必要があります。", + "debuggers.coreclr.configurationSnippets.description.web-local": "このスニペットは、.NET デバッガー (coreclr) の下で新しいプロセスを起動するために使用され、起動する実行可能ファイルへのパスを指定します。ほとんどの場合、\".NET: C# プロジェクトを起動する\" スニペットが最適です。このスニペットは、プロジェクトがこの VS Code インスタンスの外部でビルドされた場合、または .NET Code をカスタム実行可能ファイル (特定のバージョンの 'dotnet.exe'/'dotnet' など) でホストする場合、または .NET Code がネイティブ アプリケーションによってホストされている場合に役立ちます。このスニペットは Web (ASP.NET Core) アプリケーション用です。", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: .NET プロセスにアタッチする", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: リモート デバッグ - .NET プロセスへのアタッチ", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Web アセンブリ - ホストされている Blazor プロジェクトを起動します", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Web アセンブリ - スタンドアロン Blazor プロジェクトを起動します", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: 実行可能ファイルの起動 (コンソール)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: リモート デバッグ - 実行可能ファイルの起動 (コンソール)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: 実行可能ファイルの起動 (Web)", + "debuggers.dotnet.configurationSnippets.description": "このスニペットは、C# プロジェクトをデバッグするため VS Code を構成します。デバッグ オプション (例: 実行可能ファイルへの引数) は、'/Properties/launchSettings.json' ファイルを使用して構成できます。", + "debuggers.dotnet.configurationSnippets.label": ".NET: C# プロジェクトの起動", "debuggers.dotnet.launch.launchConfigurationId.description": "使用する起動構成 ID。空の場合は現在アクティブな構成が使用されます。", "debuggers.dotnet.launch.projectPath.description": ".csproj ファイルへのパス。", "generateOptionsSchema.allowFastEvaluate.description": "true (既定の状態) の場合、デバッガーは単純なプロパティとメソッドの実行をシミュレーションすることで、より高速な評価を試みます。", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "指定した場合、使用する launchSettings.json 内のプロファイルの名前を示します。launchSettings.json が見つからない場合、これは無視されます。launchSettings.json は、'launchSettingsFilePath' プロパティで指定されたパスから読み取られ、それが設定されていない場合は {cwd}/Properties/launchSettings.json から読み込まれます。これが null または空の文字列に設定されている場合、launchSettings.json は無視されます。この値が指定されていない場合は、最初の 'Project' プロファイルが使用されます。", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "Web ブラウザーを起動してから StdOut テキストを出力ウィンドウに記録するかどうかを決定するフラグです。このオプションの既定値は `true` です。", "generateOptionsSchema.logging.description": "どの種類のメッセージを出力ウィンドウに記録する必要があるかを決定するフラグです。", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "true の場合、エンジン ログには `adapterElapsedTime` プロパティと `engineElapsedTime` プロパティが含まれ、要求にかかった時間をマイクロ秒単位で示します。このオプションの既定値は `false` です。", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "診断エンジンのログを出力ウィンドウに記録するかどうかを決定するフラグ。このオプションの既定値は `false` です。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "すべてのデバッガー API 呼出しを出力します。これは、非常に詳細です。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "デバッガー API 呼び出しからのエラーを出力します。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h への API 呼び出しを出力ウィンドウに出力するかどうかを制御します。このオプションの既定値は `none` です。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "API 呼び出しのトレースを無効にする", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "基になるランタイムによって発生するイベントについての詳細トレースを有効にするかどうかを決定するフラグ。このオプションの既定値は、`false` です。", + "generateOptionsSchema.logging.diagnosticsLog.description": "デバッガーの診断ログから出力ウィンドウに出力するメッセージを制御する設定です。このログは、デバッガーの問題のトラブルシューティングに役立ちます。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "エラーレベルの診断メッセージを出力します。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "重要な診断メッセージを出力します。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "デバッガーのディスパッチャーから出力ウィンドウに出力するメッセージを制御します。指定がない場合の既定値は `none` です。ただし、いずれかの詳細ログ設定 (`debugEngineAPITracing`、`debugRuntimeEventTracing`、`expressionEvaluationTracing` または `startDebuggingTracing`) が有効な場合、デフォルト値は `normal` に変更されます。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "追加の診断メッセージは出力しません。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "すべての詳細でない診断メッセージを出力します。", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "式評価についての詳細トレースを有効にするかどうかを決定するフラグ。このオプションの既定値は、`false` です。", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "C# デバッガーと UI の間で交換される DAP プロトコル メッセージを出力ウィンドウにログ出力するかどうかを決定するフラグ。このオプションの既定値は、`false` です。", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "デバッグの開始についての詳細トレースを有効にするかどうかを決定するフラグ。このオプションの既定値は、`false` です。", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "true の場合、プロトコル メッセージ ログには `adapterElapsedTime` プロパティと `engineElapsedTime` プロパティが含まれ、要求にかかった時間がマイクロ秒単位で示されます。このオプションの既定値は `false` です。", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "'logging.engineLogging' は非推奨になりました。'logging.diagnosticsLog.protocolMessages' を使用してください。", "generateOptionsSchema.logging.exceptions.markdownDescription": "例外メッセージを出力ウィンドウに記録するかどうかを決定するフラグです。このオプションの既定値は `true` です。", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "モジュール読み込みイベントを出力ウィンドウに記録するかどうかを決定するフラグです。このオプションの既定値は `true` です。", "generateOptionsSchema.logging.processExit.markdownDescription": "ターゲット プロセスを終了するとき、またはデバッグを停止するときにメッセージをログに記録するかどうかを制御します。このオプションの既定値は `true` です。", @@ -138,7 +194,7 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "モジュールが 'includedModules' 配列に含まれていない場合、または 'includeSymbolsNextToModules' 設定を介して含まれていない場合は、どのモジュールに対してもシンボルを読み込もうとしてはいけません。", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "'true' の場合、Microsoft シンボルサーバー (https​://msdl.microsoft.com​/download/symbols) がシンボルの検索パスに追加されます。指定しない場合、このオプションの既定値は 'false' です。", "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "'true' の場合、NuGet.org シンボルサーバー (https​://symbols.nuget.org​/download/symbols) がシンボルの検索パスに追加されます。指定しない場合、このオプションの既定値は 'false' です。", - "generateOptionsSchema.symbolOptions.searchPaths.description": ".pdb ファイルを検索するためのシンボル サーバー URL (例: http​://MyExampleSymbolServer) の配列またはディレクトリ (例: /build/symbols) の配列です。これらのディレクトリは、既定の場所 (すなわちモジュールと、 pdb が最初にドロップされたパスの横) に加えて、検索されます。", + "generateOptionsSchema.symbolOptions.searchPaths.description": "シンボル サーバーの URL (example: http​://MyExampleSymbolServer) またはディレクトリ (example: /build/symbols) の配列であり、ここで .pdb ファイルが検索されます。既定の場所に加えて (つまり、モジュールと、pdb が最初にドロップされたパスの後に)、これらのディレクトリが検索されることになります。", "generateOptionsSchema.targetArchitecture.markdownDescription": "[ローカルの macOS デバッグのみでサポート]\r\n\r\nデバッグ対象のアーキテクチャ。このパラメーターを設定しない場合は、自動的に検出されます。可能な値は、 `x86_64` または `arm64`. です。", "generateOptionsSchema.targetOutputLogPath.description": "設定すると、ターゲット アプリケーションが StdOut および stderr (例: Console.WriteLine) に書き込むテキストが指定したファイルに保存されます。コンソールが internalConsole 以外に設定されている場合、このオプションは無視されます。例: '${workspaceFolder}/out.txt'", "viewsWelcome.debug.contents": "[ビルドおよびデバッグ用の C# 資産の生成](command:dotnet.generateAssets)\r\n\r\nlaunch.json の詳細については、[C# デバッグ用の launch.json の構成](https://aka.ms/VSCode-CS-LaunchJson). を参照してください。" diff --git a/package.nls.json b/package.nls.json index b1856743d..44c4fffff 100644 --- a/package.nls.json +++ b/package.nls.json @@ -1,22 +1,49 @@ { - "configuration.dotnet.defaultSolution.description": "The path of the default solution to be opened in the workspace, or set to 'disable' to skip it.", + "command.o.restart": "Restart OmniSharp", + "command.o.pickProjectAndStart": "Select Project", + "command.dotnet.openSolution": "Open Solution", + "command.o.fixAll.solution": "Fix all occurrences of a code issue within solution", + "command.o.fixAll.project": "Fix all occurrences of a code issue within project", + "command.o.fixAll.document": "Fix all occurrences of a code issue within document", + "command.o.reanalyze.allProjects": "Analyze all projects", + "command.o.reanalyze.currentProject": "Analyze current project", + "command.dotnet.generateAssets.currentProject": "Generate Assets for Build and Debug", + "command.dotnet.restore.project": "Restore Project", + "command.dotnet.restore.all": "Restore All Projects", + "command.csharp.downloadDebugger": "Download .NET Core Debugger", + "command.csharp.listProcess": "List process for attach", + "command.csharp.listRemoteProcess": "List processes on remote connection for attach", + "command.csharp.listRemoteDockerProcess": "List processes on Docker connection", + "command.csharp.attachToProcess": "Attach to a .NET 5+ or .NET Core process", + "command.csharp.reportIssue": "Report an issue", + "command.csharp.showDecompilationTerms": "Show the decompiler terms agreement", + "command.extension.showRazorCSharpWindow": "Show Razor CSharp", + "command.extension.showRazorHtmlWindow": "Show Razor Html", + "command.razor.reportIssue": "Report a Razor issue", + "command.dotnet.test.runTestsInContext": "Run Tests in Context", + "command.dotnet.test.debugTestsInContext": "Debug Tests in Context", + "command.dotnet.restartServer": "Restart Language Server", + "configuration.dotnet.defaultSolution.description": "The path of the default solution to be opened in the workspace, or set to 'disable' to skip it. (Previously `omnisharp.defaultLaunchSolution`)", "configuration.dotnet.dotnetPath": "Specifies the path to a dotnet installation directory to use instead of the default system one. This only influences the dotnet installation to use for hosting the language server itself. Example: \"/home/username/mycustomdotnetdirectory\".", - "configuration.dotnet.server.path": "Specifies the absolute path to the server (LSP or O#) executable. When left empty the version pinned to the C# Extension is used.", - "configuration.dotnet.server.waitForDebugger": "Passes the --debug flag when launching the server to allow a debugger to be attached.", + "configuration.dotnet.server.path": "Specifies the absolute path to the server (LSP or O#) executable. When left empty the version pinned to the C# Extension is used. (Previously `omnisharp.path`)", + "configuration.dotnet.server.startTimeout": "Specifies a timeout (in ms) for the client to successfully start and connect to the language server.", + "configuration.dotnet.server.waitForDebugger": "Passes the --debug flag when launching the server to allow a debugger to be attached. (Previously `omnisharp.waitForDebugger`)", "configuration.dotnet.server.trace": "Sets the logging level for the language server", "configuration.dotnet.server.extensionPaths": "Override for path to language server --extension arguments", + "configuration.dotnet.server.crashDumpPath": "Sets a folder path where crash dumps are written to if the language server crashes. Must be writeable by the user.", + "configuration.dotnet.preferCSharpExtension": "Forces projects to load with the C# extension only. This can be useful when using legacy project types that are not supported by C# Dev Kit. (Requires window reload)", "configuration.dotnet.implementType.insertionBehavior": "The insertion location of properties, events, and methods When implement interface or abstract class.", "configuration.dotnet.implementType.insertionBehavior.withOtherMembersOfTheSameKind": "Place them with other members of the same kind.", "configuration.dotnet.implementType.insertionBehavior.atTheEnd": "Place them at the end.", "configuration.dotnet.implementType.propertyGenerationBehavior": "Generation behavior of properties when implement interface or abstract class.", "configuration.dotnet.implementType.propertyGenerationBehavior.preferThrowingProperties": "Prefer throwing properties.", "configuration.dotnet.implementType.propertyGenerationBehavior.preferAutoProperties": "Prefer auto properties.", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "Specifies whether the references CodeLens should be shown.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "Specifies whether the run and debug test CodeLens should be shown.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Enables support for showing unimported types and unimported extension methods in completion lists. When committed, the appropriate using directive will be added at the top of the current file.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "Specifies whether the references CodeLens should be shown. (Previously `csharp.referencesCodeLens.enabled`)", + "configuration.dotnet.codeLens.enableTestsCodeLens": "Specifies whether the run and debug test CodeLens should be shown. (Previously `csharp.testsCodeLens.enabled`)", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Enables support for showing unimported types and unimported extension methods in completion lists. When committed, the appropriate using directive will be added at the top of the current file. (Previously `omnisharp.enableImportCompletion`)", "configuration.dotnet.completion.showNameCompletionSuggestions": "Perform automatic object name completion for the members that you have recently selected.", "configuration.dotnet.completion.provideRegexCompletions": "Show regular expressions in completion list.", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Run background code analysis for:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Run background code analysis for: (Previously `omnisharp.enableRoslynAnalyzers`)", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "Open documents", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "Entire solution", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "None", @@ -41,24 +68,69 @@ "configuration.dotnet.navigation.navigateToDecompiledSources": "Enable navigation to decomplied sources.", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "Show remarks information when display symbol.", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "Search symbols in reference assemblies. It affects features requires symbol searching, such as add imports.", - "configuration.dotnet.unitTestDebuggingOptions": "Options to use with the debugger when launching for unit test debugging.", + "configuration.dotnet.unitTestDebuggingOptions": "Options to use with the debugger when launching for unit test debugging. (Previously `csharp.unitTestDebuggingOptions`)", "configuration.razor.languageServer.directory": "Overrides the path to the Razor Language Server directory.", "configuration.razor.languageServer.debug": "Specifies whether to wait for debug attach when launching the language server.", "configuration.razor.trace": "Specifies whether to output all messages [Verbose], some messages [Messages] or not at all [Off].", "configuration.razor.trace.off": "Does not log messages from the Razor extension", "configuration.razor.trace.messages": "Logs only some messages from the Razor extension", "configuration.razor.trace.verbose": "Logs all messages from the Razor extension", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Launch Executable file (Console)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Launch Executable file (Web)", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: Attach to a .NET process", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: Remote debugging - Launch Executable file (Console)", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: Remote debugging - Attach to a .NET process", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Web Assembly - Launch hosted Blazor project", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Web Assembly - Launch standalone Blazor project", + "debuggers.coreclr.configurationSnippets.description.console-local": { + "message" : "This snippet is used to launch a new process under the .NET debugger (coreclr), specifying the path to the executable to launch. In most cases, the \".NET: Launch C# project\" snippet is a better choice. This snippet is useful when the project was built outside this VS Code instance or you want to host your .NET Code in a custom executable, such as a specific version of 'dotnet.exe'/'dotnet' or the .NET Code is hosted by a native application. This snippet is for console applications.", + "comment": [ + "'coreclr' is the name of the debugger 'type', and should not be localized", + "{Locked='(coreclr)'}" + ] + }, + "debuggers.coreclr.configurationSnippets.description.web-local": { + "message": "This snippet is used to launch a new process under the .NET debugger (coreclr), specifying the path to the executable to launch. In most cases, the \".NET: Launch C# project\" snippet is a better choice. This snippet is useful when the project was built outside this VS Code instance or you want to host your .NET Code in a custom executable, such as a specific version of 'dotnet.exe'/'dotnet' or the .NET Code is hosted by a native application. This snippet is for web (ASP.NET Core) applications.", + "comment": [ + "'coreclr' is the name of the debugger 'type', and should not be localized", + "{Locked='(coreclr)'}" + ] + }, + "debuggers.coreclr.configurationSnippets.description.attach": { + "message": "Attach the .NET debugger (coreclr) to a running process. This can also be done using the 'Attach to a .NET 5+ or .NET Core process' command.", + "comment": [ + "'coreclr' is the name of the debugger 'type', and should not be localized", + "{Locked='(coreclr)'}" + ] + }, + "debuggers.coreclr.configurationSnippets.description.remote": "This snippet shows how to remote debug .NET Code **without** using VS Code remoting. It should be used in cases where you want to build your project locally but run it on another computer.", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": { + "message": "This snippet is used to launch a new process under the Blazor WebAssembly debugger (blazorwasm), specifying the path to the executable to launch. In most cases, the \".NET: Launch C# project\" snippet is a better choice, but this snippet can be used to have full control over all launch options. This snippet is for hosted Blazor projects, which is a project that has a backend ASP.NET Core app to serve its files.", + "comment": [ + "'blazorwasm' is the name of the debugger 'type', and should not be localized", + "{Locked='(blazorwasm)'}" + ] + }, + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": { + "message": "This snippet is used to launch a new process under the Blazor WebAssembly debugger (blazorwasm). In most cases, the \".NET: Launch C# project\" snippet is a better choice, but this snippet can be used to have full control over all launch options. This snippet is for standalone Blazor projects, which is a project that does not have a backend ASP.NET Core app to serve its files.", + "comment": [ + "'blazorwasm' is the name of the debugger 'type', and should not be localized", + "{Locked='(blazorwasm)'}" + ] + }, "debuggers.dotnet.launch.projectPath.description": "Path to the .csproj file.", "debuggers.dotnet.launch.launchConfigurationId.description": "The launch configuration id to use. Empty string will use the current active configuration.", + "debuggers.dotnet.configurationSnippets.label": ".NET: Launch C# project", + "debuggers.dotnet.configurationSnippets.description": "This snippet configures VS Code to debug a C# project. Debug options (example: arguments to the executable) can be configured through the '/Properties/launchSettings.json' file.", "viewsWelcome.debug.contents": { "message": "[Generate C# Assets for Build and Debug](command:dotnet.generateAssets)\n\nTo learn more about launch.json, see [Configuring launch.json for C# debugging](https://aka.ms/VSCode-CS-LaunchJson).", - "comments": [ + "comment": [ "Do not translate 'command:dotnet.generateAssets' and 'https://aka.ms/VSCode-CS-LaunchJson'" ] }, "generateOptionsSchema.program.markdownDescription": { "message": "Path to the application dll or .NET Core host executable to launch.\nThis property normally takes the form: `${workspaceFolder}/bin/Debug/(target-framework)/(project-name.dll)`\n\nExample: `${workspaceFolder}/bin/Debug/netcoreapp1.1/MyProject.dll`\n\nWhere:\n`(target-framework)` is the framework that the debugged project is being built for. This is normally found in the project file as the `TargetFramework` property.\n\n`(project-name.dll)` is the name of debugged project's build output dll. This is normally the same as the project file name but with a '.dll' extension.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, @@ -67,26 +139,26 @@ "generateOptionsSchema.args.1.description": "Stringified version of command line arguments passed to the program.", "generateOptionsSchema.stopAtEntry.markdownDescription": { "message": "If true, the debugger should stop at the entry point of the target. This option defaults to `false`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.launchBrowser.description": "Describes options to launch a web browser as part of launch", "generateOptionsSchema.launchBrowser.enabled.description": { "message": "Whether web browser launch is enabled. This option defaults to `true`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.launchBrowser.args.description": { "message": "The arguments to pass to the command to open the browser. This is used only if the platform-specific element (`osx`, `linux` or `windows`) doesn't specify a value for `args`. Use ${auto-detect-url} to automatically use the address the server is listening to.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.launchBrowser.osx.description": { "message": "OSX-specific web launch configuration options. By default, this will start the browser using `open`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, @@ -94,7 +166,7 @@ "generateOptionsSchema.launchBrowser.osx.args.description": "The arguments to pass to the command to open the browser. Use ${auto-detect-url} to automatically use the address the server is listening to.", "generateOptionsSchema.launchBrowser.linux.description": { "message": "Linux-specific web launch configuration options. By default, this will start the browser using `xdg-open`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, @@ -102,7 +174,7 @@ "generateOptionsSchema.launchBrowser.linux.args.description": "The arguments to pass to the command to open the browser. Use ${auto-detect-url} to automatically use the address the server is listening to.", "generateOptionsSchema.launchBrowser.windows.description": { "message": "Windows-specific web launch configuration options. By default, this will start the browser using `cmd /c start`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, @@ -111,14 +183,14 @@ "generateOptionsSchema.env.description": "Environment variables passed to the program.", "generateOptionsSchema.envFile.markdownDescription": { "message": "Environment variables passed to the program by a file. E.g. `${workspaceFolder}/.env`", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.console.markdownDescription": "When launching console projects, indicates which console the target program should be launched into.", "generateOptionsSchema.console.settingsDescription": { "message": "**Note:** _This option is only used for the `dotnet` debug configuration type_.\n\nWhen launching console projects, indicates which console the target program should be launched into.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, @@ -127,82 +199,121 @@ "generateOptionsSchema.console.externalTerminal.enumDescription": "External terminal that can be configured via user settings.", "generateOptionsSchema.externalConsole.markdownDescription": { "message": "Attribute `externalConsole` is deprecated, use `console` instead. This option defaults to `false`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.launchSettingsFilePath.markdownDescription": { "message": "The path to a launchSettings.json file. If this isn't set, the debugger will search in `{cwd}/Properties/launchSettings.json`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.launchSettingsProfile.description": "If specified, indicates the name of the profile in launchSettings.json to use. This is ignored if launchSettings.json is not found. launchSettings.json will be read from the path specified should be the 'launchSettingsFilePath' property, or {cwd}/Properties/launchSettings.json if that isn't set. If this is set to null or an empty string then launchSettings.json is ignored. If this value is not specified the first 'Project' profile will be used.", "generateOptionsSchema.sourceFileMap.markdownDescription": { "message": "Maps build-time paths to local source locations. All instances of build-time path will be replaced with the local source path.\n\nExample:\n\n`{\"\":\"\"}`", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.justMyCode.markdownDescription": "When enabled (the default), the debugger only displays and steps into user code (\"My Code\"), ignoring system code and other code that is optimized or that does not have debugging symbols. [More information](https://aka.ms/VSCode-CS-LaunchJson#just-my-code)", "generateOptionsSchema.requireExactSource.markdownDescription": { "message": "Flag to require current source code to match the pdb. This option defaults to `true`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.enableStepFiltering.markdownDescription": { "message": "Flag to enable stepping over Properties and Operators. This option defaults to `true`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.logging.description": "Flags to determine what types of messages should be logged to the output window.", "generateOptionsSchema.logging.exceptions.markdownDescription": { "message": "Flag to determine whether exception messages should be logged to the output window. This option defaults to `true`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.logging.moduleLoad.markdownDescription": { "message": "Flag to determine whether module load events should be logged to the output window. This option defaults to `true`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.logging.programOutput.markdownDescription": { "message": "Flag to determine whether program output should be logged to the output window when not using an external console. This option defaults to `true`.", - "comments": [ - "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." - ] - }, - "generateOptionsSchema.logging.engineLogging.markdownDescription": { - "message": "Flag to determine whether diagnostic engine logs should be logged to the output window. This option defaults to `false`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.logging.browserStdOut.markdownDescription": { "message": "Flag to determine if stdout text from the launching the web browser should be logged to the output window. This option defaults to `true`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.logging.elapsedTiming.markdownDescription": { - "message": "If true, engine logging will include `adapterElapsedTime` and `engineElapsedTime` properties to indicate the amount of time, in microseconds, that a request took. This option defaults to `false`.", - "comments": [ + "message": "If true, protocol message logging will include `adapterElapsedTime` and `engineElapsedTime` properties to indicate the amount of time, in microseconds, that a request took. This option defaults to `false`.", + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.logging.threadExit.markdownDescription": { "message": "Controls if a message is logged when a thread in the target process exits. This option defaults to `false`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.logging.processExit.markdownDescription": { "message": "Controls if a message is logged when the target process exits, or debugging is stopped. This option defaults to `true`.", - "comments": [ + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "The setting 'logging.engineLogging' has been deprecated in favor of 'logging.diagnosticsLog.protocolMessages'.", + "generateOptionsSchema.logging.diagnosticsLog.description": "Settings to control which messages are printed to the output window from the debugger's diagnostics log. This log is meant to help troubleshoot problems with the debugger.", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": { + "message": "Flag to determine whether DAP protocol messages exchanged between the C# debugger and the UI should be logged to the output window. This option defaults to `false`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": { + "message": "Controls which messages are printed to the output window from the debugger's dispatcher. If not specified, this will default to `none` unless one of the verbose log settings are enabled (`debugEngineAPITracing`, `debugRuntimeEventTracing`, `expressionEvaluationTracing` or `startDebuggingTracing`), in which case the default changes to `normal`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "Do not print additional diagnostic messages.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "Print error-level diagnostic messages.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "Print important diagnostic messages.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "Print all non-verbose diagnostic messages.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": { + "message": "Controls if API calls to Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h should be printed to the output window. This option defaults to `none`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "Disable tracing API calls", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "Print failures from debugger API calls.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "Print all debugger API calls. This is very verbose.", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": { + "message": "Flag to determine whether verbose tracing for events raised by the underlying runtime should be enabled. This option defaults to `false`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": { + "message": "Flag to determine whether verbose tracing for expression evaluation should be enabled. This option defaults to `false`.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": { + "message": "Flag to determine whether verbose tracing for start debugging should be enabled. This option defaults to `false`.", + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, @@ -239,20 +350,23 @@ "generateOptionsSchema.symbolOptions.description": "Options to control how symbols (.pdb files) are found and loaded.", "generateOptionsSchema.symbolOptions.searchPaths.description": { "message": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.", - "comments": [ - "We use '\u200b' (unicode zero-length space character) to break VS Code's URL detection regex for URLs that are examples. Please do not translate or localized the URL." + "comment": [ + "We use '\u200b' (unicode zero-length space character) to break VS Code's URL detection regex for URLs that are examples. Please do not translate or localized the URL.", + "{Locked='http\u200b://MyExampleSymbolServer'}" ] }, "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": { "message": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.", - "comments": [ - "We use '\u200b' (unicode zero-length space character) to break VS Code's URL detection regex for URLs that are examples. Please do not translate or localized the URL." + "comment": [ + "We use '\u200b' (unicode zero-length space character) to break VS Code's URL detection regex for URLs that are examples. Please do not translate or localized the URL.", + "{Locked='(https\u200b://msdl.microsoft.com\u200b/download/symbols)'}" ] }, "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": { "message": "If 'true' the NuGet.org symbol server (https\u200b://symbols.nuget.org\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.", - "comments": [ - "We use '\u200b' (unicode zero-length space character) to break VS Code's URL detection regex for URLs that are examples. Please do not translate or localized the URL." + "comment": [ + "We use '\u200b' (unicode zero-length space character) to break VS Code's URL detection regex for URLs that are examples. Please do not translate or localized the URL.", + "{Locked='(https\u200b://symbols.nuget.org\u200b/download/symbols)'}" ] }, "generateOptionsSchema.symbolOptions.cachePath.description": "Directory where symbols downloaded from symbol servers should be cached. If unspecified, on Windows the debugger will default to %TEMP%\\SymbolCache, and on Linux and macOS the debugger will default to ~/.dotnet/symbolcache.", @@ -266,7 +380,7 @@ "generateOptionsSchema.sourceLinkOptions.markdownDescription": "Options to control how Source Link connects to web servers. [More information](https://aka.ms/VSCode-CS-LaunchJson#source-link-options)", "generateOptionsSchema.sourceLinkOptions.additionalItems.enabled.markdownDescription": { "message": "Is Source Link enabled for this URL? If unspecified, this option defaults to `true`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, @@ -274,31 +388,31 @@ "generateOptionsSchema.targetOutputLogPath.description": "When set, text that the target application writes to stdout and stderr (ex: Console.WriteLine) will be saved to the specified file. This option is ignored if console is set to something other than internalConsole. E.g. '${workspaceFolder}/out.txt'", "generateOptionsSchema.targetArchitecture.markdownDescription": { "message": "[Only supported in local macOS debugging]\n\nThe architecture of the debuggee. This will automatically be detected unless this parameter is set. Allowed values are `x86_64` or `arm64`.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.checkForDevCert.description": { "message": "If you are launching a web project on Windows or macOS and this is enabled, the debugger will check if the computer has a self-signed HTTPS certificate used to develop web servers running on https endpoints. If unspecified, defaults to true when `serverReadyAction` is set. This option does nothing on Linux, VS Code remote, and VS Code Web UI scenarios. If the HTTPS certificate is not found or isn't trusted, the user will be prompted to install/trust it.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.processName.markdownDescription": { "message": "The process name to attach to. If this is used, `processId` should not be used.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.processId.0.markdownDescription": { "message": "The process id to attach to. Use \"\" to get a list of running processes to attach to. If `processId` used, `processName` should not be used.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, "generateOptionsSchema.processId.1.markdownDescription": { "message": "The process id to attach to. Use \"\" to get a list of running processes to attach to. If `processId` used, `processName` should not be used.", - "comments": [ + "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] } diff --git a/package.nls.ko.json b/package.nls.ko.json index a2c8a82ec..12e7ee145 100644 --- a/package.nls.ko.json +++ b/package.nls.ko.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": ".NET 5+ 또는 .NET Core 프로세스에 연결", + "command.csharp.downloadDebugger": ".NET Core 디버거 다운로드", + "command.csharp.listProcess": "연결 프로세스 나열", + "command.csharp.listRemoteDockerProcess": "Docker 연결에 프로세스 나열", + "command.csharp.listRemoteProcess": "첨부할 원격 연결의 프로세스 나열", + "command.csharp.reportIssue": "문제 신고", + "command.csharp.showDecompilationTerms": "디컴파일러 계약 표시", + "command.dotnet.generateAssets.currentProject": "빌드 및 디버그에 대한 자산 생성", + "command.dotnet.openSolution": "솔루션 열기", + "command.dotnet.restartServer": "언어 서버 다시 시작", + "command.dotnet.restore.all": "모든 프로젝트 복원", + "command.dotnet.restore.project": "프로젝트 복원", + "command.dotnet.test.debugTestsInContext": "컨텍스트에서 테스트 디버그", + "command.dotnet.test.runTestsInContext": "컨텍스트에서 테스트 실행", + "command.extension.showRazorCSharpWindow": "Razor CSharp 표시", + "command.extension.showRazorHtmlWindow": "Razor Html 표시", + "command.o.fixAll.document": "문서 내에서 발생하는 모든 코드 문제 해결", + "command.o.fixAll.project": "프로젝트 내에서 발생하는 모든 코드 문제 해결", + "command.o.fixAll.solution": "솔루션 내에서 발생하는 모든 코드 문제 해결", + "command.o.pickProjectAndStart": "프로젝트 선택", + "command.o.reanalyze.allProjects": "모든 프로젝트 분석", + "command.o.reanalyze.currentProject": "현재 프로젝트 분석", + "command.o.restart": "OmniSharp 다시 시작", + "command.razor.reportIssue": "Razor 문제 보고", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "암시적 개체 만들기에 대한 힌트 표시", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "유추된 형식의 변수에 대한 힌트 표시", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "인덱서에 대한 힌트 표시", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "람다 매개 변수 형식에 대한 힌트 표시", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "인라인 유형 힌트 표시", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "다음을 위해 백그라운드 코드 분석을 실행합니다.", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "다음에 대한 백그라운드 코드 분석 실행: (이전의 `omnisharp.enableRoslynAnalyzers`)", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "전체 솔루션", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "없음", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "열린 문서", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "전체 솔루션", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "없음", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "열린 문서", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "CodeLens 참조를 표시할지 여부를 지정합니다.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "실행 및 디버그 테스트 CodeLens를 표시할지 여부를 지정합니다.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "참조 CodeLens를 표시해야 하는지 여부를 지정합니다(이전 `csharp.referencesCodeLens.enabled`).", + "configuration.dotnet.codeLens.enableTestsCodeLens": "실행 및 디버그 테스트 CodeLens를 표시해야 하는지 여부를 지정합니다(이전 `csharp.testsCodeLens.enabled`).", "configuration.dotnet.completion.provideRegexCompletions": "완성 목록에 정규식을 표시합니다.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "완성 목록에 중요하지 않은 형식 및 중요하지 않은 확장 메서드를 표시하도록 지원합니다. 커밋되면 적절한 using 지시문이 현재 파일의 맨 위에 추가됩니다.", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "완성 목록에 가져오지 않은 유형과 가져오지 않은 확장 메서드를 표시하기 위한 지원을 활성화합니다. 커밋되면 적절한 using 지시문이 현재 파일의 맨 위에 추가됩니다(이전 `omnisharp.enableImportCompletion`).", "configuration.dotnet.completion.showNameCompletionSuggestions": "최근에 선택한 멤버에 대해 자동 개체 이름 완성을 수행합니다.", - "configuration.dotnet.defaultSolution.description": "작업 영역에서 열 기본 솔루션의 경로입니다. 건너뛰려면 '사용 안 함'으로 설정하세요.", + "configuration.dotnet.defaultSolution.description": "작업 영역에서 열릴 기본 솔루션의 경로, 건너뛰려면 '비활성화'로 설정하세요(이전 `omnisharp.defaultLaunchSolution`).", "configuration.dotnet.dotnetPath": "기본 시스템 대신 사용할 dotnet 설치 디렉터리를 지정합니다. 이는 언어 서버 자체를 호스팅하는 데 사용할 dotnet 설치에만 영향을 줍니다(예: \"/home/username/mycustomdotnetdirectory\").", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "커서 아래에서 관련 JSON 구성 요소를 강조 표시합니다.", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "커서 아래의 관련 정규식 구성 요소를 강조 표시합니다.", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "인수가 매개 변수 이름과 일치하는 경우 힌트 표시 안 함", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "매개 변수 이름이 메서드의 의도와 일치하는 경우 힌트 표시 안 함", "configuration.dotnet.navigation.navigateToDecompiledSources": "디컴파일된 원본 탐색을 사용하도록 설정합니다.", + "configuration.dotnet.preferCSharpExtension": "프로젝트가 C# 확장으로만 로드되도록 합니다. C# 개발 키트에서 지원되지 않는 레거시 프로젝트 형식을 사용할 때 유용할 수 있습니다(창 다시 로드 필요).", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "기호를 표시할 때 설명 정보를 표시합니다.", + "configuration.dotnet.server.crashDumpPath": "언어 서버가 충돌하는 경우 크래시 덤프가 기록되는 폴더 경로를 설정합니다. 사용자가 쓸 수 있어야 합니다.", "configuration.dotnet.server.extensionPaths": "언어 서버 --extension 인수 경로에 대한 재정의", - "configuration.dotnet.server.path": "서버(LSP 또는 O#) 실행 파일의 절대 경로를 지정합니다. 비워 두면 C# 확장에 고정된 버전이 사용됩니다.", + "configuration.dotnet.server.path": "서버(LSP 또는 O#) 실행 파일의 절대 경로를 지정합니다. 비어 있으면 C# 확장에 고정된 버전이 사용됩니다(이전 `omnisharp.path`).", + "configuration.dotnet.server.startTimeout": "클라이언트가 언어 서버를 시작하고 연결하기 위한 시간 제한(밀리초)을 지정합니다.", "configuration.dotnet.server.trace": "언어 서버의 로깅 수준을 설정합니다.", - "configuration.dotnet.server.waitForDebugger": "디버거를 연결할 수 있도록 서버를 시작할 때 --debug 플래그를 전달합니다.", + "configuration.dotnet.server.waitForDebugger": "디버거 연결을 허용하기 위해 서버를 시작할 때 --debug 플래그를 전달합니다(이전 `omnisharp.waitForDebugger`).", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "참조 어셈블리에서 기호를 검색합니다. 가져오기 추가와 같은 기호 검색이 필요한 기능에 영향을 줍니다.", - "configuration.dotnet.unitTestDebuggingOptions": "단위 테스트 디버깅을 시작할 때 디버거와 함께 사용할 옵션입니다.", + "configuration.dotnet.unitTestDebuggingOptions": "단위 테스트 디버깅을 시작할 때 디버거와 함께 사용하는 옵션입니다(이전 `csharp.unitTestDebuggingOptions`).", "configuration.razor.languageServer.debug": "언어 서버를 시작할 때 디버그 연결을 기다릴지 여부를 지정합니다.", "configuration.razor.languageServer.directory": "Razor 언어 서버 디렉터리의 경로를 재정의합니다.", "configuration.razor.trace": "모든 메시지 [Verbose] 또는 일부 메시지 [Messages] 출력, 완전히 [Off] 중 사용할 옵션을 지정합니다.", "configuration.razor.trace.messages": "Razor 확장의 일부 메시지만 기록합니다.", "configuration.razor.trace.off": "Razor 확장의 메시지를 기록하지 않습니다.", "configuration.razor.trace.verbose": "Razor 확장의 모든 메시지를 기록합니다.", + "debuggers.coreclr.configurationSnippets.description.attach": "실행 중인 프로세스에 .NET 디버거(coreclr)를 연결합니다. 이 작업은 'Attach to a .NET 5+ or .NET Core process' 명령을 사용하여 수행할 수도 있습니다.", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "이 코드 조각은 Blazor WebAssembly 디버거(blazorwasm) 아래에서 새 프로세스를 시작하는 데 사용되며, 실행 파일의 경로를 지정합니다. 대부분의 경우 \".NET: Launch C# project\" 코드 조각이 더 나은 선택이지만, 이 코드 조각을 사용하면 모든 시작 옵션을 완전히 제어할 수 있습니다. 이 코드 조각은 파일을 처리할 백 엔드 ASP.NET Core 앱이 있는 프로젝트인 호스트된 Blazor 프로젝트용입니다.", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "이 코드 조각은 Blazor WebAssembly 디버거(blazorwasm) 아래에서 새 프로세스를 시작하는 데 사용됩니다. 대부분의 경우 \".NET: Launch C# project\" 코드 조각이 더 나은 선택이지만, 이 코드 조각을 사용하면 모든 시작 옵션을 완전히 제어할 수 있습니다. 이 코드 조각은 파일을 처리할 백 엔드 ASP.NET Core 앱이 없는 프로젝트인 독립 실행형 Blazor 프로젝트용입니다.", + "debuggers.coreclr.configurationSnippets.description.console-local": "이 코드 조각은 .NET 디버거(coreclr) 아래에서 새 프로세스를 시작하는 데 사용되며, 시작할 실행 파일의 경로를 지정합니다. 대부분의 경우 \".NET: Launch C# project\" 코드 조각을 선택하는 것이 좋습니다. 이 코드 조각은 프로젝트가 이 VS Code 인스턴스 외부에서 작성되었거나 특정 버전의 'dotnet.exe'/'dotnet'과 같은 사용자 지정 실행 파일에서 .NET Code를 호스팅하려는 경우 또는 .NET Code가 네이티브 응용 프로그램에서 호스팅되는 경우에 유용합니다. 이 코드 조각은 콘솔 응용 프로그램용입니다.", + "debuggers.coreclr.configurationSnippets.description.remote": "이 코드 조각에서는 VS Code 원격을 사용하지 **않고** .NET Code를 원격 디버그하는 방법을 보여 줍니다. 프로젝트를 로컬에서 구축하고 다른 컴퓨터에서 실행하려는 경우에 사용해야 합니다.", + "debuggers.coreclr.configurationSnippets.description.web-local": "이 코드 조각은 .NET 디버거(coreclr) 아래에서 새 프로세스를 시작하는 데 사용되며, 시작할 실행 파일의 경로를 지정합니다. 대부분의 경우 \".NET: Launch C# project\" 코드 조각을 선택하는 것이 좋습니다. 이 코드 조각은 프로젝트가 이 VS Code 인스턴스 외부에서 작성되었거나 특정 버전의 'dotnet.exe'/'dotnet'과 같은 사용자 지정 실행 파일에서 .NET Code를 호스팅하려는 경우 또는 .NET Code가 네이티브 응용 프로그램에서 호스팅되는 경우에 유용합니다. 이 코드 조각은 웹(ASP.NET Core) 응용 프로그램용입니다.", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: .NET 프로세스에 연결", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: 원격 디버깅 - .NET 프로세스에 연결", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: 웹 어셈블리 - 호스트된 Blazor 프로젝트 시작", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: 웹 어셈블리 - 독립 실행형 Blazor 프로젝트 시작", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: 실행 파일 시작(콘솔)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: 원격 디버깅 - 실행 파일 시작(콘솔)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: 실행 파일 시작(웹)", + "debuggers.dotnet.configurationSnippets.description": "이 코드 조각은 VS Code가 C# 프로젝트를 디버깅하도록 구성합니다. 디버그 옵션(예: 실행 파일에 대한 인수)은 '/Properties/launchSettings.json' 파일을 통해 구성할 수 있습니다.", + "debuggers.dotnet.configurationSnippets.label": ".NET: C# 프로젝트 시작", "debuggers.dotnet.launch.launchConfigurationId.description": "사용할 시작 구성 ID입니다. 빈 문자열은 현재 활성 구성을 사용합니다.", "debuggers.dotnet.launch.projectPath.description": ".csproj 파일의 경로입니다.", "generateOptionsSchema.allowFastEvaluate.description": "true(기본 상태)인 경우 디버거는 간단한 속성 및 메서드 실행을 시뮬레이션하여 더 빠른 평가를 시도합니다.", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "지정된 경우 사용할 launchSettings.json의 프로필 이름을 나타냅니다. launchSettings.json이 없으면 무시됩니다. launchSettings.json은 'launchSettingsFilePath' 속성 또는 {cwd}/Properties/launchSettings.json이 설정되지 않은 경우 지정된 경로에서 읽혀집니다. 이 항목이 null 또는 빈 문자열로 설정되면 launchSettings.json이 무시됩니다. 이 값을 지정하지 않으면 첫 번째 '프로젝트' 프로필이 사용됩니다.", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "웹 브라우저 실행의 stdout 텍스트를 출력 창에 기록해야 하는지 여부를 결정하는 플래그입니다. 이 옵션의 기본값은 `true`입니다.", "generateOptionsSchema.logging.description": "출력 창에 기록해야 하는 메시지 유형을 결정하는 플래그입니다.", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "true인 경우 엔진 로깅에는 `adapterElapsedTime` 및 `engineElapsedTime` 속성이 포함되어 요청에 소요된 시간(마이크로초)을 나타냅니다. 이 옵션의 기본값은 `false`입니다.", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "진단 엔진 로그를 출력 창에 기록해야 하는지 여부를 결정하는 플래그입니다. 이 옵션의 기본값은 `false`입니다.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "모든 디버거 API 호출을 인쇄합니다. 매우 자세한 활동입니다.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "디버거 API 호출에서 오류를 인쇄합니다.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h에 대한 API 호출을 출력 창에 인쇄해야 하는지를 제어합니다. 이 옵션은 기본적으로 'none'입니다.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "추적 API 호출 사용 안 함", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "기본 런타임에 의해 발생한 이벤트에 대한 자세한 정보 추적을 사용하도록 설정해야 하는지 여부를 결정하는 플래그입니다. 이 옵션의 기본값은 'false'입니다.", + "generateOptionsSchema.logging.diagnosticsLog.description": "디버거의 진단 로그에서 출력 창으로 인쇄되는 메시지를 제어하는 설정입니다. 이 로그는 디버거 문제를 해결하는 데 도움이 됩니다.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "오류 수준 진단 메시지를 인쇄합니다.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "중요한 진단 메시지를 인쇄합니다.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "디버거의 디스패처에서 출력 창으로 인쇄되는 메시지를 제어합니다. 지정하지 않으면 자세한 로그 설정 중 하나('debugEngineAPITracing', 'debugRuntimeEventTracing', 'expressionEvaluationTracing' 또는 'startDebuggingTracing')를 사용하도록 설정하지 않는 한 기본값은 'none'으로 설정됩니다. 이 경우 기본값은 'normal'으로 변경됩니다.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "추가 진단 메시지를 인쇄하지 마세요.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "자세한 정보가 아닌 진단 메시지를 모두 인쇄합니다.", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "식 평가에 대한 자세한 정보 추적을 사용할지 여부를 결정하는 플래그입니다. 이 옵션의 기본값은 `false`입니다.", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "C# 디버거와 UI 간에 교환된 DAP 프로토콜 메시지를 출력 창에 기록해야 하는지 여부를 결정하는 플래그입니다. 이 옵션의 기본값은 'false'입니다.", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "시작 디버깅에 대한 자세한 정보 추적을 사용할지 여부를 결정하는 플래그입니다. 이 옵션의 기본값은 'false'입니다.", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "true인 경우 프로토콜 메시지 로깅에는 `adapterElapsedTime` 및 `engineElapsedTime` 속성이 포함되어 요청에 소요된 시간(마이크로초)을 나타냅니다. 이 옵션의 기본값은 `false`입니다.", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "'logging.engineLogging' 설정은 'logging.diagnosticsLog.protocolMessages'에 대해 더 이상 사용되지 않습니다.", "generateOptionsSchema.logging.exceptions.markdownDescription": "예외 메시지를 출력 창에 기록해야 하는지 여부를 결정하는 플래그입니다. 이 옵션의 기본값은 `true`입니다.", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "모듈 로드 이벤트를 출력 창에 기록해야 하는지 여부를 결정하는 플래그입니다. 이 옵션의 기본값은 `true`입니다.", "generateOptionsSchema.logging.processExit.markdownDescription": "대상 프로세스가 종료되거나 디버깅이 중지될 때 메시지를 기록할지 여부를 제어합니다. 이 옵션의 기본값은 `true`입니다.", @@ -137,8 +193,8 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadAllButExcluded.enumDescription": "모듈이 'excludedModules' 배열에 있지 않으면 모든 모듈에 대한 기호를 로드합니다.", "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "'includedModules' 배열에 있거나 'includeSymbolsNextToModules' 설정을 통해 포함되는 경우가 아니면 모듈에 대한 기호를 로드하지 않도록 합니다.", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "'true'인 경우 Microsoft 기호 서버(https​://msdl.microsoft.com​/download/symbols)가 기호 검색 경로에 추가됩니다. 지정하지 않으면 이 옵션의 기본값은 'false'입니다.", - "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "'true'이면 NuGet.org 기호 서버(https://symbols.nuget.org/download/symbols)가 기호 검색 경로에 추가됩니다. 지정하지 않으면 이 옵션의 기본값은 'false'입니다.", - "generateOptionsSchema.symbolOptions.searchPaths.description": ".pdb 파일을 검색하는 기호 서버 URL(예: http​://MyExampleSymbolServer) 또는 디렉터리(예: /build/symbols)의 배열입니다. 이러한 디렉터리가 모듈 및 pdb가 원래 삭제된 경로 옆에 있는 기본 위치 외에 검색됩니다.", + "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "'true'이면 NuGet.org 기호 서버(https​://symbols.nuget.org​/download/symbols)가 기호 검색 경로에 추가됩니다. 지정하지 않으면 이 옵션의 기본값은 'false'입니다.", + "generateOptionsSchema.symbolOptions.searchPaths.description": ".pdb 파일을 검색하는 기호 서버 URL(example: http​://MyExampleSymbolServer) 또는 디렉터리(example: /build/symbols)의 배열입니다. 이러한 디렉터리가 모듈 및 pdb가 원래 삭제된 경로 옆에 있는 기본 위치 외에 검색됩니다.", "generateOptionsSchema.targetArchitecture.markdownDescription": "[로컬 macOS 디버깅에서만 지원됨]\r\n\r\n디버기의 아키텍처. 이 매개 변수를 설정하지 않으면 자동으로 검색됩니다. 허용되는 값은 `x86_64` 또는 `arm64`입니다.", "generateOptionsSchema.targetOutputLogPath.description": "설정하면 대상 애플리케이션이 stdout 및 stderr(예: Console.WriteLine)에 쓰는 텍스트가 지정된 파일에 저장됩니다. 콘솔이 internalConsole 이외의 것으로 설정된 경우 이 옵션은 무시됩니다(예: '${workspaceFolder}/out.txt')", "viewsWelcome.debug.contents": "[빌드와 디버그를 위한 C# 자산 생성](command:dotnet.generateAssets)\r\n\r\nlaunch.json에 관해 자세히 알아보려면 [C# 디버깅을 위한 launch.json 구성](https://aka.ms/VSCode-CS-LaunchJson)을 참조하세요." diff --git a/package.nls.pl.json b/package.nls.pl.json index a3322a54f..eae3470b2 100644 --- a/package.nls.pl.json +++ b/package.nls.pl.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": "Dołączanie do procesu platformy .NET 5 lub .NET Core", + "command.csharp.downloadDebugger": "Pobierz debuger platformy .NET Core", + "command.csharp.listProcess": "Wyświetl proces do dołączenia", + "command.csharp.listRemoteDockerProcess": "Wyświetl listę procesów w połączeniu platformy Docker", + "command.csharp.listRemoteProcess": "Wyświetl listę procesów w połączeniu zdalnym do dołączenia", + "command.csharp.reportIssue": "Zgłoś problem", + "command.csharp.showDecompilationTerms": "Pokaż umowę warunków dekompilowania", + "command.dotnet.generateAssets.currentProject": "Generuj zasoby na potrzeby kompilacji i debugowania", + "command.dotnet.openSolution": "Otwórz rozwiązanie", + "command.dotnet.restartServer": "Ponownie uruchom serwer języka", + "command.dotnet.restore.all": "Przywróć wszystkie projekty", + "command.dotnet.restore.project": "Przywróć projekt", + "command.dotnet.test.debugTestsInContext": "Debuguj testy w kontekście", + "command.dotnet.test.runTestsInContext": "Uruchom testy w kontekście", + "command.extension.showRazorCSharpWindow": "Pokaż Razor CSharp", + "command.extension.showRazorHtmlWindow": "Pokaż kod Html Razor", + "command.o.fixAll.document": "Rozwiąż wszystkie wystąpienia problemu z kodem w dokumencie", + "command.o.fixAll.project": "Rozwiąż wszystkie wystąpienia problemu z kodem w projekcie", + "command.o.fixAll.solution": "Rozwiąż wszystkie wystąpienia problemu z kodem w rozwiązaniu", + "command.o.pickProjectAndStart": "Wybierz projekt", + "command.o.reanalyze.allProjects": "Analizuj wszystkie projekty", + "command.o.reanalyze.currentProject": "Analizuj bieżący projekt", + "command.o.restart": "Uruchom ponownie aplikację OmniSharp", + "command.razor.reportIssue": "Zgłoś problem z aparatem Razor", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "Pokazuj wskazówki dotyczące niejawnego tworzenia obiektów", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "Pokaż wskazówki dla zmiennych z wnioskowanymi typami", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "Pokaż wskazówki dla indeksatorów", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "Pokaż wskazówki dla typów parametrów funkcji lambda", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "Wyświetl wskazówki w tekście dla typów", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Uruchom analizę kodu w tle dla:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Uruchom analizę kodu w tle dla: (Wcześniej „omnisharp.enableRoslynAnalyzers”)", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "Całe rozwiązanie", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "Brak", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "Otwórz dokumenty", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "Całe rozwiązanie", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "Brak", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "Otwórz dokumenty", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "Określa, czy mają być wyświetlane odwołania CodeLens.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "Określa, czy mają być wyświetlane parametry CodeLens testu przebiegu i debugowania.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "Określa, czy ma być wyświetlana funkcja CodeLens odwołań. (Wcześniej „csharp.referencesCodeLens.enabled”)", + "configuration.dotnet.codeLens.enableTestsCodeLens": "Określa, czy ma być wyświetlana funkcja CodeLens testu przebiegu i debugowania. (Wcześniej „csharp.testsCodeLens.enabled”)", "configuration.dotnet.completion.provideRegexCompletions": "Pokaż wyrażenia regularne na liście uzupełniania.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Umożliwia wyświetlanie niezaimportowanych typów i niezaimportowanych metod rozszerzeń na listach uzupełniania. Po zadeklarowaniu odpowiednia dyrektywa using zostanie dodana w górnej części bieżącego pliku.", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Zapewnia obsługę wyświetlania niezaimportowanych typów i niezaimportowanych metod rozszerzeń na listach uzupełniania. Po zadeklarowaniu odpowiednia dyrektywa using zostanie dodana w górnej części bieżącego pliku. (Wcześniej „omnisharp.enableImportCompletion”)", "configuration.dotnet.completion.showNameCompletionSuggestions": "Wykonaj automatyczne uzupełnianie nazw obiektów dla elementów członkowskich, które zostały ostatnio wybrane.", - "configuration.dotnet.defaultSolution.description": "Ścieżka domyślnego rozwiązania, które ma być otwarte w obszarze roboczym, lub ustawione na „wyłączony”, aby je pominąć.", + "configuration.dotnet.defaultSolution.description": "Ścieżka domyślnego rozwiązania, która ma zostać otwarta w obszarze roboczym, lub ustawiona na wartość „wyłącz”, aby je pominąć. (Poprzednio „omnisharp.defaultLaunchSolution”)", "configuration.dotnet.dotnetPath": "Określa ścieżkę do katalogu instalacyjnego dotnet, który ma być używany zamiast domyślnego katalogu systemowego. Ma to wpływ tylko na instalację dotnet używaną do hostowania samego serwera językowego. Przykład: „/home/username/mycustomdotnetdirectory”.", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "Wyróżnij powiązane składniki JSON pod kursorem.", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "Wyróżnij powiązane składniki wyrażenia regularnego pod kursorem.", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "Pomiń wskazówki, gdy argument pasuje do nazwy parametru", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "Pomiń wskazówki, gdy nazwa parametru pasuje do intencji metody", "configuration.dotnet.navigation.navigateToDecompiledSources": "Włącz nawigację do zdekompilowanych źródeł.", + "configuration.dotnet.preferCSharpExtension": "Wymusza ładowanie projektów tylko z rozszerzeniem języka C#. Może to być przydatne w przypadku korzystania ze starszych typów projektów, które nie są obsługiwane przez zestaw C# Dev Kit. (Wymaga ponownego załadowania okna)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "Pokaż informacje o uwagach podczas wyświetlania symbolu.", + "configuration.dotnet.server.crashDumpPath": "Ustawia ścieżkę folderu, w której są zapisywane zrzuty awaryjne w przypadku awarii serwera języka. Użytkownik musi mieć możliwość zapisu.", "configuration.dotnet.server.extensionPaths": "Przesłoń ścieżkę do serwera językowego --argumenty rozszerzenia", - "configuration.dotnet.server.path": "Określa ścieżkę bezwzględną do pliku wykonywalnego serwera (LSP lub O#). W przypadku pozostawienia tej wartości pustej, używana jest wersja przypięta do rozszerzenia języka C#.", + "configuration.dotnet.server.path": "Określa ścieżkę bezwzględną do pliku wykonywalnego serwera (LSP lub O#). W przypadku pozostawienia tej wartości pustej, używana jest wersja przypięta do rozszerzenia języka C#. (Wcześniej „omnisharp.path”)", + "configuration.dotnet.server.startTimeout": "Określa limit czasu (w ms) dla pomyślnego uruchomienia klienta i nawiązania połączenia z serwerem języka.", "configuration.dotnet.server.trace": "Ustawia poziom rejestrowania dla serwera języka", - "configuration.dotnet.server.waitForDebugger": "Przekazuje flagę --debug podczas uruchamiania serwera, aby umożliwić dołączenie debugera.", + "configuration.dotnet.server.waitForDebugger": "Przekazuje flagę --debug podczas uruchamiania serwera, aby umożliwić dołączenie debugera. (Wcześniej „omnisharp.waitForDebugger”)", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "Wyszukaj symbole w zestawach odwołań. Ma to wpływ na funkcje wymagające wyszukiwania symboli, takie jak dodawanie importów.", - "configuration.dotnet.unitTestDebuggingOptions": "Opcje używane z debugerem podczas uruchamiania na potrzeby debugowania testów jednostkowych.", + "configuration.dotnet.unitTestDebuggingOptions": "Opcje używane z debugerem podczas uruchamiania na potrzeby debugowania testów jednostkowych. (Wcześniej „csharp.unitTestDebuggingOptions”)", "configuration.razor.languageServer.debug": "Określa, czy czekać na dołączenie debugowania podczas uruchamiania serwera języka.", "configuration.razor.languageServer.directory": "Przesłania ścieżkę do katalogu serwera języka Razor.", "configuration.razor.trace": "Określa, czy mają być przekazywane wszystkie komunikaty [Pełne], niektóre komunikaty [Komunikaty], czy żadne komunikaty [Wyłączone].", "configuration.razor.trace.messages": "Rejestruje tylko niektóre komunikaty z rozszerzenia Razor", "configuration.razor.trace.off": "Nie rejestruje komunikatów z rozszerzenia Razor", "configuration.razor.trace.verbose": "Rejestruje wszystkie komunikaty z rozszerzenia Razor", + "debuggers.coreclr.configurationSnippets.description.attach": "Dołącz debuger platformy .NET (coreclr) do uruchomionego procesu. Można to również zrobić za pomocą polecenia „Dołącz do procesu .NET 5+ lub .NET Core”.", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "Ten fragment kodu służy do uruchamiania nowego procesu w debugerze zestawu WebAssembly platformy Blazor (blazorwasm), określając ścieżkę do pliku wykonywalnego do uruchomienia. W większości przypadków „.NET: Fragment kodu „Launch C# project” (Uruchom projekt C#) jest lepszym wyborem, ale za pomocą tego fragmentu kodu można mieć pełną kontrolę nad wszystkimi opcjami uruchamiania. Ten fragment kodu jest przeznaczony dla hostowanych projektów Platformy Blazor, czyli projektu, który ma zaplecze ASP.NET aplikacji Core do obsługi plików.", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "Ten fragment kodu służy do uruchamiania nowego procesu w debugerze zestawu WebAssembly platformy Blazor (blazorwasm). W większości przypadków „.NET: Fragment kodu „Launch C# project” (Uruchom projekt C#) jest lepszym wyborem, ale za pomocą tego fragmentu kodu można mieć pełną kontrolę nad wszystkimi opcjami uruchamiania. Ten fragment kodu jest przeznaczony dla autonomicznych projektów Platformy Blazor, będących projektem, który nie ma aplikacji zaplecza ASP.NET Core do obsługi plików.", + "debuggers.coreclr.configurationSnippets.description.console-local": "Ten fragment kodu służy do uruchamiania nowego procesu w debugerze .NET (coreclr), określając ścieżkę do pliku wykonywalnego do uruchomienia. W większości przypadków „.NET: Fragment kodu „Launch C# project” (Uruchom projekt C#) jest lepszym wyborem. Ten fragment kodu jest przydatny, gdy projekt został skompilowany poza tym wystąpieniem programu VS Code lub chcesz hostować kod .NET w niestandardowym pliku wykonywalnym, takim jak określona wersja pliku „dotnet.exe”/„dotnet” lub program .NET Code jest hostowany przez aplikację natywną. Ten fragment kodu jest przeznaczony dla aplikacji konsolowych.", + "debuggers.coreclr.configurationSnippets.description.remote": "Ten fragment kodu pokazuje, jak zdalnie debugować kod .NET **bez** przy użyciu komunikacji zdalnej programu VS Code. Powinien być używany w przypadkach, gdy chcesz skompilować projekt lokalnie, ale chcesz uruchomić go na innym komputerze.", + "debuggers.coreclr.configurationSnippets.description.web-local": "Ten fragment kodu służy do uruchamiania nowego procesu w debugerze .NET (coreclr), określając ścieżkę do pliku wykonywalnego do uruchomienia. W większości przypadków „.NET: Fragment kodu „Launch C# project” (Uruchom projekt C#) jest lepszym wyborem. Ten fragment kodu jest przydatny, gdy projekt został skompilowany poza tym wystąpieniem programu VS Code lub chcesz hostować kod .NET w niestandardowym pliku wykonywalnym, takim jak określona wersja pliku „dotnet.exe”/„dotnet” lub program .NET Code jest hostowany przez aplikację natywną. Ten fragment kodu jest przeznaczony dla aplikacji internetowych (ASP.NET Core).", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: Dołącz do procesu platformy .NET", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: Zdalne debugowanie — dołącz do procesu platformy .NET", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Zestaw sieci Web — uruchom hostowany projekt Platformy Blazor", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Zestaw sieci Web — uruchom autonomiczny projekt Platformy Blazor", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Uruchom plik wykonywalny (konsola)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: Zdalne debugowanie — uruchamianie pliku wykonywalnego (konsola)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Uruchom plik wykonywalny (sieć Web)", + "debuggers.dotnet.configurationSnippets.description": "Ten fragment kodu konfiguruje program VS Code do debugowania projektu języka C#. Opcje debugowania (przykład: argumenty pliku wykonywalnego) można skonfigurować za pomocą pliku „/Properties/launchSettings.json”.", + "debuggers.dotnet.configurationSnippets.label": ".NET: Uruchom projekt języka C#", "debuggers.dotnet.launch.launchConfigurationId.description": "Identyfikator konfiguracji uruchamiania do użycia. Pusty ciąg znaków spowoduje użycie bieżącej aktywnej konfiguracji.", "debuggers.dotnet.launch.projectPath.description": "Ścieżka do pliku .csproj.", "generateOptionsSchema.allowFastEvaluate.description": "W przypadku wartości true (stan domyślny) debuger podejmie próbę szybszego obliczania, symulując wykonywanie prostych właściwości i metod.", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "Jeśli ta wartość jest określona, wskazuje nazwę profilu w pliku launchSettings.json do użycia. Jest to ignorowane, jeśli nie znaleziono pliku launchSettings.json. Plik launchSettings.json będzie odczytywany z określonej ścieżki, która powinna być właściwością „launchSettingsFilePath”, lub {cwd}/Properties/launchSettings.json, jeśli nie jest ustawiona. Jeśli ta opcja jest ustawiona na wartość null lub jest pustym ciągiem, wtedy plik launchSettings.json jest ignorowany. Jeśli ta wartość nie zostanie określona, zostanie użyty pierwszy profil „Project”.", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "Flaga umożliwiająca określenie, czy tekst stdout z uruchamiania przeglądarki internetowej powinien być rejestrowany w oknie danych wyjściowych. Ta opcja jest ustawiona domyślnie na wartość „true”.", "generateOptionsSchema.logging.description": "Flagi umożliwiające określenie, które typy komunikatów powinny być rejestrowane w oknie danych wyjściowych.", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Jeśli jest ustawione na wartość true, rejestrowanie aparatu będzie zawierać właściwości „adapterElapsedTime” i „engineElapsedTime”, aby wskazać czas (w mikrosekundach) trwania żądania. Ta opcja jest ustawiona domyślnie na wartość „false”.", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "Flaga określająca, czy dzienniki aparatu diagnostycznego powinny być rejestrowane w oknie danych wyjściowych. Opcja jest ustawiona domyślnie na wartość „false”.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "Drukuj wszystkie wywołania interfejsu API debugera. Jest to bardzo szczegółowe.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "Błędy drukowania z wywołań interfejsu API debugera.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Określa, czy wywołania interfejsu API do elementu Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h powinny być drukowane w oknie danych wyjściowych. Ta opcja domyślnie ma wartość „none”.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "Wyłącz wywołania interfejsu API śledzenia", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "Flaga określająca, czy powinno być włączone pełne śledzenie zdarzeń wywoływanych przez bazowe środowisko uruchomieniowe. Ta opcja jest ustawiona domyślnie na wartość „false”.", + "generateOptionsSchema.logging.diagnosticsLog.description": "Ustawienia określające, które komunikaty są drukowane w oknie danych wyjściowych z dziennika diagnostycznego debugera. Ten dziennik ma pomóc w rozwiązywaniu problemów z debugerem.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "Drukuj komunikaty diagnostyczne na poziomie błędów.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "Drukuj ważne komunikaty diagnostyczne.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "Określa, które komunikaty są drukowane w oknie danych wyjściowych od dyspozytora debugera. Jeśli nie zostanie określona, ustawienie domyślne będzie mieć wartość „none”, chyba że jest włączone jedno z ustawień pełnego dziennika („debugEngineAPITracing”, „debugRuntimeEventTracing”, „expressionEvaluationTracing” lub „startDebuggingTracing”), w którym to przypadku wartość domyślna zmieni się na „normal”.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "Nie drukuj dodatkowych komunikatów diagnostycznych.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "Drukuj wszystkie nieszczegółowe komunikaty diagnostyczne.", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "Flaga określająca, czy powinno być włączone pełne śledzenie oceny wyrażenia. Ta opcja jest ustawiona domyślnie na wartość „false”.", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "Flaga określająca, czy komunikaty protokołu DAP wymieniane między debugerem języka C# i interfejsem użytkownika powinny być rejestrowane w oknie danych wyjściowych. Ta opcja jest ustawiona domyślnie na wartość „false”.", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "Flaga określająca, czy powinno być włączone pełne śledzenie uruchamiania debugowania. Ta opcja jest ustawiona domyślnie na wartość „false”.", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Jeśli ma wartość true, rejestrowanie komunikatów protokołu będzie zawierać właściwości „adapterElapsedTime” i „engineElapsedTime”, aby wskazać czas, który zajęło żądanie w mikrosekundach. Ta opcja jest ustawiona domyślnie na wartość „false”.", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "Ustawienie „logging.engineLogging” zostało uznane za przestarzałe na rzecz elementu „logging.diagnosticsLog.protocolMessages”.", "generateOptionsSchema.logging.exceptions.markdownDescription": "Flaga umożliwiająca określenie, czy komunikaty o wyjątkach powinny być rejestrowane w oknie danych wyjściowych. Ta opcja jest ustawiona domyślnie na wartość „true”.", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "Flaga umożliwiająca określenie, czy zdarzenia ładowania modułu powinny być rejestrowane w oknie danych wyjściowych. Ta opcja jest ustawiona domyślnie na wartość „true”.", "generateOptionsSchema.logging.processExit.markdownDescription": "Określa, czy komunikat jest rejestrowany podczas kończenia procesu docelowego lub zatrzymywania debugowania. Ta opcja jest ustawiona domyślnie na wartość „true”.", @@ -138,7 +194,7 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "Nie próbuj ładować symboli dla ŻADNEGO modułu, jeśli nie znajduje się w tablicy „includedModules” lub jest ono uwzględniane przez ustawienie „includeSymbolsNextToModules”.", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "W przypadku wartości „true” serwer symboli firmy Microsoft (https​://msdl.microsoft.com​/download/symbols) zostanie dodany do ścieżki wyszukiwania symboli. Jeśli ta opcja nie zostanie określona, domyślnie zostanie wybrana wartość „false”.", "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "W przypadku ustawienia na wartość „true” serwer symboli NuGet.org (https​://symbols.nuget.org​/download/symbols) zostanie dodany do ścieżki wyszukiwania symboli. Jeśli ta opcja nie zostanie określona, domyślnie zostanie ustawiona na wartość „false”.", - "generateOptionsSchema.symbolOptions.searchPaths.description": "Tablica adresów URL serwera symboli (przykład: http:​//MyExampleSymbolServer) lub katalogów (przykład:/build/Symbols) w celu wyszukania plików PDB. Te katalogi zostaną wyszukane jako uzupełnienie lokalizacji domyślnych — obok modułu i ścieżki, do której plik PDB został pierwotnie porzucony.", + "generateOptionsSchema.symbolOptions.searchPaths.description": "Tablica adresów URL serwera symboli (przykład: http​://MyExampleSymbolServer) lub katalogi (przykład: /build/symbols), aby wyszukać pliki .pdb. Te katalogi będą przeszukiwane oprócz lokalizacji domyślnych — obok modułu i ścieżki, do której pierwotnie przeniesiono plik pdb.", "generateOptionsSchema.targetArchitecture.markdownDescription": "[Obsługiwane tylko w przypadku debugowania lokalnego systemu macOS]\r\n\r\nArchitektura obiektu debugowanego. Zostanie automatycznie wykryta, chyba że ten parametr jest ustawiony. Dozwolone wartości to „x86_64” lub „arm_64”.", "generateOptionsSchema.targetOutputLogPath.description": "Po ustawieniu tekst, który aplikacja docelowa zapisuje w stdout i stderr (np. Console.WriteLine), zostanie zapisany w określonym pliku. Ta opcja jest ignorowana, jeśli konsola jest ustawiona na wartość inną niż internalConsole, np. \"${workspaceFolder}/out.txt\"", "viewsWelcome.debug.contents": "[Generuj zasoby języka C# na potrzeby kompilacji i debugowania](polecenie:dotnet.generateAssets)\r\n\r\nAby dowiedzieć się więcej o uruchamianiu pliku launch.json, zobacz [Konfigurowanie pliku launch.json na potrzeby debugowania w języku C#](https://aka.ms/VSCode-CS-LaunchJson)." diff --git a/package.nls.pt-br.json b/package.nls.pt-br.json index 432889085..cdf2bce62 100644 --- a/package.nls.pt-br.json +++ b/package.nls.pt-br.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": "Anexar a um processo .NET 5+ ou .NET Core", + "command.csharp.downloadDebugger": "Baixar o Depurador .NET Core", + "command.csharp.listProcess": "Listar processo para anexar", + "command.csharp.listRemoteDockerProcess": "Listar processos na conexão Docker", + "command.csharp.listRemoteProcess": "Listar processos em conexão remota para anexar", + "command.csharp.reportIssue": "Relatar um problema", + "command.csharp.showDecompilationTerms": "Mostrar o contrato de termos do descompilador", + "command.dotnet.generateAssets.currentProject": "Gerar Ativos para Compilação e Depuração", + "command.dotnet.openSolution": "Abrir Solução", + "command.dotnet.restartServer": "Reiniciar o Servidor de Linguagem", + "command.dotnet.restore.all": "Restaurar Todos os Projetos", + "command.dotnet.restore.project": "Restaurar Projeto", + "command.dotnet.test.debugTestsInContext": "Testes de Depuração no Contexto", + "command.dotnet.test.runTestsInContext": "Executar Testes no Contexto", + "command.extension.showRazorCSharpWindow": "Mostrar Navalha CSharp", + "command.extension.showRazorHtmlWindow": "Mostrar Razor HTML", + "command.o.fixAll.document": "Corrigir todas as ocorrências de um problema de código no documento", + "command.o.fixAll.project": "Corrigir todas as ocorrências de um problema de código no projeto", + "command.o.fixAll.solution": "Corrigir todas as ocorrências de um problema de código na solução", + "command.o.pickProjectAndStart": "Selecionar Projeto", + "command.o.reanalyze.allProjects": "Analisar todos os projetos", + "command.o.reanalyze.currentProject": "Analisar o projeto atual", + "command.o.restart": "Reiniciar OmniSharp", + "command.razor.reportIssue": "Relatar um problema do Razor", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "Mostrar dicas para a criação de objeto implícito", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "Mostrar as dicas para as variáveis com tipos inferidos", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "Mostrar dicas para indexadores", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "Mostrar as dicas para os tipos de parâmetro lambda", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "Exibir as dicas embutidas de tipo", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Executar análise de código em segundo plano para:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Execute a análise de código em segundo plano para: (Anteriormente `omnisharp.enableRoslynAnalyzers`)", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "Solução inteira", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "Nenhum", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "Abrir documentos", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "Solução inteira", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "Nenhum", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "Abrir documentos", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "Especifica se as referências do CodeLens devem ser mostradas.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "Especifica se a execução do CodeLens e o teste de depuração devem ser mostrados.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "Especifica se as referências CodeLens devem ser mostradas. (Anteriormente `csharp.referencesCodeLens.enabled`)", + "configuration.dotnet.codeLens.enableTestsCodeLens": "Especifica se o teste de execução e depuração CodeLens deve ser mostrado. (Anteriormente `csharp.testsCodeLens.enabled`)", "configuration.dotnet.completion.provideRegexCompletions": "Mostrar expressões regulares na lista de conclusão.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Habilita o suporte para mostrar tipos não importados e métodos de extensão não importados em listas de conclusão. Quando confirmada, a diretiva using apropriada será adicionada no topo do arquivo atual.", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Habilita o suporte para mostrar tipos e métodos de extensão não importados em listas de conclusão. Quando confirmado, a diretiva using apropriada será adicionada no topo do arquivo atual. (Anteriormente `omnisharp.enableImportCompletion`)", "configuration.dotnet.completion.showNameCompletionSuggestions": "Execute a conclusão automática do nome do objeto para os membros que você selecionou recentemente.", - "configuration.dotnet.defaultSolution.description": "O caminho da solução padrão a ser aberto no workspace ou definido como 'desabilitar' para ignorá-lo.", + "configuration.dotnet.defaultSolution.description": "O caminho da solução padrão a ser aberta no workspace ou definido como 'desabilitado' para ignorá-la. (Anteriormente `omnisharp.defaultLaunchSolution`)", "configuration.dotnet.dotnetPath": "Especifica o caminho para um diretório de instalação dotnet a ser usado em vez do sistema padrão. Isso influencia apenas a instalação do dotnet a ser usada para hospedar o próprio servidor de idiomas. Exemplo: \"/home/username/mycustomdotnetdirectory\".", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "Destaque os componentes JSON relacionados sob o cursor.", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "Destaque os componentes de expressão regular relacionados sob o cursor.", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "Suprimir as dicas quando o argumento corresponder ao nome do parâmetro", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "Suprimir as dicas quando o nome do parâmetro corresponder à intenção do método", "configuration.dotnet.navigation.navigateToDecompiledSources": "Habilite a navegação para fontes não compatíveis.", + "configuration.dotnet.preferCSharpExtension": "Força o carregamento dos projetos somente com a extensão C#. Isso pode ser útil ao usar tipos de projetos herdados que não são suportados pelo C# Dev Kit. (Requer recarga da janela)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "Mostrar informações de comentários ao exibir o símbolo.", + "configuration.dotnet.server.crashDumpPath": "Define um caminho de pasta onde os despejos de memória serão gravados se o servidor de idioma travar. Deve ser gravável pelo usuário.", "configuration.dotnet.server.extensionPaths": "Substituir o caminho para os argumentos --extension do servidor de idiomas", - "configuration.dotnet.server.path": "Especifica o caminho absoluto para o executável do servidor (LSP ou O#). Quando deixado em branco, a versão fixada na extensão C# é usada.", + "configuration.dotnet.server.path": "Especifica o caminho absoluto para o executável do servidor (LSP ou O#). Quando deixado em branco, a versão fixada na extensão C# é usada. (Anteriormente `omnisharp.path`)", + "configuration.dotnet.server.startTimeout": "Especifica um tempo limite (em ms) para o cliente iniciar e conectar-se com êxito ao servidor de idioma.", "configuration.dotnet.server.trace": "Define o nível de log para o servidor de idiomas", - "configuration.dotnet.server.waitForDebugger": "Passa o sinalizador --debug ao iniciar o servidor para permitir que um depurador seja anexado.", + "configuration.dotnet.server.waitForDebugger": "Passa o sinalizador --debug ao iniciar o servidor para permitir que um depurador seja anexado. (Anteriormente `omnisharp.waitForDebugger`)", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "Pesquisar símbolos em montagens de referência. Afeta os recursos que exigem pesquisa de símbolos, como adicionar importações.", - "configuration.dotnet.unitTestDebuggingOptions": "Opções a serem usadas com o depurador ao iniciar a depuração de teste de unidade.", + "configuration.dotnet.unitTestDebuggingOptions": "Opções a serem usadas com o depurador ao iniciar a depuração de teste de unidade. (Anteriormente `csharp.unitTestDebuggingOptions`)", "configuration.razor.languageServer.debug": "Especifica se é preciso aguardar o anexo de depuração ao iniciar o servidor de linguagem.", "configuration.razor.languageServer.directory": "Substitui o caminho para o diretório do Servidor de Linguagem Razor.", "configuration.razor.trace": "Especifica se devem ser enviadas todas [Verbose], algumas [Mensagens] ou nenhuma [Desativado] mensagem.", "configuration.razor.trace.messages": "Registra apenas algumas mensagens da extensão do Razor", "configuration.razor.trace.off": "Não registra as mensagens da extensão do Razor", "configuration.razor.trace.verbose": "Registra todas as mensagens da extensão do Razor", + "debuggers.coreclr.configurationSnippets.description.attach": "Anexe o depurador do .NET (coreclr) a um processo em execução. Isso também pode ser feito usando o comando 'Anexar a um processo do .NET 5+ ou do .NET Core'.", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "Esse snippet é usado para iniciar um novo processo no depurador Blazor WebAssembly (blazorwasm), especificando o caminho para o executável a ser iniciado. Na maioria dos casos, o \".NET: O snippet de inicialização do projeto C# é uma opção melhor, mas esse snippet pode ser usado para ter controle total sobre todas as opções de inicialização. Esse snippet é para projetos hospedados do Blazor, que é um projeto que tem um aplicativo ASP.NET Core de back-end para atender aos seus arquivos.", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "Esse snippet é usado para iniciar um novo processo no depurador Blazor WebAssembly (blazorwasm). Na maioria dos casos, o \".NET: O snippet de inicialização do projeto C# é uma opção melhor, mas esse snippet pode ser usado para ter controle total sobre todas as opções de inicialização. Esse snippet é para projetos autônomos do Blazor, que é um projeto que não tem um aplicativo ASP.NET Core de back-end para atender aos seus arquivos.", + "debuggers.coreclr.configurationSnippets.description.console-local": "Esse snippet é usado para iniciar um novo processo no depurador do .NET (coreclr), especificando o caminho para o executável a ser iniciado. Na maioria dos casos, o \".NET: O snippet de inicialização do projeto C# é uma opção melhor. Esse snippet é útil quando o projeto foi criado fora dessa instância do VS Code ou você deseja hospedar o código .NET em um executável personalizado, como uma versão específica de 'dotnet.exe'/'dotnet' ou o .NET Code é hospedado por um aplicativo nativo. Este snippet é para aplicativos de console.", + "debuggers.coreclr.configurationSnippets.description.remote": "Este snippet mostra como depurar remotamente o código .NET **sem** usar a comunicação remota do VS Code. Ele deve ser usado nos casos em que você deseja compilar seu projeto localmente, mas o executa em outro computador.", + "debuggers.coreclr.configurationSnippets.description.web-local": "Esse snippet é usado para iniciar um novo processo no depurador do .NET (coreclr), especificando o caminho para o executável a ser iniciado. Na maioria dos casos, o \".NET: O snippet de inicialização do projeto C# é uma opção melhor. Esse snippet é útil quando o projeto foi criado fora dessa instância do VS Code ou você deseja hospedar o código .NET em um executável personalizado, como uma versão específica de 'dotnet.exe'/'dotnet' ou o .NET Code é hospedado por um aplicativo nativo. Este snippet é para aplicativos Web (ASP.NET Core).", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: Anexar a um processo do .NET", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: Depuração remota - Anexar a um processo do .NET", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Web Assembly - Iniciar projeto Blazor hospedado", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Web Assembly – Iniciar projeto autônomo do Blazor", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Iniciar Arquivo executável (Console)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: Depuração remota - Iniciar Arquivo executável (console)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Iniciar Arquivo executável (Web)", + "debuggers.dotnet.configurationSnippets.description": "Este snippet configura VS Code para depurar um projeto C#. As opções de depuração (exemplo: argumentos para o executável) podem ser configuradas por meio do arquivo '/Properties/launchSettings.json'.", + "debuggers.dotnet.configurationSnippets.label": ".NET: Iniciar projeto C#", "debuggers.dotnet.launch.launchConfigurationId.description": "A ID de configuração de inicialização a ser usada. A cadeia de caracteres vazia usará a configuração ativa atual.", "debuggers.dotnet.launch.projectPath.description": "Caminho para o arquivo .csproj.", "generateOptionsSchema.allowFastEvaluate.description": "Quando verdadeiro (o estado padrão), o depurador tentará uma avaliação mais rápida simulando a execução de propriedades e métodos simples.", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "Se especificado, indica o nome do perfil em launchSettings.json a ser usado. Isso será ignorado se launchSettings.json não for encontrado. launchSettings.json será lido a partir do caminho especificado deve ser a propriedade 'launchSettingsFilePath' ou {cwd}/Properties/launchSettings.json se isso não estiver definido. Se for definido como null ou uma cadeia de caracteres vazia, launchSettings.json será ignorado. Se este valor não for especificado, o primeiro perfil 'Projeto' será usado.", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "Sinalize para determinar se o texto stdout da inicialização do navegador da Web deve ser registrado na janela de saída. Esta opção é padronizada como `true`.", "generateOptionsSchema.logging.description": "Sinalizadores para determinar quais tipos de mensagens devem ser registrados na janela de saída.", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Se verdadeiro, o registro do mecanismo incluirá as propriedades `adapterElapsedTime` e `engineElapsedTime` para indicar a quantidade de tempo, em microssegundos, que uma solicitação levou. Esta opção padrão é `false`.", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "Sinalize para determinar se os logs do mecanismo de diagnóstico devem ser registrados na janela de saída. Esta opção padrão é `false`.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "Imprima todas as chamadas à API do depurador. Isso é muito detalhado.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "Falhas de impressão de chamadas à API do depurador.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Controla se as chamadas de API para Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h devem ser impressas na janela de saída. Essa opção tem como padrão `none`.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "Desabilitar chamadas de API de rastreamento", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "Sinalizador para determinar se o rastreamento detalhado para eventos gerados pelo tempo de execução subjacente deve ser habilitado. Essa opção tem como padrão `false`.", + "generateOptionsSchema.logging.diagnosticsLog.description": "Configurações para controlar quais mensagens são impressas na janela de saída do log de diagnóstico do depurador. Esse log destina-se a ajudar a solucionar problemas com o depurador.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "Imprima mensagens de diagnóstico em nível de erro.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "Imprima mensagens de diagnóstico importantes.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "Controla quais mensagens são impressas na janela de saída do despachante do depurador. Se não for especificado, o padrão será `none`, a menos que uma das configurações de log detalhado esteja habilitada (`debugEngineAPITracing`, `debugRuntimeEventTracing`, `expressionEvaluationTracing` ou `startDebuggingTracing`), caso em que o padrão muda para `normal`.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "Não imprima mensagens de diagnóstico adicionais.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "Imprima todas as mensagens de diagnóstico não detalhadas.", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "Sinalizador para determinar se o rastreamento detalhado para avaliação de expressão deve ser habilitado. Essa opção tem como padrão `false`.", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "Sinalizador para determinar se as mensagens do protocolo DAP trocadas entre o depurador C# e a interface do usuário devem ser registradas na janela de saída. Essa opção tem como padrão `false`.", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "Sinalizador para determinar se o rastreamento detalhado para iniciar a depuração deve ser habilitado. Essa opção tem como padrão `false`.", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Se for verdade, o log de mensagens de protocolo incluirá as propriedades `adapterElapsedTime` e `engineElapsedTime` para indicar a quantidade de tempo, em microssegundos, que uma solicitação levou. Essa opção tem como padrão `false`.", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "A configuração 'logging.engineLogging' foi descontinuada em favor de 'logging.diagnosticsLog.protocolMessages'.", "generateOptionsSchema.logging.exceptions.markdownDescription": "Sinalize para determinar se as mensagens de exceção devem ser registradas na janela de saída. Esta opção é padronizada como `true`.", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "Sinalizador para determinar se os eventos de carregamento do módulo devem ser registrados na janela de saída. Esta opção é padronizada como `true`.", "generateOptionsSchema.logging.processExit.markdownDescription": "Controla se uma mensagem é registrada quando o processo de destino sai ou a depuração é interrompida. Esta opção é padronizada como `true`.", @@ -137,8 +193,8 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadAllButExcluded.enumDescription": "Carregue símbolos para todos os módulos, a menos que o módulo esteja na matriz 'excludedModules'.", "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "Não tente carregar símbolos para o módulo ANY, a menos que ele esteja na matriz 'includedModules' ou seja incluído por meio da configuração 'includeSymbolsNextToModules'.", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "Se for 'true', o servidor de Símbolos da Microsoft (https​://msdl.microsoft.com​/download/symbols) será adicionado ao caminho de pesquisa de símbolos. Se não for especificado, essa opção usará como padrão 'false'.", - "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Se 'true', o servidor de símbolos NuGet.org (https://symbols.nuget.org/download/symbols) é adicionado ao caminho de pesquisa de símbolos. Se não for especificado, esta opção assume como padrão 'false'.", - "generateOptionsSchema.symbolOptions.searchPaths.description": "Matriz de URLs do servidor de símbolos (exemplo: http​://MyExampleSymbolServer) ou diretórios (exemplo: /build/symbols) para pesquisar arquivos .pdb. Esses diretórios serão pesquisados além dos locais padrão, ao lado do módulo e do caminho em que o pdb foi removido originalmente.", + "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Se 'true', o servidor de símbolos NuGet.org (https​://symbols.nuget.org​/download/symbols) é adicionado ao caminho de pesquisa de símbolos. Se não for especificado, esta opção assume como padrão 'false'.", + "generateOptionsSchema.symbolOptions.searchPaths.description": "Matriz de URLs de servidores de símbolos (exemplo: http​://MyExampleSymbolServer) ou diretórios (exemplo: /build/symbols) para procurar arquivos .pdb. Esses diretórios serão pesquisados além dos locais padrão -- próximos ao módulo e ao caminho onde o pdb foi originalmente descartado.", "generateOptionsSchema.targetArchitecture.markdownDescription": "[Com suporte apenas na depuração local do macOS]\r\n\r\nA arquitetura do depurado. Isso será detectado automaticamente, a menos que esse parâmetro seja definido. Os valores permitidos são `x86_64` ou `arm64`.", "generateOptionsSchema.targetOutputLogPath.description": "Quando definido, o texto que o aplicativo de destino grava em stdout e stderr (ex: Console.WriteLine) será salvo no arquivo especificado. Essa opção será ignorada se o console for definido como algo diferente de internalConsole. Por exemplo. '${workspaceFolder}/out.txt'", "viewsWelcome.debug.contents": "[Gerar ativos C# para Build e Depuração](command:dotnet.generateAssets)\r\n\r\nPara saber mais sobre launch.json, consulte [Como configurar launch.json para depuração C#](https://aka.ms/VSCode-CS-LaunchJson)." diff --git a/package.nls.ru.json b/package.nls.ru.json index b9af60bc7..8fa06e8a7 100644 --- a/package.nls.ru.json +++ b/package.nls.ru.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": "Присоединение к процессу .NET 5+ или .NET Core.", + "command.csharp.downloadDebugger": "Скачать отладчик .NET Core", + "command.csharp.listProcess": "Перечислить процесс для вложения", + "command.csharp.listRemoteDockerProcess": "Список процессов подключения к Docker", + "command.csharp.listRemoteProcess": "Список процессов при удаленном подключении для вложения", + "command.csharp.reportIssue": "Сообщить о проблеме", + "command.csharp.showDecompilationTerms": "Показать соглашение об условиях декомпиляции", + "command.dotnet.generateAssets.currentProject": "Создание ресурсов для сборки и отладки", + "command.dotnet.openSolution": "Открыть решение", + "command.dotnet.restartServer": "Перезапустить языковой сервер", + "command.dotnet.restore.all": "Восстановить все проекты", + "command.dotnet.restore.project": "Восстановить проект", + "command.dotnet.test.debugTestsInContext": "Отладочные тесты в контексте", + "command.dotnet.test.runTestsInContext": "Выполнить тесты в контексте", + "command.extension.showRazorCSharpWindow": "Показать CSharp Razor", + "command.extension.showRazorHtmlWindow": "Показать HTML Razor", + "command.o.fixAll.document": "Исправить все случаи возникновения проблем с кодом в документе.", + "command.o.fixAll.project": "Исправление всех случаев возникновения проблем с кодом в проекте.", + "command.o.fixAll.solution": "Исправить все случаи возникновения проблем с кодом в решении.", + "command.o.pickProjectAndStart": "Выбор проекта", + "command.o.reanalyze.allProjects": "Анализ всех проектов", + "command.o.reanalyze.currentProject": "Анализ текущего проекта", + "command.o.restart": "Перезапустить OmniSharp", + "command.razor.reportIssue": "Сообщить о проблеме Razor", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "Показать указания для неявного создания объекта", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "Отображать подсказки для переменных с выводимыми типами", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "Отображать подсказки для индексаторов", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "Отображать подсказки для типов лямбда-параметров", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "Отображать подсказки для встроенных типов", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Выполнить анализ кода в фоновом режиме для:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Выполнить анализ кода в фоновом режиме для: (ранее — \"omnisharp.enableRoslynAnalyzers\")", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "Все решение", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "Нет", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "Открыть документы", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "Все решение", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "Нет", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "Открыть документы", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "Указывает, следует ли отображать CodeLens ссылок.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "Указывает, следует ли отображать CodeLens тестового запуска и отладки.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "Указывает, следует ли отображать CodeLens ссылок. (Ранее — \"csharp.referencesCodeLens.enabled\")", + "configuration.dotnet.codeLens.enableTestsCodeLens": "Указывает, следует ли отображать CodeLens тестового запуска и отладки. (Ранее — \"csharp.testsCodeLens.enabled\")", "configuration.dotnet.completion.provideRegexCompletions": "Отображение регулярных выражений в списке завершения.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Включает поддержку отображения неимпортированных типов и неимпортированных методов расширения в списках завершения. При фиксации соответствующая директива использования будет добавлена в начало текущего файла.", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Включает поддержку отображения неимпортированных типов и неимпортированных методов расширения в списках завершения. При фиксации соответствующая директива использования будет добавлена в начало текущего файла. (Ранее — \"omnisharp.enableImportCompletion\")", "configuration.dotnet.completion.showNameCompletionSuggestions": "Выполните автоматическое завершение имен объектов для выбранных элементов.", - "configuration.dotnet.defaultSolution.description": "Путь к решению по умолчанию, которое будет открыто в рабочей области. Или задайте значение \"Отключить\", чтобы пропустить его.", + "configuration.dotnet.defaultSolution.description": "Путь к решению по умолчанию, которое будет открыто в рабочей области. Или задайте значение \"Отключить\", чтобы пропустить его. (Ранее — \"omnisharp.defaultLaunchSolution\")", "configuration.dotnet.dotnetPath": "Указывает путь к каталогу установки dotnet для использования вместо стандартного системного каталога. Это влияет только на установку dotnet, используемую для размещения самого языкового сервера. Пример: \"/home/username/mycustomdotnetdirectory\".", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "Выделить связанные компоненты JSON под курсором.", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "Выделение связанных компонентов регулярных выражений под курсором.", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "Скрывать подсказки, когда аргумент соответствует имени параметра", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "Скрывать подсказки, если имя параметра соответствует намерению метода.", "configuration.dotnet.navigation.navigateToDecompiledSources": "Включить переход к декомпилированным источникам.", + "configuration.dotnet.preferCSharpExtension": "Принудительно загружает проекты только с расширением C#. Это может быть полезно при использовании устаревших типов проектов, которые не поддерживаются C# Dev Kit. (Требуется перезагрузка окна)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "Показывать примечания при отображении символа.", + "configuration.dotnet.server.crashDumpPath": "Задает путь к папке, в которую записываются аварийные дампы в случае сбоя языкового сервера. Должен быть доступен для записи пользователем.", "configuration.dotnet.server.extensionPaths": "Переопределить путь к аргументам --extension сервера языка", - "configuration.dotnet.server.path": "Указывает абсолютный путь к исполняемому файлу сервера (LSP или O#). Если оставить поле пустым, используется версия, закрепленная в расширении C#.", + "configuration.dotnet.server.path": "Указывает абсолютный путь к исполняемому файлу сервера (LSP или O#). Если оставить поле пустым, используется версия, закрепленная в расширении C#. (Ранее — \"omnisharp.path\")", + "configuration.dotnet.server.startTimeout": "Указывает время ожидания (в миллисекундах) для запуска клиента и его подключения к языковому серверу.", "configuration.dotnet.server.trace": "Задает уровень ведения журнала для языкового сервера", - "configuration.dotnet.server.waitForDebugger": "Передает флаг --debug при запуске сервера, чтобы разрешить подключение отладчика.", + "configuration.dotnet.server.waitForDebugger": "Передает флаг --debug при запуске сервера, чтобы разрешить подключение отладчика. (Ранее — \"omnisharp.waitForDebugger\")", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "Поиск символов в эталонных сборках. Он влияет на функции, для которых требуется поиск символов, например добавление импортов.", - "configuration.dotnet.unitTestDebuggingOptions": "Параметры, которые используются с отладчиком при запуске для отладки модульных тестов.", + "configuration.dotnet.unitTestDebuggingOptions": "Параметры, которые используются с отладчиком при запуске для отладки модульных тестов. (Ранее — \"csharp.unitTestDebuggingOptions\")", "configuration.razor.languageServer.debug": "Указывает, следует ли ожидать подключения отладки при запуске языкового сервера.", "configuration.razor.languageServer.directory": "Переопределяет путь к каталогу языкового сервера Razor.", "configuration.razor.trace": "Указывает, сколько сообщений выводить: все [Verbose], несколько [Messages] или ни одного [Off].", "configuration.razor.trace.messages": "Регистрирует лишь некоторые сообщения из расширения Razor", "configuration.razor.trace.off": "Не регистрирует сообщения из расширения Razor", "configuration.razor.trace.verbose": "Регистрирует все сообщения из расширения Razor", + "debuggers.coreclr.configurationSnippets.description.attach": "Присоедините отладчик .NET (coreclr) к запущенному процессу. Это также можно сделать с помощью команды \"Присоединение к процессу .NET 5+ или .NET Core\".", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "Этот фрагмент кода используется для запуска нового процесса в отладчике Blazor WebAssembly (blazorwasm), указывая путь к исполняемому файлу для запуска. В большинстве случаев фрагмент кода \".NET: запуск проекта C#\" является более оптимальным вариантом, но этот фрагмент можно использовать для полного управления всеми параметрами запуска. Этот фрагмент кода предназначен для размещенных проектов Blazor, которые используют серверное приложение ASP.NET Core для обработки своих файлов.", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "Этот фрагмент кода используется для запуска нового процесса в отладчике Blazor WebAssembly (blazorwasm). В большинстве случаев фрагмент кода \".NET: запуск проекта C#\" является более оптимальным вариантом, но этот фрагмент можно использовать для полного управления всеми параметрами запуска. Этот фрагмент кода предназначен для автономных проектов Blazor, у которых нет серверного приложения ASP.NET Core для обработки своих файлов.", + "debuggers.coreclr.configurationSnippets.description.console-local": "Этот фрагмент кода используется для запуска нового процесса в отладчике .NET (coreclr), указывая путь к исполняемому файлу для запуска. В большинстве случаев фрагмент кода \".NET: запуск проекта C#\" является более оптимальным вариантом. Этот фрагмент кода удобен, если проект был создан за пределами этого экземпляра VS Code или вы хотите разместить свой экземпляр .NET Code в пользовательском исполняемом файле, например в определенной версии \"dotnet.exe\"/\"dotnet\" или в экземпляре .NET Code, размещенном в собственном приложении. Этот фрагмент кода используется для консольных приложений.", + "debuggers.coreclr.configurationSnippets.description.remote": "В этом фрагменте кода показано, как удаленно отладить код .NET **без** использования удаленного сеанса VS Code. Его следует использовать в случаях, когда сборку проекта требуется выполнить локально, но при этом запустить его на другом компьютере.", + "debuggers.coreclr.configurationSnippets.description.web-local": "Этот фрагмент кода используется для запуска нового процесса в отладчике .NET (coreclr), указывая путь к исполняемому файлу для запуска. В большинстве случаев фрагмент кода \".NET: запуск проекта C#\" является более оптимальным вариантом. Этот фрагмент кода удобен, если проект был создан за пределами этого экземпляра VS Code или вы хотите разместить свой экземпляр .NET Code в пользовательском исполняемом файле, например в определенной версии \"dotnet.exe\"/\"dotnet\" или в экземпляре .NET Code, размещенном в собственном приложении. Этот фрагмент кода предназначен для веб-приложений (ASP.NET Core).", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: присоединение к процессу .NET", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: удаленная отладка — присоединение к процессу .NET", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: веб-сборка — запуск размещенного проекта Blazor", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: веб-сборка — запуск автономного проекта Blazor", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: запуск исполняемого файла (консоль)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: удаленная отладка — запуск исполняемого файла (консоль)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: запуск исполняемого файла (Интернет)", + "debuggers.dotnet.configurationSnippets.description": "Этот фрагмент кода настраивает VS Code для отладки проекта C#. Параметры отладки (например, аргументы для исполняемого файла) можно настроить с помощью файла \"/Properties/launchSettings.json\".", + "debuggers.dotnet.configurationSnippets.label": ".NET: запуск проекта C#", "debuggers.dotnet.launch.launchConfigurationId.description": "Используемый идентификатор конфигурации запуска. Если оставить эту строку пустой, будет использоваться текущая активная конфигурация.", "debuggers.dotnet.launch.projectPath.description": "Путь к файлу .csproj.", "generateOptionsSchema.allowFastEvaluate.description": "Если присвоено значение true (состояние по умолчанию), отладчик попытается ускорить оценку, имитируя выполнение простых свойств и методов.", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "Если задано, указывает используемое имя профиля в файле launchSettings.json. Этот параметр игнорируется, если файл launchSettings.json не найден. Файл launchSettings.json будет считываться по пути, указанному свойством launchSettingsFilePath или {cwd}/Properties/launchSettings.json, если это не настроено. Если для этого параметра настроено значение NULL или пустая строка, launchSettings.json игнорируется. Если это значение не указано, будет использоваться первый профиль \"Project\".", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "Флаг, определяющий, следует ли регистрировать в окне вывода текст stdout из запуска веб-браузера. По умолчанию этот параметр принимает значение true.", "generateOptionsSchema.logging.description": "Флаги для определения типов сообщений, регистрируемых в окне вывода.", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Если применяется значение true, журнал обработчика включает свойства adapterElapsedTime и engineElapsedTime, чтобы указать время (в микросекундах), затраченное на выполнение запроса. По умолчанию этот параметр принимает значение true.", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "Флаг, определяющий, следует ли регистрировать журналы модуля диагностики в окне вывода. По умолчанию этот параметр принимает значение false.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "Печать всех вызовов API отладчика. Это очень подробно.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "Печать ошибок из вызовов API отладчика.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Определяет, должны ли вызовы API Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h выводиться в окно вывода. По умолчанию этот параметр принимает значение\"none\".", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "Отключить трассировку вызовов API", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "Флажок, определяющий, следует ли включать подробную трассировку событий, вызываемых базовой средой выполнения. По умолчанию этот параметр принимает значение ИСТИНА.", + "generateOptionsSchema.logging.diagnosticsLog.description": "Параметры для управления тем, какие сообщения выводятся в окно вывода из журнала диагностики отладчика. Этот журнал предназначен для помощи в устранении проблем с отладчиком.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "Печать диагностических сообщений на уровне ошибок.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "Печатать важные диагностические сообщения.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "Управляет тем, какие сообщения выводятся в окно вывода из диспетчера отладчика. Если не указано, по умолчанию будет установлено значение \"none\", если не включена одна из настроек подробного журнала (\"debugEngineAPITracing\", \"debugRuntimeEventTracing\", \"expressionEvaluationTracing\" или \"startDebuggingTracing\"), и в этом случае значение по умолчанию меняется на \"normal\".", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "Не печатать дополнительные диагностические сообщения.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "Печать всех не подробных диагностических сообщений.", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "Флажок, определяющий, следует ли включать подробную трассировку для оценки выражений. По умолчанию этот параметр принимает значение ИСТИНА.", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "Флажок, определяющий, следует ли записывать в окно вывода сообщения протокола DAP, которыми обмениваются отладчик C# и пользовательский интерфейс. По умолчанию этот параметр принимает значение ИСТИНА.", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "Флажок, определяющий, следует ли включать подробную трассировку для начала отладки. По умолчанию этот параметр принимает значение ИСТИНА.", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Если применяется значение ИСТИНА, ведение журнала протокола будет включать свойства \"adapterElapsedTime\" и \"engineElapsedTime\", чтобы указать время (в микросекундах), затраченное на выполнение запроса. По умолчанию этот параметр принимает значение ИСТИНА.", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "Параметр \"logging.engineLogging\" является нерекомендуемым в пользу \"logging.diagnosticsLog.protocolMessages\".", "generateOptionsSchema.logging.exceptions.markdownDescription": "Флаг, определяющий, следует ли регистрировать сообщения об исключениях в окне вывода. По умолчанию этот параметр принимает значение true.", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "Флаг, определяющий, следует ли регистрировать события загрузки модуля в окне вывода. По умолчанию этот параметр принимает значение true.", "generateOptionsSchema.logging.processExit.markdownDescription": "Управляет тем, регистрируется ли сообщение при завершении целевого процесса или остановке отладки. По умолчанию этот параметр принимает значение true.", @@ -138,7 +194,7 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "Не пытайтесь загрузить символы для ЛЮБОГО модуля, если он не находится в массиве \"includedModules\", или он включен с помощью параметра \"includeSymbolsNextToModules\".", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "Если значение равно \"true\", сервер символов (Майкрософт) (https​://msdl.microsoft.com​/download/symbols) добавляется к пути поиска символов. Если этот параметр не задан, по умолчанию используется значение \"false\".", "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "Если применяется значение true, сервер символов NuGet.org (https​://symbols.nuget.org​/download/symbols) добавляется к пути поиска символов. Если этот параметр не настроен, по умолчанию используется значение false.", - "generateOptionsSchema.symbolOptions.searchPaths.description": "Массив URL-адресов сервера символов (например, http​://MyExampleSymbolServer) или каталогов (например: /build/symbols) для поиска PDB-файлов. Поиск в этих каталогах осуществляется в дополнение к расположениям по умолчанию — рядом с модулем и путем первоначального удаления PDB-файла.", + "generateOptionsSchema.symbolOptions.searchPaths.description": "Массив из URL-адресов сервера символов (example: http​://MyExampleSymbolServer) или каталогов (example: /build/symbols) для поиска PDB-файлов. Поиск будет выполняться в этих каталогах, помимо расположений по умолчанию (расположение рядом с модулем, а также путь, по которому изначально был обнаружен PDB-файл).", "generateOptionsSchema.targetArchitecture.markdownDescription": "[Поддерживается только в локальной отладке macOS]\r\n\r\nАрхитектура отлаживаемого объекта. Будет определяться автоматически, если этот параметр не задан. Допустимые значения: \"x86_64\" или \"arm64\".", "generateOptionsSchema.targetOutputLogPath.description": "Если этот параметр настроен, текст, который целевое приложение записывает в stdout и stderr (например, Console.WriteLine), будет сохранен в указанном файле. Этот параметр игнорируется, если для консоли настроено значение, отличное от internalConsole. Например, \"${workspaceFolder}/out.txt\"", "viewsWelcome.debug.contents": "[Создание ресурсов C# для сборки и отладки](command:dotnet.generateAssets)\r\n\r\nДополнительные сведения о launch.json см. в разделе [Настройка launch.json для отладки C#](https://aka.ms/VSCode-CS-LaunchJson)." diff --git a/package.nls.tr.json b/package.nls.tr.json index 6b02ddfd6..31c091cc6 100644 --- a/package.nls.tr.json +++ b/package.nls.tr.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": ".NET 5+ veya .NET Core işlemine ekleme", + "command.csharp.downloadDebugger": ".NET Core Hata Ayıklayıcısını İndirin", + "command.csharp.listProcess": "Ekleme işlemini listele", + "command.csharp.listRemoteDockerProcess": "Docker bağlantısındaki işlemleri listeleme", + "command.csharp.listRemoteProcess": "Eklemek için uzak bağlantıdaki işlemleri listeleyin", + "command.csharp.reportIssue": "Bir sorun bildirin", + "command.csharp.showDecompilationTerms": "Derleyici koşulları sözleşmesini göster", + "command.dotnet.generateAssets.currentProject": "Derleme ve Hata Ayıklama için Varlıklar Oluşturun", + "command.dotnet.openSolution": "Çözümü Aç", + "command.dotnet.restartServer": "Dil Sunucusunu Yeniden Başlat", + "command.dotnet.restore.all": "Tüm Projeleri Geri Yükleyin", + "command.dotnet.restore.project": "Projeyi Geri Yükle", + "command.dotnet.test.debugTestsInContext": "Bağlamda Hata Ayıklama Testleri", + "command.dotnet.test.runTestsInContext": "Testleri Bağlamda Çalıştırın", + "command.extension.showRazorCSharpWindow": "Razor CSharp'ı göster", + "command.extension.showRazorHtmlWindow": "Razor HTML'sini göster", + "command.o.fixAll.document": "Belgedeki kod sorununun tüm oluşumlarını düzeltin", + "command.o.fixAll.project": "Proje içindeki kod sorununun tüm oluşumlarını düzeltin", + "command.o.fixAll.solution": "Çözüm içindeki bir kod sorununun tüm oluşumlarını düzeltin", + "command.o.pickProjectAndStart": "Proje Seç", + "command.o.reanalyze.allProjects": "Tüm projeleri çözümleyin", + "command.o.reanalyze.currentProject": "Geçerli projeyi çözümle", + "command.o.restart": "OmniSharp'ı yeniden başlatın", + "command.razor.reportIssue": "Razor sorunu bildirin", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "Örtük nesne oluşturma ipuçlarını göster", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "Çıkarsanan türlere sahip değişkenler için ipuçlarını göster", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "Dizin oluşturucular için ipuçlarını göster", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "Lambda parametre türleri için ipuçlarını göster", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "Satır içi tür ipuçlarını göster", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Şunlar için arka plan kod analizini çalıştır:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "Şunun için arka plan kodu analizini çalıştırın: (Daha önce `omnisharp.enableRoslynAnalyzers`)", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "Tüm çözüm", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "Yok", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "Açık belgeler", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "Tüm çözüm", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "Yok", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "Açık belgeler", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "CodeLens başvurularının gösterilip gösterilmeyeceğini belirtir.", - "configuration.dotnet.codeLens.enableTestsCodeLens": "CodeLens testini çalıştırma ve hata ayıklamanın gösterilip gösterilmeyeceğini belirtir.", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "CodeLens referanslarının gösterilip gösterilmeyeceğini belirtir. (Daha önce 'csharp.referencesCodeLens.enabled'dı)", + "configuration.dotnet.codeLens.enableTestsCodeLens": "CodeLens çalıştırma ve hata ayıklama testinin gösterilip gösterilmeyeceğini belirtir. (Daha önce 'csharp.testsCodeLens.enabled'dı)", "configuration.dotnet.completion.provideRegexCompletions": "Tamamlama listesinde normal ifadeleri göster.", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Tamamlanma listelerinde, aktarlanmamış türleri ve aktarlanmamış uzantı yöntemlerini gösterme desteği sağlar. İşlendiğinde, uygun using yönergesi geçerli dosyanın en üstüne eklenir.", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "Tamamlanma listelerinde içe aktarılmamış türleri ve içe aktarılmamış uzantı yöntemlerini göstermeye yönelik desteği etkinleştirir. Taahhüt edildiğinde, uygun kullanım yönergesi geçerli dosyanın en üstüne eklenecektir. (Önceden 'omnisharp.enableImportCompletion')", "configuration.dotnet.completion.showNameCompletionSuggestions": "Yakın zamanda seçtiğiniz üyeler için otomatik nesne adı tamamlama gerçekleştirin.", - "configuration.dotnet.defaultSolution.description": "Çalışma alanında açılacak varsayılan çözümün yolu. Bunu atlamak için ‘Devre dışı bırak’ olarak ayarlayın.", + "configuration.dotnet.defaultSolution.description": "Varsayılan çözümün yolu, çalışma alanında açılacak veya atlamak için 'devre dışı' olarak ayarlanacak. (Daha önce 'omnisharp.defaultLaunchSolution')", "configuration.dotnet.dotnetPath": "Varsayılan sistem dizini yerine kullanılacak bir dotnet kurulum dizininin yolunu belirtir. Bu, yalnızca dil sunucusunun kendisini barındırmak için kullanılacak dotnet kurulumunu etkiler. Örnek: \"/home/username/mycustomdotnetdirectory\".", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "İmlecin altındaki ilgili JSON bileşenlerini vurgula.", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "İmleç altındaki ilgili normal ifade bileşenlerini vurgula.", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "Bağımsız değişken parametre adıyla eşleştiğinde ipuçlarını bastır", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "Parametre adı metodun hedefi ile eşleştiğinde ipuçlarını gizle", "configuration.dotnet.navigation.navigateToDecompiledSources": "Derlenmiş kaynaklarda gezinmeyi etkinleştir.", + "configuration.dotnet.preferCSharpExtension": "Projeleri yalnızca C# uzantısıyla yüklenmeye zorlar. Bu, C# Dev Kit tarafından desteklenmeyen eski proje türlerini kullanırken yararlı olabilir. (Pencerenin yeniden yüklenmesi gerekir)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "Simge görüntülendiğinde açıklama bilgilerini göster.", + "configuration.dotnet.server.crashDumpPath": "Dil sunucusunun çökmesi durumunda kilitlenme dökümlerinin yazılacağı klasör yolunu ayarlar. Kullanıcı tarafından yazılabilir olmalıdır.", "configuration.dotnet.server.extensionPaths": "Dil sunucusu --extension bağımsız değişkenleri yolunu geçersiz kıl", - "configuration.dotnet.server.path": "Sunucunun (LSP veya O#) yürütülebilir dosyasının mutlak yolunu belirtir. Boş bırakıldığında, C# Uzantısına sabitlenmiş sürüm kullanılır.", + "configuration.dotnet.server.path": "Sunucunun (LSP veya O#) yürütülebilir dosyasının mutlak yolunu belirtir. Boş bırakıldığında C# Uzantısına sabitlenen sürüm kullanılır. (Önceden 'omnisharp.path')", + "configuration.dotnet.server.startTimeout": "İstemcinin başarılı bir şekilde başlatılması ve dil sunucusuna bağlanması için zaman aşımını (ms cinsinden) belirtir.", "configuration.dotnet.server.trace": "Dil sunucusu için günlük düzeyini ayarlar", - "configuration.dotnet.server.waitForDebugger": "Hata ayıklayıcının ekli olması için sunucu başlatılırken --debug bayrağını geçirir.", + "configuration.dotnet.server.waitForDebugger": "Bir hata ayıklayıcının eklenmesine izin vermek için sunucuyu başlatırken --debug bayrağını iletir. (Önceden 'omnisharp.waitForDebugger')", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "Başvuru derlemeleri içinde sembolleri arama. İçeri aktarma ekleme gibi sembol arama gerektiren özellikleri etkiler.", - "configuration.dotnet.unitTestDebuggingOptions": "Birim testi hata ayıklaması için başlatılırken hata ayıklayıcıyla birlikte kullanma seçenekleri.", + "configuration.dotnet.unitTestDebuggingOptions": "Birim testi hata ayıklamasını başlatırken hata ayıklayıcıyla birlikte kullanılacak seçenekler. (Önceden 'csharp.unitTestDebuggingOptions')", "configuration.razor.languageServer.debug": "Dil sunucusunu başlatırken hata ayıklama eklemesinin beklenip beklenmeyeceğini belirtir.", "configuration.razor.languageServer.directory": "Razor Dil Sunucusu dizininin yolunu geçersiz kılıyor.", "configuration.razor.trace": "Tüm mesajların [Ayrıntılı], bazı mesajların [Mesajlar] veya hiç çıkmayacağını [Kapalı] belirtir.", "configuration.razor.trace.messages": "Razor uzantısından yalnızca bazı iletileri günlükler", "configuration.razor.trace.off": "Razor uzantısından gelen iletileri günlüğe kaydetmez", "configuration.razor.trace.verbose": "Razor uzantısından gelen tüm mesajları günlüğe kaydeder", + "debuggers.coreclr.configurationSnippets.description.attach": ".NET hata ayıklayıcısını (coreclr) çalışan bir işleme ekleyin. Bu, '.NET 5+ veya .NET Core işlemine ekle' komutu kullanılarak da kullanılabilir.", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "Bu kod parçacığı, Blazor WebAssembly hata ayıklayıcısı (blazorwasm) altında, başlatılacak yürütülebilir dosyanın yolunu belirten yeni bir işlemi başlatmak için kullanılır. Çoğu durumda, \".NET: C# projesini başlat\" kod parçacığı daha iyi bir seçimdir, ancak bu kod parçacığı tüm başlatma seçenekleri üzerinde tam denetime sahip olmak için kullanılabilir. Bu kod parçacığı dosyalarını sunmak için arka uç ASP.NET Core uygulamasına sahip bir proje olan, barındırılan Blazor projeleri içindir.", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "Bu kod parçacığı, Blazor WebAssembly hata ayıklayıcısı (blazorwasm) altında yeni bir işlemi başlatmak için kullanılır. Çoğu durumda, \".NET: C# projesini başlat\" kod parçacığı daha iyi bir seçimdir, ancak bu kod parçacığı tüm başlatma seçenekleri üzerinde tam denetime sahip olmak için kullanılabilir. Bu kod parçacığı, dosyalarını sunmak için bir arka uç ASP.NET Core uygulamasına sahip olmayan bir proje olan tek başına Blazor projeleri içindir.", + "debuggers.coreclr.configurationSnippets.description.console-local": "Bu kod parçacığı, .NET hata ayıklayıcısı (coreclr) altında, başlatılacak yürütülebilir dosyanın yolunu belirten yeni bir işlemi başlatmak için kullanılır. Çoğu durumda, \".NET: C# projesini başlat\" kod parçacığı daha iyi bir seçimdir. Bu kod parçacığı, proje bu VS Code örneğinin dışında oluşturulduğunda veya .NET Kodunuzu 'dotnet.exe'/'dotnet'in belirli bir sürümü gibi özel bir yürütülebilir dosyada barındırmak istediğinizde ya da .NET Code yerel bir uygulama tarafından barındırıldığında kullanışlıdır. Bu kod parçacığı konsol uygulamalarına yöneliktir.", + "debuggers.coreclr.configurationSnippets.description.remote": "Bu kod parçacığı, VS Code uzaktan iletişimi **olmadan** .NET Kodunda uzaktan hata ayıklamanın nasıl yapılacağını gösterir. Projenizi yerel olarak oluşturmak ancak başka bir bilgisayarda çalıştırmak istediğiniz durumlarda kullanılmalıdır.", + "debuggers.coreclr.configurationSnippets.description.web-local": "Bu kod parçacığı, .NET hata ayıklayıcısı (coreclr) altında, başlatılacak yürütülebilir dosyanın yolunu belirten yeni bir işlemi başlatmak için kullanılır. Çoğu durumda, \".NET: C# projesini başlat\" kod parçacığı daha iyi bir seçimdir. Bu kod parçacığı, proje bu VS Code örneğinin dışında oluşturulduğunda veya .NET Kodunuzu 'dotnet.exe'/'dotnet'in belirli bir sürümü gibi özel bir yürütülebilir dosyada barındırmak istediğinizde ya da .NET Code yerel bir uygulama tarafından barındırıldığında kullanışlıdır. Bu kod parçacığı web (ASP.NET Core) uygulamalarına yöneliktir.", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: .NET işlemine ekle", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: Uzaktan hata ayıklama - .NET işlemine ekle", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Web Derlemesi - Barındırılan Blazor projesini başlat", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Web Derlemesi - Tek başına Blazor projesini başlat", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: Yürütülebilir dosyayı başlat (Konsol)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: Uzaktan hata ayıklama - Yürütülebilir dosyayı başlat (Konsol)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: Yürütülebilir dosyayı başlat (Web)", + "debuggers.dotnet.configurationSnippets.description": "Bu kod parçacığı, bir C# projesinde hata ayıklamak için VS Code'u yapılandırır. Hata ayıklama seçenekleri (örnek: yürütülebilir dosyanın bağımsız değişkenleri) '/Properties/launchSettings.json' dosyası aracılığıyla yapılandırılabilir.", + "debuggers.dotnet.configurationSnippets.label": ".NET: C# projesini başlat", "debuggers.dotnet.launch.launchConfigurationId.description": "Kullanılacak başlatma yapılandırma kimliği. Boş dize, geçerli etkin yapılandırmayı kullanır.", "debuggers.dotnet.launch.projectPath.description": ".csproj dosyasının yolu.", "generateOptionsSchema.allowFastEvaluate.description": "True olduğunda (varsayılan durum), hata ayıklayıcısı basit özelliklerin ve yöntemlerin yürütülmesinin simülasyonunu yaparak daha hızlı değerlendirmeyi dener.", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "Belirtilmişse kullanılacak launchSettings.json dosyasındaki profilin adını belirtir. Bu, launchSettings.json bulunamazsa yoksayılır. Belirtilen yoldan okunacak launchSettings.json 'launchSettingsFilePath' özelliği veya ayarlanmamışsa {cwd}/Properties/launchSettings.json olmalıdır. Bu, null veya boş bir dize olarak ayarlanırsa launchSettings.json yoksayılır. Bu değer belirtilmezse ilk 'Project' profili kullanılır.", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "Web tarayıcısının başlatılmasından kaynaklanan stdout metninin çıkış penceresine kaydedilip kaydedilmeyeceğini belirleyen bayrak. Bu seçenek varsayılan olarak `true` değerini alır.", "generateOptionsSchema.logging.description": "Çıkış penceresine ne tür iletilerin kaydedilmesi gerektiğini belirleyen bayraklar.", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "True ise altyapı günlüğü, bir isteğin sürdüğü zaman miktarını mikrosaniye cinsinden belirtmek için `adapterElapsedTime` ve `engineElapsedTime` özelliklerini içerir. Bu seçenek varsayılan olarak `false` değerini alır.", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "Tanılama altyapısı günlüklerinin çıkış penceresine kaydedilmesinin gerekli olup olmadığını belirleyen bayrak. Varsayılan olarak `false` değerini alır.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "Tüm hata ayıklayıcı API çağrılarını yazdır. Bu çok ayrıntılı.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "Hata ayıklayıcı API çağrılarından kaynaklanan yazdırma hataları.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h'ye API çağrılarının çıkış penceresine yazdırılıp yazdırılmayacağını kontrol eder. Bu seçenek varsayılan olarak `yok`tur.", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "İzleme API çağrılarını devre dışı bırak", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "Temel çalışma zamanı tarafından oluşturulan olaylar için ayrıntılı izlemenin etkinleştirilip etkinleştirilmeyeceğini belirleyen bayrak. Bu seçenek varsayılan olarak `false` değerini alır.", + "generateOptionsSchema.logging.diagnosticsLog.description": "Hata ayıklayıcının tanılama günlüğünden çıkış penceresine hangi mesajların yazdırılacağını kontrol eden ayarlar. Bu günlüğün amacı hata ayıklayıcıyla ilgili sorunları gidermeye yardımcı olmaktır.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "Hata düzeyinde tanılama mesajlarını yazdırın.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "Önemli tanılama mesajlarını yazdırın.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "Hata ayıklayıcının göndericisinden hangi mesajların çıktı penceresine yazdırılacağını kontrol eder. Belirtilmezse, ayrıntılı günlük ayarlarından biri etkinleştirilmediği sürece (\"debugEngineAPITracing\", \"debugRuntimeEventTracing\", \"expressionEvaluationTracing\" veya \"startDebuggingTracing\") bu varsayılan olarak \"none\" olacaktır; bu durumda varsayılan ayar \"normal\" olarak değişir.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "Ek tanılama iletilerini yazdırma.", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "Ayrıntılı olmayan tüm tanılama mesajlarını yazdırın.", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "İfade değerlendirmesi için ayrıntılı izlemenin etkinleştirilip etkinleştirilmeyeceğini belirleyen işaret. Bu seçenek varsayılan olarak `false` değerini alır.", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "C# hata ayıklayıcısı ile kullanıcı arayüzü arasında alınıp verilen DAP protokolü mesajlarının çıkış penceresine kaydedilmesi gerekip gerekmediğini belirleyen bayrak. Bu seçenek varsayılan olarak `false` değerini alır.", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "Hata ayıklamayı başlatma için ayrıntılı izlemenin etkin olup olmadığını belirleyen bayrak. Bu seçenek varsayılan olarak `false` değerini alır.", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "Doğruysa, protokol mesajı günlüğü, bir isteğin aldığı süreyi mikrosaniye cinsinden belirtmek için \"adapterElapsedTime\" ve \"engineElapsedTime\" özelliklerini içerecektir. Bu seçenek varsayılan olarak `false` değerini alır.", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "'logging.engineLogging' ayarı, 'logging.diagnosticsLog.protocolMessages' yerine kullanımdan kaldırıldı.", "generateOptionsSchema.logging.exceptions.markdownDescription": "Özel durum iletilerinin çıkış penceresine kaydedilmesinin gerekip gerekmediğini belirleyen bayrak. Varsayılan olarak `true` değerini alır.", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "Modül yükleme olaylarının çıkış penceresine kaydedilmesinin gerekip gerekmediğini belirleyen bayrak. Bu seçenek varsayılan olarak `true` değerini alır.", "generateOptionsSchema.logging.processExit.markdownDescription": "Hedef işlem çıkış yaptığında veya hata ayıklama durdurulduğunda bir iletinin günlüğe kaydedilip kaydedilmeyeceğini denetler. Bu seçenek varsayılan olarak `true` değerini alır.", @@ -138,7 +194,7 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "'includedModules' dizisinde olmayan veya 'includeSymbolsNextToModules' ayarı aracılığıyla eklenmeyen modüller için sembol yüklemeye çalışmayın.", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "'True' ise, Microsoft Sembol sunucusu (https​://msdl.microsoft.com​/download/symbols) sembol arama yoluna eklenir. Belirtilmezse, bu seçenek varsayılan olarak 'false' değerine ayarlanır.", "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "'True' ise NuGet sembol sunucusu (https​://symbols.nuget.org​/download/symbols) sembol arama yoluna eklenir. Belirtilmezse bu seçenek varsayılan olarak 'false' değerine ayarlanır.", - "generateOptionsSchema.symbolOptions.searchPaths.description": ".pdb dosyalarını aramak için sembol sunucusu URL’si (ör: http​://MyExampleSymbolServer) veya dizin (ör. /build/symbols) dizisi. Bu dizinler, modülün yanındaki varsayılan konumların yanı sıra, pdb'nin bırakıldığı yolda arama yapar.", + "generateOptionsSchema.symbolOptions.searchPaths.description": ".pdb dosyalarını aramak için sembol sunucusuURL'leri (example: http​://MyExampleSymbolServer) veya dizinler (example: /build/symbols) dizisi. Bu dizinler, varsayılan konumlara (modülün ve pdb'nin ilk bırakıldığı yolun yanında) ek olarak aranır.", "generateOptionsSchema.targetArchitecture.markdownDescription": "[Yalnızca yerel macOS hata ayıklamasında desteklenir]\r\n\r\nHata ayıklanan mimarisi. Bu parametre ayarlanmazsa, bu değer otomatik olarak algılanır. İzin verilen değerler şunlardır: `x86_64` veya `arm64`.", "generateOptionsSchema.targetOutputLogPath.description": "Ayarlandığında hedef uygulamanın stdout ve stderr'a (ör. Console.WriteLine) yazdığı metin belirtilen dosyaya kaydedilir. Konsol, internalConsole dışında bir değere ayarlanmışsa bu seçenek yoksayılır. Ör. '${workspaceFolder}/out.txt'", "viewsWelcome.debug.contents": "[Derleme ve Hata Ayıklama için C# Varlıkları Oluşturma](command:dotnet.generateAssets)\r\n\r\nlaunch.json hakkında daha fazla bilgi edinmek için bkz. [C# hata ayıklaması için launch.json yapılandırma](https://aka.ms/VSCode-CS-LaunchJson)." diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index 5b5cdd303..86ffd443e 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": "附加到 .NET 5+ 或 .NET Core 进程", + "command.csharp.downloadDebugger": "下载 .NET Core 调试程序", + "command.csharp.listProcess": "列出要附加的进程", + "command.csharp.listRemoteDockerProcess": "列出 Docker 连接上的进程", + "command.csharp.listRemoteProcess": "列出远程连接上要附加的进程", + "command.csharp.reportIssue": "报告问题", + "command.csharp.showDecompilationTerms": "显示反编译程序条款协议", + "command.dotnet.generateAssets.currentProject": "生成用于生成和调试的资产", + "command.dotnet.openSolution": "打开解决方案", + "command.dotnet.restartServer": "重启语言服务器", + "command.dotnet.restore.all": "还原所有项目", + "command.dotnet.restore.project": "还原项目", + "command.dotnet.test.debugTestsInContext": "在上下文中调试测试", + "command.dotnet.test.runTestsInContext": "在上下文中运行测试", + "command.extension.showRazorCSharpWindow": "显示 Razor CSharp", + "command.extension.showRazorHtmlWindow": "显示 Razor Html", + "command.o.fixAll.document": "修复文档中出现的所有代码问题", + "command.o.fixAll.project": "修复项目中出现的所有代码问题", + "command.o.fixAll.solution": "修复解决方案中出现的所有代码问题", + "command.o.pickProjectAndStart": "选择项目", + "command.o.reanalyze.allProjects": "分析所有项目", + "command.o.reanalyze.currentProject": "分析当前项目", + "command.o.restart": "重新启动 OmniSharp", + "command.razor.reportIssue": "报告 Razor 问题", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "显示创建隐式对象的提示", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "显示具有推断类型的变量的提示", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "显示索引器的提示", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "显示 lambda 参数类型的提示", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "显示内联类型提示", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "对以下项运行后台代码分析:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "运行以下项的后台代码分析: (之前为 \"omnisharp.enableRoslynAnalyzers\")", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "整个解决方案", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "无", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "打开的文档", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "整个解决方案", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "无", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "打开的文档", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "指定是否应显示引用 CodeLens。", - "configuration.dotnet.codeLens.enableTestsCodeLens": "指定是否应显示运行和调试测试 CodeLens。", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "指定是否应显示引用 CodeLens。(之前为 \"csharp.referencesCodeLens.enabled\")", + "configuration.dotnet.codeLens.enableTestsCodeLens": "指定是否应显示运行和调试测试 CodeLens。(之前为 \"csharp.testsCodeLens.enabled\")", "configuration.dotnet.completion.provideRegexCompletions": "在完成列表中显示正则表达式。", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "支持在完成列表中显示不支持的类型和不支持的扩展方法。提交后,相应的 using 指令将添加到当前文件的顶部。", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "支持在完成列表中显示未导入的类型和未导入的扩展方法。提交后,相应的 using 指令将添加到当前文件的顶部。(之前为 \"omnisharp.enableImportCompletion\")", "configuration.dotnet.completion.showNameCompletionSuggestions": "对最近选择的成员执行自动对象名称完成。", - "configuration.dotnet.defaultSolution.description": "要在工作区中打开的默认解决方案的路径,或设置为“禁用”以跳过它。", + "configuration.dotnet.defaultSolution.description": "要在工作区中打开的默认解决方案的路径,或者设置为“禁用”以跳过它。(之前为 \"omnisharp.defaultLaunchSolution\")", "configuration.dotnet.dotnetPath": "指定要使用的 dotnet 安装目录的路径,而不是默认的系统目录。这仅影响用于承载语言服务器本身的 dotnet 安装。示例: \"/home/username/mycustomdotnetdirectory\"。", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "突出显示光标下的相关 JSON 组件。", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "突出显示光标下的相关正则表达式组件。", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "当参数与参数名称匹配时抑制提示", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "当参数名称与方法的意图匹配时禁止显示提示", "configuration.dotnet.navigation.navigateToDecompiledSources": "启用对分解源的导航。", + "configuration.dotnet.preferCSharpExtension": "仅强制使用 C# 扩展加载项目。使用 C# Dev Kit 不支持的旧项目类型时,这可能很有用。(需要重新加载窗口)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "显示符号时显示备注信息。", + "configuration.dotnet.server.crashDumpPath": "设置在语言服务器崩溃时在其中写入故障转储的文件夹路径。用户必须可以写入。", "configuration.dotnet.server.extensionPaths": "替代语言服务器 --extension 参数的路径", - "configuration.dotnet.server.path": "指定服务器 (LSP 或 O#) 可执行文件的绝对路径。如果留空,则会使用固定到 C# 扩展的版本。", + "configuration.dotnet.server.path": "指定服务器(LSP 或 O#)可执行文件的绝对路径。如果留空,会使用固定到 C# 扩展的版本。(之前为 \"omnisharp.path\")", + "configuration.dotnet.server.startTimeout": "为客户端指定一个超时 (以毫秒为单位),以成功启动并连接到语言服务器。", "configuration.dotnet.server.trace": "设置语言服务器的日志记录级别", - "configuration.dotnet.server.waitForDebugger": "启动服务器时传递 --debug 标志,以允许附加调试器。", + "configuration.dotnet.server.waitForDebugger": "启动服务器时传递 --debug 标志,以允许附加调试器。(之前为 \"omnisharp.waitForDebugger\")", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "在引用程序集中搜索符号。它会影响需要符号搜索的功能,例如添加导入。", - "configuration.dotnet.unitTestDebuggingOptions": "启动单元测试调试时要与调试器一起使用的选项。", + "configuration.dotnet.unitTestDebuggingOptions": "启动单元测试调试时要与调试程序一起使用的选项。(之前为 \"csharp.unitTestDebuggingOptions\")", "configuration.razor.languageServer.debug": "指定在启动语言服务器时是否等待调试附加。", "configuration.razor.languageServer.directory": "重写 Razor 语言服务器目录的路径。", "configuration.razor.trace": "指定是否输出所有消息 [Verbose]、某些消息 [Messages] 或完全不输出 [Off]。", "configuration.razor.trace.messages": "仅记录来自 Razor 扩展的某些消息", "configuration.razor.trace.off": "不记录来自 Razor 扩展的消息", "configuration.razor.trace.verbose": "记录来自 Razor 扩展的所有消息", + "debuggers.coreclr.configurationSnippets.description.attach": "将 .NET 调试器 (coreclr) 附加到正在运行的进程。也可以使用“附加到 .NET 5+ 或 .NET Core 进程”命令完成此操作。", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "此代码片段用于在 Blazor WebAssembly 调试器 (blazorwasm) 下启动新进程,指定要启动的可执行文件的路径。在大多数情况下,“.NET: 启动 C# 项目”代码片段是更好的选择,但此代码片段可用于完全控制所有启动选项。此代码片段适用于托管的 Blazor 项目,该项目具有后端 ASP.NET 核心应用以提供其文件。", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "此代码片段用于在 Blazor WebAssembly 调试器 (blazorwasm) 下启动新进程。在大多数情况下,“.NET: 启动 C# 项目”代码片段是更好的选择,但此代码片段可用于完全控制所有启动选项。此代码片段适用于独立的 Blazor 项目,该项目不具有后端 ASP.NET 核心应用以提供其文件。", + "debuggers.coreclr.configurationSnippets.description.console-local": "此代码片段用于在 .NET 调试器 (coreclr) 下启动新进程,指定要启动的可执行文件的路径。在大多数情况下,“.NET: 启动 C# 项目”代码片段是更好的选择。当项目在此 VS Code 实例外部生成,或者想要将 .NET Code 托管在自定义可执行文件(例如,特定版本的 “dotnet.exe”/'dotnet' )中或者 .NET Code 由本机应用程序托管时,此代码片段非常有用。此代码片段适用于控制台应用程序。", + "debuggers.coreclr.configurationSnippets.description.remote": "此代码片段演示了如何在 **不使用** VS Code 远程处理的情况下远程调试 .NET Code。如果要在本地生成项目但在另一台计算机上运行项目,应使用它。", + "debuggers.coreclr.configurationSnippets.description.web-local": "此代码片段用于在 .NET 调试器 (coreclr) 下启动新进程,指定要启动的可执行文件的路径。在大多数情况下,“.NET: 启动 C# 项目”代码片段是更好的选择。当项目在此 VS Code 实例外部生成,或者想要将 .NET Code 托管在自定义可执行文件(例如,特定版本的 “dotnet.exe”/'dotnet' )中或者 .NET Code 由本机应用程序托管时,此代码片段非常有用。此代码片段适用于 Web (ASP.NET Core) 应用程序。", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: 附加到 .NET 进程", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: 远程调试 - 附加到 .NET 进程", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Web 程序集 - 启动托管的 Blazor 项目", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Web 程序集 - 启动独立的 Blazor 项目", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: 启动可执行文件(控制台)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: 远程调试 - 启动可执行文件(控制台)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: 启动可执行文件 (Web)", + "debuggers.dotnet.configurationSnippets.description": "此代码片段将 VS Code 配置为调试 C# 项目。可以通过“/Properties/launchSettings.json”文件配置调试选项(示例: 可执行文件的参数)。", + "debuggers.dotnet.configurationSnippets.label": ".NET: 启动 C# 项目", "debuggers.dotnet.launch.launchConfigurationId.description": "要使用的启动配置 ID。空字符串将使用当前的活动配置。", "debuggers.dotnet.launch.projectPath.description": ".csproj 文件的路径。", "generateOptionsSchema.allowFastEvaluate.description": "如果为 true (默认状态),调试器将尝试模拟简单属性和方法的执行以加快评估速度。", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "如果指定,则指示要使用的 launchSettings.json 中配置文件的名称。如果找不到 launchSettings.json,则忽略此项。将从指定的路径中读取 launchSettings.json,该路径应为 \"launchSettingsFilePath\" 属性或 {cwd}/Properties/launchSettings.json (如果未设置)。如果此项设置为 null 或空字符串,则忽略 launchSettings.json。如果未指定此值,将使用第一个“项目”配置文件。", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "用于确定是否应将启动 Web 浏览器中的 stdout 文本记录到输出窗口的标志。此选项默认为 \"true\"。", "generateOptionsSchema.logging.description": "用于确定应将哪些类型的消息记录到输出窗口的标志。", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "如果为 true,引擎日志记录将包括 \"adapterElapsedTime\" 和 \"engineElapsedTime\" 属性,以指示请求花费的时间(以微秒为单位)。此选项默认为 \"false\"。", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "用于确定是否应将诊断引擎日志记录到输出窗口的标志。此选项默认为 \"false\"。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "打印所有调试程序 API 调用。需要非常详细。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "打印调试程序 API 调用中的失败。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "控制是否应将对 Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h 的 API 调用打印到输出窗口。此选项默认为 `none`。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "禁用跟踪 API 调用", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "用于确定是否应启用详细跟踪基础运行时引发的事件的标志。此选项默认为 `false`。", + "generateOptionsSchema.logging.diagnosticsLog.description": "用于控制从调试程序的诊断日志将哪些消息打印到输出窗口的设置。此日志旨在帮助解决调试程序的问题。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "打印错误级别诊断消息。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "打印重要的诊断消息。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "控制从调试程序的调度程序将哪些消息打印到输出窗口。如果未指定,将默认为 `none`,除非启用了一个详细日志设置 (`debugEngineAPITracing`、`debugRuntimeEventTracing`、`expressionEvaluationTracing` 或 `startDebuggingTracing`),在这种情况下,默认值将更改为 `normal`。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "不打印其他诊断消息。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "打印所有非详细诊断消息。", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "用于确定是否应启用详细跟踪表达式计算的标志。此选项默认为 `false`。", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "用于确定是否应将 C# 调试程序和 UI 之间交换的 DAP 协议消息记录到输出窗口的标志。此选项默认为 `false`。", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "用于确定是否应启用详细跟踪启动调试的标志。此选项默认为 `false`。", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "如果为 true,协议消息日志记录将包括 \"adapterElapsedTime\" 和 \"engineElapsedTime\" 属性,以指示请求花费的时间(以微秒为单位)。此选项默认为 \"false\"。", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "\"logging.engineLogging\" 设置已弃用,取而代之的是 \"logging.diagnosticsLog.protocolMessages\"。", "generateOptionsSchema.logging.exceptions.markdownDescription": "用于确定是否应将异常消息记录到输出窗口的标志。此选项默认为 \"true\"。", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "用于确定是否应将模块加载事件记录到输出窗口的标志。此选项默认为 \"true\"。", "generateOptionsSchema.logging.processExit.markdownDescription": "控制在目标进程退出或调试停止时是否记录消息。此选项默认为 \"true\"。", @@ -138,7 +194,7 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "请勿尝试为任何模块加载符号,除非该模块在 \"includedModules\" 数组中,或者它通过 \"includeSymbolsNextToModules\" 设置包含在内。", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "如果为 \"true\",则 Microsoft 符号服务器(https​://msdl.microsoft.com​/download/symbols)会添加到符号搜索路径。如果未指定,此选项会默认为 \"false\"。", "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "如果为 \"true\",NuGet.org 符号服务器 (https​://symbols.nuget.org​/download/symbols) 会添加到符号搜索路径。如果未指定,此选项默认为 \"false\"。", - "generateOptionsSchema.symbolOptions.searchPaths.description": "在其中搜索 .pdb 文件的符号服务器 URL (例如 http​://MyExampleSymbolServer)或目录(例如 /build/symbols)的数组。除了默认位置,还将搜索这些目录 - 在模块以及 pdb 最初放置到的路径的旁边。", + "generateOptionsSchema.symbolOptions.searchPaths.description": "在其中搜索 .pdb 文件的符号服务器 URL (example: http​://MyExampleSymbolServer)或目录(example: /build/symbols)的数组。除了默认位置,还将搜索这些目录 - 在模块以及 pdb 最初放置到的路径的旁边。", "generateOptionsSchema.targetArchitecture.markdownDescription": "[仅在本地 macOS 调试中受支持]\r\n\r\n调试对象的体系结构。除非设置了此参数,否则将自动检测到此参数。允许的值为 \"x86_64\" 或 \"arm64\"。", "generateOptionsSchema.targetOutputLogPath.description": "设置后,目标应用程序写入 stdout 和 stderr (例如 Console.WriteLine) 的文本将保存到指定的文件。如果控制台设置为 internalConsole 以外的其他内容,则忽略此选项。例如 \"${workspaceFolder}/out.txt\"", "viewsWelcome.debug.contents": "[为版本和调试生成 C# 资产](command:dotnet.generateAssets)\r\n\r\n若要了解有关 launch.json 的详细信息,请参阅 [为 C# 调试配置 launch.json](https://aka.ms/VSCode-CS-LaunchJson)。" diff --git a/package.nls.zh-tw.json b/package.nls.zh-tw.json index 23b639531..8f8d7449b 100644 --- a/package.nls.zh-tw.json +++ b/package.nls.zh-tw.json @@ -1,10 +1,34 @@ { + "command.csharp.attachToProcess": "連結至 .NET 5+ 或 .NET Core 程序", + "command.csharp.downloadDebugger": "下載 .NET Core 偵錯工具", + "command.csharp.listProcess": "列出連結的程序", + "command.csharp.listRemoteDockerProcess": "列出 Docker 連線上的程序", + "command.csharp.listRemoteProcess": "列出遠端連線上連結的程序", + "command.csharp.reportIssue": "回報問題", + "command.csharp.showDecompilationTerms": "顯示解編程式條款合約", + "command.dotnet.generateAssets.currentProject": "產生用於建置和偵錯的資產", + "command.dotnet.openSolution": "開啟方案", + "command.dotnet.restartServer": "重新啟動語言伺服器", + "command.dotnet.restore.all": "還原所有專案", + "command.dotnet.restore.project": "還原專案", + "command.dotnet.test.debugTestsInContext": "在內容中偵錯測試", + "command.dotnet.test.runTestsInContext": "在內容中執行測試", + "command.extension.showRazorCSharpWindow": "顯示 Razor CSharp", + "command.extension.showRazorHtmlWindow": "顯示 Razor HTML", + "command.o.fixAll.document": "修正文件內程式碼問題的所有出現項目", + "command.o.fixAll.project": "修正專案內程式碼問題的所有出現項目", + "command.o.fixAll.solution": "修正解決方案內程式碼問題的所有出現項目", + "command.o.pickProjectAndStart": "選取專案", + "command.o.reanalyze.allProjects": "分析所有專案", + "command.o.reanalyze.currentProject": "分析目前專案", + "command.o.restart": "重新啟動 OmniSharp", + "command.razor.reportIssue": "報告 Razor 問題", "configuration.csharp.inlayHints.enableInlayHintsForImplicitObjectCreation": "顯示隱含物件建立的提示", "configuration.csharp.inlayHints.enableInlayHintsForImplicitVariableTypes": "顯示有推斷類型之變數的提示", "configuration.csharp.inlayHints.enableInlayHintsForIndexerParameters": "顯示索引子的提示", "configuration.csharp.inlayHints.enableInlayHintsForLambdaParameterTypes": "顯示 Lambda 參數類型的提示", "configuration.csharp.inlayHints.enableInlayHintsForTypes": "顯示內嵌類型提示", - "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "為以下項目執行背程式碼分析:", + "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope": "執行背景程式碼分析: (先前為 `omnisharp.enableRoslynAnalyzers`)", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.fullSolution": "整個解決方案", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.none": "無", "configuration.dotnet.backgroundAnalysis.analyzerDiagnosticsScope.openFiles": "開啟的文件", @@ -12,12 +36,12 @@ "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.fullSolution": "整個解決方案", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.none": "無", "configuration.dotnet.backgroundAnalysis.compilerDiagnosticsScope.openFiles": "開啟的文件", - "configuration.dotnet.codeLens.enableReferencesCodeLens": "指定是否應顯示參考 CodeLens。", - "configuration.dotnet.codeLens.enableTestsCodeLens": "指定是否應顯示執行和偵錯測試 CodeLens。", + "configuration.dotnet.codeLens.enableReferencesCodeLens": "指定是否應該顯示參考 CodeLens。(先前為 `csharp.referencesCodeLens.enabled`)", + "configuration.dotnet.codeLens.enableTestsCodeLens": "指定是否應顯示執行和偵錯測試 CodeLens。(先前為 `csharp.testsCodeLens.enabled`)", "configuration.dotnet.completion.provideRegexCompletions": "在完成清單中顯示規則運算式。", - "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "啟用在完成清單中顯示未匯入的類型和未匯入的擴充方法的支援。認可時,適當的 using 指示詞會新增到目前檔案的頂端。", + "configuration.dotnet.completion.showCompletionItemsFromUnimportedNamespaces": "啟用在完成清單中顯示未匯入的類型和未匯入的擴充方法的支援。認可時,適當的 using 指示詞會新增到目前檔案的頂端。(先前為 `omnisharp.enableImportCompletion`)", "configuration.dotnet.completion.showNameCompletionSuggestions": "為您最近選取的成員執行自動物件名稱完成。", - "configuration.dotnet.defaultSolution.description": "要在工作區中開啟的預設解決方案路徑,或設為 [停用] 以略過它。", + "configuration.dotnet.defaultSolution.description": "要在工作區中開啟的預設解決方案路徑,或設為 [停用] 以略過它。(先前為 `omnisharp.defaultLaunchSolution`)", "configuration.dotnet.dotnetPath": "指定要使用的 dotnet 安裝目錄路徑,而非系統預設的路徑。這只會影響用來裝載語言伺服器本身的 dotnet 安裝。範例: \"/home/username/mycustomdotnetdirectory”。", "configuration.dotnet.highlighting.highlightRelatedJsonComponents": "反白資料指標下的相關 JSON 元件。", "configuration.dotnet.highlighting.highlightRelatedRegexComponents": "反白資料指標下的相關規則運算式元件。", @@ -35,19 +59,37 @@ "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchArgumentName": "當引數符合參數名稱時抑制提示", "configuration.dotnet.inlayHints.suppressInlayHintsForParametersThatMatchMethodIntent": "當參數名稱符合方法的意圖時,不出現提示", "configuration.dotnet.navigation.navigateToDecompiledSources": "啟用到反向組譯來源的瀏覽。", + "configuration.dotnet.preferCSharpExtension": "強制專案僅以 C# 延伸模組載入。使用 C# 開發人員套件不支援的舊版專案類型時,這會很有用。(需要重新載入視窗)", "configuration.dotnet.quickInfo.showRemarksInQuickInfo": "顯示符號時顯示備註資訊。", + "configuration.dotnet.server.crashDumpPath": "設定當語言伺服器當機時要寫入當機傾印的資料夾路徑。必須可由使用者寫入。", "configuration.dotnet.server.extensionPaths": "覆寫語言伺服器 --extension 引數的路徑", - "configuration.dotnet.server.path": "指定伺服器 (LSP 或 O#) 可執行檔的絕對路徑。保留空白時,會使用釘選到 C# 延伸模組的版本。", + "configuration.dotnet.server.path": "指定伺服器 (LSP 或 O#) 可執行檔的絕對路徑。保留空白時,會使用釘選到 C# 延伸模組的版本。(先前為 `omnisharp.path`)", + "configuration.dotnet.server.startTimeout": "指定用戶端順利啟動並連接到語言伺服器的逾時 (毫秒)。", "configuration.dotnet.server.trace": "設定語言伺服器的記錄層次", - "configuration.dotnet.server.waitForDebugger": "啟動伺服器時傳遞 --debug 旗標,以允許附加偵錯工具。", + "configuration.dotnet.server.waitForDebugger": "啟動伺服器時傳遞 --debug 旗標,以允許附加偵錯工具。(先前為 `omnisharp.waitForDebugger`)", "configuration.dotnet.symbolSearch.searchReferenceAssemblies": "在參考組件中搜尋符號。這會影響需要符號搜尋的功能,例如新增匯入。", - "configuration.dotnet.unitTestDebuggingOptions": "啟動單元測試偵錯時要搭配偵錯工具使用的選項。", + "configuration.dotnet.unitTestDebuggingOptions": "啟動單元測試偵錯時搭配偵錯工具使用的選項。(先前為 `csharp.unitTestDebuggingOptions`)", "configuration.razor.languageServer.debug": "指定啟動語言伺服器時,是否要等候偵錯附加。", "configuration.razor.languageServer.directory": "覆寫 Razor 語言伺服器目錄的路徑。", "configuration.razor.trace": "指定是否要輸出所有訊息 [Verbose],部分訊息 [Messages] 或完全不 [Off]。", "configuration.razor.trace.messages": "只記錄來自 Razor 延伸模組的部分訊息", "configuration.razor.trace.off": "不記錄來自 Razor 延伸模組的訊息", "configuration.razor.trace.verbose": "記錄來自 Razor 延伸模組的所有訊息", + "debuggers.coreclr.configurationSnippets.description.attach": "將 .NET 偵錯工具 (coreclr) 連結到執行中的流程。這也可以使用 'Attach to a .NET 5+ or .NET Core process' 命令來完成。", + "debuggers.coreclr.configurationSnippets.description.blazor-hosted": "此程式碼片段可用來啟動 Blazor WebAssembly 偵錯工具 (blazorwasm) 下的新流程,並指定要啟動之可執行檔的路徑。在大部分情況下,「.NET: Launch C# project」程式碼片段是較佳的選擇,但此程式碼片段可用來完全控制所有啟動選項。此程式碼片段適用於裝載的 Blazor 專案,該專案是具有後端 ASP.NET Core 應用程式以提供其檔案服務的專案。", + "debuggers.coreclr.configurationSnippets.description.blazor-standalone": "此程式碼片段可用來啟動 Blazor WebAssembly 偵錯工具 (blazorwasm) 下的新流程。在大部分情況下,「.NET: Launch C# project」程式碼片段是較佳的選擇,但此程式碼片段可用來完全控制所有啟動選項。此程式碼片段適用於獨立的 Blazor 專案,該專案是具有後端 ASP.NET Core 應用程式以提供其檔案服務的專案。", + "debuggers.coreclr.configurationSnippets.description.console-local": "此程式碼片段可用來啟動 .NET 偵錯工具 (coreclr) 下的新流程,並指定要啟動之可執行檔的路徑。在大部分情況下,「.NET: Launch C# project」程式碼片段是較佳的選擇。當專案建置在此 VS Code 執行個體外,或您想要以自訂可執行檔裝載 .NET 程式碼時,此程式碼片段會很有用,例如特定版本的 'dotnet.exe'/'dotnet' 或 .NET Code 由原生應用程式裝載。此程式碼片段適用於主機應用程式。", + "debuggers.coreclr.configurationSnippets.description.remote": "此程式碼片段顯示如何 **不使用** VS Code 遠端功能來遠端偵錯 .NET Code。當您想要在本機建置專案,但在另一部電腦上執行時,應該使用它。", + "debuggers.coreclr.configurationSnippets.description.web-local": "此程式碼片段可用來啟動 .NET 偵錯工具 (coreclr) 下的新流程,並指定要啟動之可執行檔的路徑。在大部分情況下,「.NET: Launch C# project」程式碼片段是較佳的選擇。當專案建置在此 VS Code 執行個體外,或您想要以自訂可執行檔裝載 .NET 程式碼時,此程式碼片段會很有用,例如特定版本的 'dotnet.exe'/'dotnet' 或 .NET Code 由原生應用程式裝載。此程式碼片段適用於 Web (ASP.NET Core) 應用程式。", + "debuggers.coreclr.configurationSnippets.label.attach-local": ".NET: 附加至 .NET 流程", + "debuggers.coreclr.configurationSnippets.label.attach-remote": ".NET: 遠端偵錯 - 連結到 .NET 流程", + "debuggers.coreclr.configurationSnippets.label.blazor-hosted": ".NET: Web 組件 - 啟動裝載的 Blazor 專案", + "debuggers.coreclr.configurationSnippets.label.blazor-standalone": ".NET: Web 組件 - 啟動獨立的 Blazor 專案", + "debuggers.coreclr.configurationSnippets.label.console-local": ".NET: 啟動可執行檔 (主機)", + "debuggers.coreclr.configurationSnippets.label.console-remote": ".NET: 遠端偵錯 - 啟動可執行檔 (主機)", + "debuggers.coreclr.configurationSnippets.label.web-local": ".NET: 啟動可執行檔 (網頁)", + "debuggers.dotnet.configurationSnippets.description": "此程式碼片段會將 VS Code 設定為偵錯 C# 專案。偵錯選項 (範例: 可執行檔的引數) 可透過 '/Properties/launchSettings.json' 檔案設定。", + "debuggers.dotnet.configurationSnippets.label": ".NET: 啟動 C# 專案", "debuggers.dotnet.launch.launchConfigurationId.description": "要使用的啟動設定識別碼。空字串會使用目前的作用中設定。", "debuggers.dotnet.launch.projectPath.description": ".csproj 檔案的路徑。", "generateOptionsSchema.allowFastEvaluate.description": "當 true (預設狀態) 時,偵錯工具會模擬簡單屬性和方法的執行,以嘗試更快評估。", @@ -81,8 +123,22 @@ "generateOptionsSchema.launchSettingsProfile.description": "若指定,表示要在 launchSettings.json 中使用的設定檔名稱。如果找不到 launchSettings.json,則會略過此問題。將會從指定的路徑讀取 launchSettings.json,該路徑應該是 'launchSettingsFilePath' 屬性,如果未設定,則會 {cwd}/Properties/launchSettings.json。如果設定為 Null 或空字串,則會忽略 launchSettings.json。如果未指定此值,則會使用第一個 'Project' 設定檔。", "generateOptionsSchema.logging.browserStdOut.markdownDescription": "旗標,以決定是否應將啟動網頁瀏覽器的 stdout 文字記錄到輸出視窗。此選項預設為 'true'。", "generateOptionsSchema.logging.description": "旗標,判斷應記錄到輸出視窗的訊息類型。", - "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "若為 true,引擎記錄將包含 'adapterElapsedTime' 和 'engineElapsedTime' 屬性,以表示要求所花費的時間,以微秒為單位。此選項預設為 'false'。", - "generateOptionsSchema.logging.engineLogging.markdownDescription": "判斷是否應將診斷引擎記錄記錄到輸出視窗的旗標。此選項預設為 'false'。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.all.enumDescription": "列印所有偵錯工具 API 呼叫。這非常詳細。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.error.enumDescription": "列印來自偵錯工具 API 呼叫的失敗。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.markdownDescription": "控制呼叫 Microsoft.VisualStudio.Debugger.Engine/vsdebugeng.h 的 API 是否應列印至輸出視窗。此選項預設為 `none`。", + "generateOptionsSchema.logging.diagnosticsLog.debugEngineAPITracing.none.enumDescription": "停用追蹤 API 呼叫", + "generateOptionsSchema.logging.diagnosticsLog.debugRuntimeEventTracing.markdownDescription": "判斷是否應該啟用基礎執行階段所引發事件的詳細追蹤的旗標。此選項預設為 `false`。", + "generateOptionsSchema.logging.diagnosticsLog.description": "控制哪些訊息要從偵錯工具的診斷記錄列印到輸出視窗的設定。此記錄是用來協助疑難排解偵錯工具的問題。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.error.enumDescription": "列印錯誤層級診斷訊息。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.important.enumDescription": "列印重要的診斷訊息。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.markdownDescription": "控制哪些訊息要從偵錯工具的 Dispatcher 列印到輸出視窗。如果未指定,除非啟用其中一個詳細記錄設定 (`debugEngineAPITracing`、`debugRuntimeEventTracing`、`expressionEvaluationTracing` 或 `startDebuggingTracing`),其中的案例會預設變更為 `normal`,否則這會預設為 `none`。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.none.enumDescription": "不要列印其他診斷訊息。", + "generateOptionsSchema.logging.diagnosticsLog.dispatcherMessages.normal.enumDescription": "列印所有非詳細診斷訊息。", + "generateOptionsSchema.logging.diagnosticsLog.expressionEvaluationTracing.markdownDescription": "判斷是否應該為運算式評估啟用詳細追蹤的旗標。此選項預設為 `false`。", + "generateOptionsSchema.logging.diagnosticsLog.protocolMessages.markdownDescription": "判斷 C# 偵錯工具與 UI 之間交換的 DAP 通訊協定訊息是否應該記錄到輸出視窗的旗標。此選項預設為 `false`。", + "generateOptionsSchema.logging.diagnosticsLog.startDebuggingTracing.markdownDescription": "用來判斷是否應該為開始偵錯啟用詳細追蹤的旗標。此選項預設為 `false`。", + "generateOptionsSchema.logging.elapsedTiming.markdownDescription": "若為 true,通訊協定訊息記錄將包含 `adapterElapsedTime` 和 `engineElapsedTime` 屬性,以指出要求所花費的時間量 (以微秒為單位)。此選項預設為 `false`。", + "generateOptionsSchema.logging.engineLogging.deprecationMessage": "設定 'logging.engineLogging' 已被取代,以支援 'logging.diagnosticsLog.protocolMessages'。", "generateOptionsSchema.logging.exceptions.markdownDescription": "判斷是否應將例外狀況訊息記錄到輸出視窗的旗標。此選項預設為 'true'。", "generateOptionsSchema.logging.moduleLoad.markdownDescription": "判斷是否應將模組載入事件記錄到輸出視窗的旗標。此選項預設為 'true'。", "generateOptionsSchema.logging.processExit.markdownDescription": "控制是否在目標進程結束或偵錯停止時記錄訊息。此選項預設為 'true'。", @@ -138,7 +194,7 @@ "generateOptionsSchema.symbolOptions.moduleFilter.mode.loadOnlyIncluded.enumDescription": "請勿嘗試載入任何模組的符號,除非其位於 'includedModules' 陣列中,或包含在 'includeSymbolsNextToModules' 設定中。", "generateOptionsSchema.symbolOptions.searchMicrosoftSymbolServer.description": "如果是 'true',則會將 Microsoft 符號伺服器 (https​://msdl.microsoft.com​/download/symbols) 新增至符號搜尋路徑。若未指定,這個選項會預設為 'false'。", "generateOptionsSchema.symbolOptions.searchNuGetOrgSymbolServer.description": "如果是 'true',則會將 NuGet.org 符號伺服器 (https​://symbols.nuget.org​/download/symbols) 新增至符號搜尋路徑。若未指定,這個選項會預設為 'false'。", - "generateOptionsSchema.symbolOptions.searchPaths.description": "符號陣列伺服器 URL (範例: http​://MyExampleSymbolServer) 或目錄 (範例: /build/symbols) 搜尋 .pdb 檔案。除了預設位置 (位於模組旁和 pdb 原先放置的路徑),也會搜尋這些目錄。", + "generateOptionsSchema.symbolOptions.searchPaths.description": "符號陣列伺服器 URL (example: http​://MyExampleSymbolServer) 或目錄 (範例: /build/symbols) 搜尋 .pdb 檔案。除了預設位置 (位於模組旁和 pdb 原先放置的路徑),也會搜尋這些目錄。", "generateOptionsSchema.targetArchitecture.markdownDescription": "[僅支援在局部 macOS 偵錯]\r\n\r\n偵錯程式的架構。除非設定此參數,否則會自動偵測到此情況。允許的值為 'x86_64' 或 'arm64'。", "generateOptionsSchema.targetOutputLogPath.description": "設定時,目標應用程式寫入 stdout 和 stderr 的文字 (例如: Console.WriteLine) 將會儲存到指定的檔案。如果主控台設定為 internalConsole 以外的項目,則會略過此選項。例如 '${workspaceFolder}/out.txt'", "viewsWelcome.debug.contents": "[為組建和偵錯產生 C# 資產](command:dotnet.generateAssets)\r\n\r\n若要深入了解 launch.json,請參閱[為 C# 偵錯設定 launch.json](https://aka.ms/VSCode-CS-LaunchJson)(英文)。" diff --git a/server/ServerDownload.csproj b/server/ServerDownload.csproj index 3d88b952a..bde703f88 100644 --- a/server/ServerDownload.csproj +++ b/server/ServerDownload.csproj @@ -20,7 +20,7 @@ - + \ No newline at end of file diff --git a/src/common.ts b/src/common.ts index 313222947..6e4d062bf 100644 --- a/src/common.ts +++ b/src/common.ts @@ -186,21 +186,21 @@ export function convertNativePathToPosix(pathString: string): string { } /** - * This function checks to see if a subfolder is part of folder. + * This function checks to see if a subfolder is part of a parent folder. * - * Assumes subfolder and folder are absolute paths and have consistent casing. + * Assumes subfolder and parent folder are absolute paths and have consistent casing. * - * @param subfolder subfolder to check if it is part of the folder parameter - * @param folder folder to check aganist + * @param subfolder subfolder to check if it is part of the parent folder parameter + * @param parentFolder folder to check aganist */ -export function isSubfolderOf(subfolder: string, folder: string): boolean { +export function isSubfolderOf(subfolder: string, parentFolder: string): boolean { const subfolderArray: string[] = subfolder.split(path.sep); - const folderArray: string[] = folder.split(path.sep); + const parentFolderArray: string[] = parentFolder.split(path.sep); // Check to see that every sub directory in subfolder exists in folder. return ( - subfolderArray.length <= folderArray.length && - subfolderArray.every((subpath, index) => folderArray[index] === subpath) + parentFolderArray.length <= subfolder.length && + parentFolderArray.every((subpath, index) => subfolderArray[index] === subpath) ); } @@ -226,3 +226,9 @@ export function findPowerShell(): string | undefined { } } } + +export function isNotNull(value: T): asserts value is NonNullable { + if (value === null || value === undefined) { + throw new Error('value is null or undefined.'); + } +} diff --git a/src/coreclrDebug/activate.ts b/src/coreclrDebug/activate.ts index f2edfa39e..1d419d882 100644 --- a/src/coreclrDebug/activate.ts +++ b/src/coreclrDebug/activate.ts @@ -16,23 +16,20 @@ import { import { EventStream } from '../eventStream'; import { getRuntimeDependencyPackageWithId } from '../tools/runtimeDependencyPackageUtils'; import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { Options } from '../shared/options'; import { RemoteAttachPicker } from '../features/processPicker'; import CompositeDisposable from '../compositeDisposable'; import { BaseVsDbgConfigurationProvider } from '../shared/configurationProvider'; -import OptionProvider from '../shared/observers/optionProvider'; +import { omnisharpOptions } from '../shared/options'; export async function activate( thisExtension: vscode.Extension, context: vscode.ExtensionContext, platformInformation: PlatformInformation, eventStream: EventStream, - csharpOutputChannel: vscode.OutputChannel, - optionProvider: OptionProvider + csharpOutputChannel: vscode.OutputChannel ) { const disposables = new CompositeDisposable(); - const options: Options = optionProvider.GetLatestOptions(); const debugUtil = new CoreClrDebugUtil(context.extensionPath); if (!CoreClrDebugUtil.existsSync(debugUtil.debugAdapterDir())) { @@ -48,7 +45,7 @@ export async function activate( showInstallErrorMessage(eventStream); } } else if (!CoreClrDebugUtil.existsSync(debugUtil.installCompleteFilePath())) { - completeDebuggerInstall(debugUtil, platformInformation, eventStream, options); + completeDebuggerInstall(debugUtil, platformInformation, eventStream); } // register process picker for attach for legacy configurations. @@ -86,14 +83,13 @@ export async function activate( platformInformation, eventStream, thisExtension.packageJSON, - thisExtension.extensionPath, - options + thisExtension.extensionPath ); /** 'clr' type does not have a intial configuration provider, but we need to register it to support the common debugger features listed in {@link BaseVsDbgConfigurationProvider} */ context.subscriptions.push( vscode.debug.registerDebugConfigurationProvider( 'clr', - new BaseVsDbgConfigurationProvider(platformInformation, optionProvider, csharpOutputChannel) + new BaseVsDbgConfigurationProvider(platformInformation, csharpOutputChannel) ) ); disposables.add(vscode.debug.registerDebugAdapterDescriptorFactory('coreclr', factory)); @@ -155,11 +151,10 @@ async function checkIsValidArchitecture( async function completeDebuggerInstall( debugUtil: CoreClrDebugUtil, platformInformation: PlatformInformation, - eventStream: EventStream, - options: Options + eventStream: EventStream ): Promise { try { - await debugUtil.checkDotNetCli(options.omnisharpOptions.dotNetCliPaths); + await debugUtil.checkDotNetCli(omnisharpOptions.dotNetCliPaths); const isValidArchitecture = await checkIsValidArchitecture(platformInformation, eventStream); if (!isValidArchitecture) { eventStream.post(new DebuggerNotInstalledFailure()); @@ -226,8 +221,7 @@ export class DebugAdapterExecutableFactory implements vscode.DebugAdapterDescrip private readonly platformInfo: PlatformInformation, private readonly eventStream: EventStream, private readonly packageJSON: any, - private readonly extensionPath: string, - private readonly options: Options + private readonly extensionPath: string ) {} async createDebugAdapterDescriptor( @@ -267,12 +261,7 @@ export class DebugAdapterExecutableFactory implements vscode.DebugAdapterDescrip } // install.complete does not exist, check dotnetCLI to see if we can complete. else if (!CoreClrDebugUtil.existsSync(util.installCompleteFilePath())) { - const success = await completeDebuggerInstall( - this.debugUtil, - this.platformInfo, - this.eventStream, - this.options - ); + const success = await completeDebuggerInstall(this.debugUtil, this.platformInfo, this.eventStream); if (!success) { this.eventStream.post(new DebuggerNotInstalledFailure()); throw new Error( @@ -288,7 +277,7 @@ export class DebugAdapterExecutableFactory implements vscode.DebugAdapterDescrip // use the executable specified in the package.json if it exists or determine it based on some other information (e.g. the session) if (!executable) { - const dotNetInfo = await getDotnetInfo(this.options.omnisharpOptions.dotNetCliPaths); + const dotNetInfo = await getDotnetInfo(omnisharpOptions.dotNetCliPaths); const targetArchitecture = getTargetArchitecture( this.platformInfo, _session.configuration.targetArchitecture, @@ -321,21 +310,3 @@ export class DebugAdapterExecutableFactory implements vscode.DebugAdapterDescrip return executable; } } - -let _brokeredServicePipeName: string | undefined; - -/** - * Initialize brokered service pipe name from C# dev kit, if available. - * - * @param csDevKitPipeName Activated brokered service pipe name activated by {@link CSharpDevKitExports}. - */ -export function initializeBrokeredServicePipeName(csDevKitPipeName: string) { - _brokeredServicePipeName = csDevKitPipeName; -} - -/** - * Fetch the brokered service pipe name from C# dev kit, if available. - */ -export function getBrokeredServicePipeName(): string | undefined { - return _brokeredServicePipeName; -} diff --git a/src/coreclrDebug/provisionalDebugSessionTracker.ts b/src/coreclrDebug/provisionalDebugSessionTracker.ts new file mode 100644 index 000000000..28bf067bd --- /dev/null +++ b/src/coreclrDebug/provisionalDebugSessionTracker.ts @@ -0,0 +1,93 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; + +/** + * This tracks a debug session until C# dev kit is loaded (if present) and STOPS tracking any existing + * debug session after C# dev kit is loaded. + * The idea is to avoid a race condition if a debugging session starts before C# dev kit is initialized, + * since the brokered service pipe name will be sent with a 'launch' command. + * If the extension loads during an existing session, rather than not initializing any C# dev kit services (such as hot reload), + * this sends a custom request to the engine with the brokered service pipe name in order to initialize it. + */ +export class ProvisionalDebugSessionTracker { + private _sessions: Set | undefined = new Set(); + + private _onDidStartDebugSession: vscode.Disposable | undefined; + private _onDidTerminateDebugSession: vscode.Disposable | undefined; + + private _brokeredServicePipeName: string | undefined; + + /** + * Initializes the debug session handlers. + */ + initializeDebugSessionHandlers(context: vscode.ExtensionContext): void { + this._onDidStartDebugSession = vscode.debug.onDidStartDebugSession(this.onDidStartDebugSession.bind(this)); + + this._onDidTerminateDebugSession = vscode.debug.onDidTerminateDebugSession((session: vscode.DebugSession) => { + this.onDidTerminateDebugSession(session); + }); + + context.subscriptions.push(this._onDidStartDebugSession); + context.subscriptions.push(this._onDidTerminateDebugSession); + } + + /** + * Tracks a debug session until it is terminated. + * @param session Debug session. + */ + onDidStartDebugSession(session: vscode.DebugSession): void { + if (session.type !== 'coreclr') { + return; + } + + this._sessions?.add(session); + } + + /** + * Notifies that a debug session has been terminated. + */ + onDidTerminateDebugSession(session: vscode.DebugSession): void { + this._sessions?.delete(session); + } + + /** + * If there is any active debug session, this notifies the engine that csdevkit was loaded. + * @param csDevKitPipeName Brokered service pipe name activated by {@link CSharpDevKitExports}. + */ + async onCsDevKitInitialized(csDevKitPipeName: string): Promise { + this._brokeredServicePipeName = csDevKitPipeName; + + const sessions = this._sessions; + if (sessions != undefined) { + // Debugging session already started, send a custom DAP request to the engine. + sessions.forEach((s) => s.customRequest('initializeBrokeredServicePipeName', csDevKitPipeName)); + } + + // Since C# dev kit was initialized, we no longer need to track debugging sessions. + this.cleanup(); + } + + /** + * Fetches the brokered service pipe name from C# dev kit, if available. + */ + getBrokeredServicePipeName(): string | undefined { + return this._brokeredServicePipeName; + } + + /** + * No longer tracks any debugging session going forward. + */ + cleanup(): void { + this._sessions?.clear(); + this._sessions = undefined; + + this._onDidStartDebugSession?.dispose(); + this._onDidTerminateDebugSession?.dispose(); + } +} + +export const debugSessionTracker = new ProvisionalDebugSessionTracker(); diff --git a/src/csharpExtensionExports.ts b/src/csharpExtensionExports.ts index 6613aab12..35e85b615 100644 --- a/src/csharpExtensionExports.ts +++ b/src/csharpExtensionExports.ts @@ -9,6 +9,7 @@ import { EventStream } from './eventStream'; import TestManager from './features/dotnetTest'; import { GlobalBrokeredServiceContainer } from '@microsoft/servicehub-framework'; import { RequestType } from 'vscode-languageclient/node'; +import { LanguageServerEvents } from './lsptoolshost/languageServerEvents'; export interface OmnisharpExtensionExports { initializationFinished: () => Promise; @@ -32,4 +33,5 @@ export interface CSharpExtensionExperimentalExports { params: Params, token: vscode.CancellationToken ) => Promise; + languageServerEvents: LanguageServerEvents; } diff --git a/src/features/codeActionProvider.ts b/src/features/codeActionProvider.ts index 636f71bbe..5ab024d14 100644 --- a/src/features/codeActionProvider.ts +++ b/src/features/codeActionProvider.ts @@ -9,9 +9,9 @@ import AbstractProvider from './abstractProvider'; import * as protocol from '../omnisharp/protocol'; import * as serverUtils from '../omnisharp/utils'; import CompositeDisposable from '../compositeDisposable'; -import OptionProvider from '../shared/observers/optionProvider'; import { LanguageMiddlewareFeature } from '../omnisharp/languageMiddlewareFeature'; import { buildEditForResponse } from '../omnisharp/fileOperationsResponseEditBuilder'; +import { omnisharpOptions } from '../shared/options'; export default class OmniSharpCodeActionProvider extends AbstractProvider @@ -19,11 +19,7 @@ export default class OmniSharpCodeActionProvider { private _commandId: string; - constructor( - server: OmniSharpServer, - private optionProvider: OptionProvider, - languageMiddlewareFeature: LanguageMiddlewareFeature - ) { + constructor(server: OmniSharpServer, languageMiddlewareFeature: LanguageMiddlewareFeature) { super(server, languageMiddlewareFeature); this._commandId = 'omnisharp.runCodeAction'; const registerCommandDisposable = vscode.commands.registerCommand(this._commandId, this._runCodeAction, this); @@ -36,8 +32,7 @@ export default class OmniSharpCodeActionProvider context: vscode.CodeActionContext, token: vscode.CancellationToken ): Promise { - const options = this.optionProvider.GetLatestOptions(); - if (options.omnisharpOptions.disableCodeActions) { + if (omnisharpOptions.disableCodeActions) { return; } diff --git a/src/features/codeLensProvider.ts b/src/features/codeLensProvider.ts index 91ebe1310..120faad6f 100644 --- a/src/features/codeLensProvider.ts +++ b/src/features/codeLensProvider.ts @@ -9,9 +9,8 @@ import * as vscode from 'vscode'; import { toLocation } from '../omnisharp/typeConversion'; import AbstractProvider from './abstractProvider'; import { OmniSharpServer } from '../omnisharp/server'; -import { Options } from '../shared/options'; +import { omnisharpOptions } from '../shared/options'; import TestManager from './dotnetTest'; -import OptionProvider from '../shared/observers/optionProvider'; import Structure = protocol.V2.Structure; import SymbolKinds = protocol.V2.SymbolKinds; @@ -79,7 +78,6 @@ export default class OmniSharpCodeLensProvider extends AbstractProvider implemen constructor( server: OmniSharpServer, testManager: TestManager, - private optionProvider: OptionProvider, languageMiddlewareFeature: LanguageMiddlewareFeature ) { super(server, languageMiddlewareFeature); @@ -89,15 +87,14 @@ export default class OmniSharpCodeLensProvider extends AbstractProvider implemen document: vscode.TextDocument, token: vscode.CancellationToken ): Promise { - const options = this.optionProvider.GetLatestOptions(); - if (!options.omnisharpOptions.showReferencesCodeLens && !options.omnisharpOptions.showTestsCodeLens) { + if (!omnisharpOptions.showReferencesCodeLens && !omnisharpOptions.showTestsCodeLens) { return []; } try { const response = await serverUtils.codeStructure(this._server, { FileName: document.fileName }, token); if (response && response.Elements) { - return createCodeLenses(response.Elements, document.fileName, options); + return createCodeLenses(response.Elements, document.fileName); } } catch (error) { /* empty */ @@ -207,11 +204,11 @@ export default class OmniSharpCodeLensProvider extends AbstractProvider implemen } } -function createCodeLenses(elements: Structure.CodeElement[], fileName: string, options: Options): vscode.CodeLens[] { +function createCodeLenses(elements: Structure.CodeElement[], fileName: string): vscode.CodeLens[] { const results: vscode.CodeLens[] = []; Structure.walkCodeElements(elements, (element) => { - const codeLenses = createCodeLensesForElement(element, fileName, options); + const codeLenses = createCodeLensesForElement(element, fileName); results.push(...codeLenses); }); @@ -219,21 +216,17 @@ function createCodeLenses(elements: Structure.CodeElement[], fileName: string, o return results; } -function createCodeLensesForElement( - element: Structure.CodeElement, - fileName: string, - options: Options -): vscode.CodeLens[] { +function createCodeLensesForElement(element: Structure.CodeElement, fileName: string): vscode.CodeLens[] { const results: vscode.CodeLens[] = []; - if (options.omnisharpOptions.showReferencesCodeLens && isValidElementForReferencesCodeLens(element, options)) { + if (omnisharpOptions.showReferencesCodeLens && isValidElementForReferencesCodeLens(element)) { const range = element.Ranges[SymbolRangeNames.Name]; if (range) { results.push(new ReferencesCodeLens(range, fileName)); } } - if (options.omnisharpOptions.showTestsCodeLens) { + if (omnisharpOptions.showTestsCodeLens) { if (element.Kind === SymbolKinds.Method) { const test = getTest(element); if (test !== undefined) { @@ -312,7 +305,7 @@ const filteredSymbolNames: { [name: string]: boolean } = { GetEnumerator: true, }; -function isValidElementForReferencesCodeLens(element: Structure.CodeElement, options: Options): boolean { +function isValidElementForReferencesCodeLens(element: Structure.CodeElement): boolean { if (element.Kind === SymbolKinds.Namespace) { return false; } @@ -321,7 +314,7 @@ function isValidElementForReferencesCodeLens(element: Structure.CodeElement, opt return false; } - if (options.omnisharpOptions.filteredSymbolsCodeLens.includes(element.Name)) { + if (omnisharpOptions.filteredSymbolsCodeLens.includes(element.Name)) { return false; } diff --git a/src/features/commands.ts b/src/features/commands.ts index 46e64e158..f57ecd8b2 100644 --- a/src/features/commands.ts +++ b/src/features/commands.ts @@ -23,7 +23,6 @@ import { import { EventStream } from '../eventStream'; import { PlatformInformation } from '../shared/platform'; import CompositeDisposable from '../compositeDisposable'; -import OptionProvider from '../shared/observers/optionProvider'; import reportIssue from '../shared/reportIssue'; import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; @@ -35,20 +34,13 @@ export default function registerCommands( server: OmniSharpServer, platformInfo: PlatformInformation, eventStream: EventStream, - optionProvider: OptionProvider, monoResolver: IHostExecutableResolver, dotnetResolver: IHostExecutableResolver, workspaceInformationProvider: IWorkspaceDebugInformationProvider ): CompositeDisposable { const disposable = new CompositeDisposable(); - disposable.add( - vscode.commands.registerCommand('o.restart', async () => restartOmniSharp(context, server, optionProvider)) - ); - disposable.add( - vscode.commands.registerCommand('o.pickProjectAndStart', async () => - pickProjectAndStart(server, optionProvider) - ) - ); + disposable.add(vscode.commands.registerCommand('o.restart', async () => restartOmniSharp(context, server))); + disposable.add(vscode.commands.registerCommand('o.pickProjectAndStart', async () => pickProjectAndStart(server))); disposable.add(vscode.commands.registerCommand('o.showOutput', () => eventStream.post(new ShowOmniSharpChannel()))); disposable.add( @@ -77,11 +69,9 @@ export default function registerCommands( disposable.add( vscode.commands.registerCommand('csharp.reportIssue', async () => reportIssue( - vscode, context.extension.packageJSON.version, getDotnetInfo, platformInfo.isValidPlatformForMono(), - optionProvider.GetLatestOptions(), dotnetResolver, monoResolver ) @@ -90,31 +80,23 @@ export default function registerCommands( disposable.add( vscode.commands.registerCommand('csharp.showDecompilationTerms', async () => - showDecompilationTerms(context, server, optionProvider) + showDecompilationTerms(context, server) ) ); return new CompositeDisposable(disposable); } -async function showDecompilationTerms( - context: vscode.ExtensionContext, - server: OmniSharpServer, - optionProvider: OptionProvider -) { +async function showDecompilationTerms(context: vscode.ExtensionContext, server: OmniSharpServer) { // Reset the decompilation authorization so the user will be prompted on restart. resetDecompilationAuthorization(context); - await restartOmniSharp(context, server, optionProvider); + await restartOmniSharp(context, server); } -async function restartOmniSharp( - context: vscode.ExtensionContext, - server: OmniSharpServer, - optionProvider: OptionProvider -) { +async function restartOmniSharp(context: vscode.ExtensionContext, server: OmniSharpServer) { // Update decompilation authorization. - server.decompilationAuthorized = await getDecompilationAuthorization(context, optionProvider); + server.decompilationAuthorized = await getDecompilationAuthorization(context); if (server.isRunning()) { server.restart(); @@ -123,9 +105,8 @@ async function restartOmniSharp( } } -async function pickProjectAndStart(server: OmniSharpServer, optionProvider: OptionProvider): Promise { - const options = optionProvider.GetLatestOptions(); - return findLaunchTargets(options).then(async (targets) => { +async function pickProjectAndStart(server: OmniSharpServer): Promise { + return findLaunchTargets().then(async (targets) => { const currentPath = server.getSolutionPathOrFolder(); if (currentPath) { for (const target of targets) { diff --git a/src/features/diagnosticsProvider.ts b/src/features/diagnosticsProvider.ts index 620a01dff..2e56a505e 100644 --- a/src/features/diagnosticsProvider.ts +++ b/src/features/diagnosticsProvider.ts @@ -13,11 +13,11 @@ import CompositeDisposable from '../compositeDisposable'; import { IDisposable } from '../disposable'; import { isVirtualCSharpDocument } from './virtualDocumentTracker'; import { TextDocument } from '../vscodeAdapter'; -import OptionProvider from '../shared/observers/optionProvider'; import { Subject, Subscription } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; import { BackgroundDiagnosticStatus } from '../omnisharp/protocol'; import { LanguageMiddlewareFeature } from '../omnisharp/languageMiddlewareFeature'; +import { omnisharpOptions } from '../shared/options'; export class Advisor { private _disposable: CompositeDisposable; @@ -25,7 +25,7 @@ export class Advisor { private _packageRestoreCounter = 0; private _projectSourceFileCounts: { [path: string]: number } = Object.create(null); - constructor(server: OmniSharpServer, private optionProvider: OptionProvider) { + constructor(server: OmniSharpServer) { this._server = server; const d1 = server.onProjectChange(this._onProjectChange, this); @@ -93,8 +93,7 @@ export class Advisor { } private _isOverFileLimit(): boolean { - const opts = this.optionProvider.GetLatestOptions(); - const fileLimit = opts.omnisharpOptions.maxProjectFileCountForDiagnosticAnalysis; + const fileLimit = omnisharpOptions.maxProjectFileCountForDiagnosticAnalysis; if (fileLimit > 0) { let sourceFileCount = 0; for (const key in this._projectSourceFileCounts) { @@ -111,10 +110,9 @@ export class Advisor { export default function reportDiagnostics( server: OmniSharpServer, advisor: Advisor, - languageMiddlewareFeature: LanguageMiddlewareFeature, - options: OptionProvider + languageMiddlewareFeature: LanguageMiddlewareFeature ): IDisposable { - return new OmniSharpDiagnosticsProvider(server, advisor, languageMiddlewareFeature, options); + return new OmniSharpDiagnosticsProvider(server, advisor, languageMiddlewareFeature); } class OmniSharpDiagnosticsProvider extends AbstractSupport { @@ -130,8 +128,7 @@ class OmniSharpDiagnosticsProvider extends AbstractSupport { constructor( server: OmniSharpServer, validationAdvisor: Advisor, - languageMiddlewareFeature: LanguageMiddlewareFeature, - options: OptionProvider + languageMiddlewareFeature: LanguageMiddlewareFeature ) { super(server, languageMiddlewareFeature); @@ -153,7 +150,7 @@ class OmniSharpDiagnosticsProvider extends AbstractSupport { .getConfiguration('csharp') .get('suppressHiddenDiagnostics', true); - if (!options.GetLatestOptions().omnisharpOptions.enableLspDriver) { + if (!omnisharpOptions.enableLspDriver) { this._subscriptions.push( this._validateCurrentDocumentPipe .pipe(debounceTime(750)) diff --git a/src/features/dotnetTest.ts b/src/features/dotnetTest.ts index 5d06533eb..040e20ffa 100644 --- a/src/features/dotnetTest.ts +++ b/src/features/dotnetTest.ts @@ -34,7 +34,7 @@ import LaunchConfiguration from './launchConfiguration'; import Disposable from '../disposable'; import CompositeDisposable from '../compositeDisposable'; import { LanguageMiddlewareFeature } from '../omnisharp/languageMiddlewareFeature'; -import OptionProvider from '../shared/observers/optionProvider'; +import { commonOptions } from '../shared/options'; const TelemetryReportingDelay = 2 * 60 * 1000; // two minutes @@ -45,7 +45,6 @@ export default class TestManager extends AbstractProvider { private _eventStream: EventStream; constructor( - private optionProvider: OptionProvider, server: OmniSharpServer, eventStream: EventStream, languageMiddlewareFeature: LanguageMiddlewareFeature @@ -233,7 +232,7 @@ export default class TestManager extends AbstractProvider { } private _getRunSettings(filename: string): string | undefined { - const testSettingsPath = this.optionProvider.GetLatestOptions().omnisharpOptions.testRunSettings; + const testSettingsPath = commonOptions.runSettingsPath; if (testSettingsPath.length === 0) { return undefined; } @@ -393,7 +392,7 @@ export default class TestManager extends AbstractProvider { environmentVariables: Map, debuggerEventsPipeName: string ) { - const debugOptions = this.optionProvider.GetLatestOptions().commonOptions.unitTestDebuggingOptions; + const debugOptions = commonOptions.unitTestDebuggingOptions; // Get the initial set of options from the workspace setting let result: any; diff --git a/src/features/semanticTokensProvider.ts b/src/features/semanticTokensProvider.ts index 5f2340a1f..87cbc54da 100644 --- a/src/features/semanticTokensProvider.ts +++ b/src/features/semanticTokensProvider.ts @@ -10,8 +10,8 @@ import * as serverUtils from '../omnisharp/utils'; import { createRequest, toRange2 } from '../omnisharp/typeConversion'; import AbstractProvider from './abstractProvider'; import { OmniSharpServer } from '../omnisharp/server'; -import OptionProvider from '../shared/observers/optionProvider'; import { LanguageMiddlewareFeature } from '../omnisharp/languageMiddlewareFeature'; +import { omnisharpOptions } from '../shared/options'; // The default TokenTypes defined by VS Code https://github.com/microsoft/vscode/blob/master/src/vs/platform/theme/common/tokenClassificationRegistry.ts#L393 enum DefaultTokenType { @@ -162,11 +162,7 @@ export default class OmniSharpSemanticTokensProvider extends AbstractProvider implements vscode.DocumentSemanticTokensProvider, vscode.DocumentRangeSemanticTokensProvider { - constructor( - server: OmniSharpServer, - private optionProvider: OptionProvider, - languageMiddlewareFeature: LanguageMiddlewareFeature - ) { + constructor(server: OmniSharpServer, languageMiddlewareFeature: LanguageMiddlewareFeature) { super(server, languageMiddlewareFeature); } @@ -209,8 +205,7 @@ export default class OmniSharpSemanticTokensProvider return null; } - const options = this.optionProvider.GetLatestOptions(); - if (!options.omnisharpOptions.useSemanticHighlighting) { + if (!omnisharpOptions.useSemanticHighlighting) { return null; } diff --git a/src/features/workspaceSymbolProvider.ts b/src/features/workspaceSymbolProvider.ts index 3cb114a6f..53f576ac0 100644 --- a/src/features/workspaceSymbolProvider.ts +++ b/src/features/workspaceSymbolProvider.ts @@ -5,18 +5,17 @@ import AbstractSupport from './abstractProvider'; import { OmniSharpServer } from '../omnisharp/server'; -import OptionProvider from '../shared/observers/optionProvider'; import * as protocol from '../omnisharp/protocol'; import * as serverUtils from '../omnisharp/utils'; import { toRange } from '../omnisharp/typeConversion'; import { CancellationToken, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Location } from 'vscode'; import { LanguageMiddlewareFeature } from '../omnisharp/languageMiddlewareFeature'; import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider'; +import { omnisharpOptions } from '../shared/options'; export default class OmniSharpWorkspaceSymbolProvider extends AbstractSupport implements WorkspaceSymbolProvider { constructor( server: OmniSharpServer, - private optionProvider: OptionProvider, languageMiddlewareFeature: LanguageMiddlewareFeature, private sourceGeneratedDocumentProvider: SourceGeneratedDocumentProvider ) { @@ -24,9 +23,10 @@ export default class OmniSharpWorkspaceSymbolProvider extends AbstractSupport im } public async provideWorkspaceSymbols(search: string, token: CancellationToken): Promise { - const options = this.optionProvider.GetLatestOptions().omnisharpOptions; - const minFilterLength = options.minFindSymbolsFilterLength > 0 ? options.minFindSymbolsFilterLength : undefined; - const maxItemsToReturn = options.maxFindSymbolsItems > 0 ? options.maxFindSymbolsItems : undefined; + const minFindSymbolsFilterLength = omnisharpOptions.minFindSymbolsFilterLength; + const maxFindSymbolsItems = omnisharpOptions.maxFindSymbolsItems; + const minFilterLength = minFindSymbolsFilterLength > 0 ? minFindSymbolsFilterLength : undefined; + const maxItemsToReturn = maxFindSymbolsItems > 0 ? maxFindSymbolsItems : undefined; if (minFilterLength !== undefined && search.length < minFilterLength) { return []; diff --git a/src/json.ts b/src/json.ts index 93804fb6d..6081c187e 100644 --- a/src/json.ts +++ b/src/json.ts @@ -3,212 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -const enum CharCode { - asterisk = 0x2a, // * - backSlash = 0x5c, // \ - closeBrace = 0x7d, // } - closeBracket = 0x5d, // ] - comma = 0x2c, // , - doubleQuote = 0x22, // " - slash = 0x2f, // / - - byteOrderMark = 0xfeff, - - // line terminator characters (see https://en.wikipedia.org/wiki/Newline#Unicode) - carriageReturn = 0x0d, - formFeed = 0x0c, - lineFeed = 0x0a, - lineSeparator = 0x2028, - nextLine = 0x85, - paragraphSeparator = 0x2029, - verticalTab = 0x0b, - - // whitespace characters (see https://en.wikipedia.org/wiki/Whitespace_character#Unicode) - tab = 0x09, - space = 0x20, - nonBreakingSpace = 0xa0, - ogham = 0x1680, - enQuad = 0x2000, - emQuad = 0x2001, - enSpace = 0x2002, - emSpace = 0x2003, - threePerEmSpace = 0x2004, - fourPerEmSpace = 0x2005, - sixPerEmSpace = 0x2006, - figureSpace = 0x2007, - punctuationSpace = 0x2008, - thinSpace = 0x2009, - hairSpace = 0x200a, - zeroWidthSpace = 0x200b, - narrowNoBreakSpace = 0x202f, - mathematicalSpace = 0x205f, - ideographicSpace = 0x3000, -} - -function isLineBreak(code: number) { - return ( - code === CharCode.lineFeed || - code === CharCode.carriageReturn || - code === CharCode.verticalTab || - code === CharCode.formFeed || - code === CharCode.lineSeparator || - code === CharCode.paragraphSeparator - ); -} - -function isWhitespace(code: number) { - return ( - code === CharCode.space || - code === CharCode.tab || - code === CharCode.lineFeed || - code === CharCode.verticalTab || - code === CharCode.formFeed || - code === CharCode.carriageReturn || - code === CharCode.nextLine || - code === CharCode.nonBreakingSpace || - code === CharCode.ogham || - (code >= CharCode.enQuad && code <= CharCode.zeroWidthSpace) || - code === CharCode.lineSeparator || - code === CharCode.paragraphSeparator || - code === CharCode.narrowNoBreakSpace || - code === CharCode.mathematicalSpace || - code === CharCode.ideographicSpace || - code === CharCode.byteOrderMark - ); -} - -function cleanJsonText(text: string) { - const parts: string[] = []; - let partStart = 0; - - let index = 0; - const length = text.length; - - function next(): number { - const result = peek(); - index++; - return result; - } - - function peek(offset = 0): number { - return text.charCodeAt(index + offset); - } - - function peekPastWhitespace(): number { - let pos = index; - let code = NaN; - - do { - code = text.charCodeAt(pos); - pos++; - } while (isWhitespace(code)); - - return code; - } - - function scanString() { - while (index < length) { - const code = next(); - - if (code === CharCode.doubleQuote) { - // End of string. We're done - break; - } - - if (code === CharCode.backSlash) { - // Skip escaped character. We don't care about verifying the escape sequence. - // We just don't want to accidentally scan an escaped double-quote as the end of the string. - index++; - } - - if (isLineBreak(code)) { - // string ended unexpectedly - break; - } - } - } - - // eslint-disable-next-line no-constant-condition - while (true) { - const code = next(); - - switch (code) { - // byte-order mark - case CharCode.byteOrderMark: - // We just skip the byte-order mark - parts.push(text.substring(partStart, index - 1)); - partStart = index; - break; - - // strings - case CharCode.doubleQuote: - scanString(); - break; - - // comments - case CharCode.slash: - // Single-line comment - if (peek() === CharCode.slash) { - // Be careful not to include the first slash in the text part. - parts.push(text.substring(partStart, index - 1)); - - // Start after the second slash and scan until a line-break character is encountered. - index++; - while (index < length) { - if (isLineBreak(peek())) { - break; - } - - index++; - } - - partStart = index; - } - - // Multi-line comment - if (peek() === CharCode.asterisk) { - // Be careful not to include the first slash in the text part. - parts.push(text.substring(partStart, index - 1)); - - // Start after the asterisk and scan until a */ is encountered. - index++; - while (index < length) { - if (peek() === CharCode.asterisk && peek(1) === CharCode.slash) { - index += 2; - break; - } - - index++; - } - - partStart = index; - } - - break; - - case CharCode.comma: { - // Ignore trailing commas in object member lists and array element lists - const nextCode = peekPastWhitespace(); - if (nextCode === CharCode.closeBrace || nextCode === CharCode.closeBracket) { - parts.push(text.substring(partStart, index - 1)); - partStart = index; - } - - break; - } - default: - } - - if (index >= length && index > partStart) { - parts.push(text.substring(partStart, length)); - break; - } - } - - return parts.join(''); -} +import { parse } from 'jsonc-parser'; export function tolerantParse(text: string) { - text = cleanJsonText(text); - return JSON.parse(text); + return parse(text); } diff --git a/src/lsptoolshost/commands.ts b/src/lsptoolshost/commands.ts index b70c726a3..b96c40809 100644 --- a/src/lsptoolshost/commands.ts +++ b/src/lsptoolshost/commands.ts @@ -10,13 +10,11 @@ import { RoslynLanguageServer } from './roslynLanguageServer'; import { createLaunchTargetForSolution } from '../shared/launchTarget'; import reportIssue from '../shared/reportIssue'; import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import OptionProvider from '../shared/observers/optionProvider'; import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; export function registerCommands( context: vscode.ExtensionContext, languageServer: RoslynLanguageServer, - optionProvider: OptionProvider, hostExecutableResolver: IHostExecutableResolver, outputChannel: vscode.OutputChannel ) { @@ -31,7 +29,11 @@ export function registerCommands( // so we don't accidentally pass them directly into vscode APIs. context.subscriptions.push(vscode.commands.registerCommand('roslyn.client.peekReferences', peekReferencesCallback)); context.subscriptions.push( - vscode.commands.registerCommand('roslyn.client.completionComplexEdit', completionComplexEdit) + vscode.commands.registerCommand( + 'roslyn.client.completionComplexEdit', + async (uriStr, textEdit, isSnippetString, newOffset) => + completionComplexEdit(uriStr, textEdit, isSnippetString, newOffset, outputChannel) + ) ); context.subscriptions.push( vscode.commands.registerCommand('dotnet.restartServer', async () => restartServer(languageServer)) @@ -42,11 +44,9 @@ export function registerCommands( context.subscriptions.push( vscode.commands.registerCommand('csharp.reportIssue', async () => reportIssue( - vscode, context.extension.packageJSON.version, getDotnetInfo, /*shouldIncludeMonoInfo:*/ false, - optionProvider.GetLatestOptions(), hostExecutableResolver ) ) @@ -99,11 +99,14 @@ async function completionComplexEdit( uriStr: string, textEdit: vscode.TextEdit, isSnippetString: boolean, - newOffset: number + newOffset: number, + outputChannel: vscode.OutputChannel ): Promise { let success = false; const uri = UriConverter.deserialize(uriStr); - const editor = vscode.window.visibleTextEditors.find((editor) => editor.document.uri.path === uri.path); + const editor = vscode.window.visibleTextEditors.find( + (editor) => editor.document.uri.path === uri.path || editor.document.uri.fsPath === uri.fsPath + ); if (editor !== undefined) { const newRange = editor.document.validateRange( @@ -142,7 +145,29 @@ async function completionComplexEdit( } if (!success) { - throw new Error('Failed to make a complex text edit for completion.'); + const componentName = '[roslyn.client.completionComplexEdit]'; + const errorMessage = 'Failed to make a complex text edit for completion.'; + outputChannel.show(); + outputChannel.appendLine(`${componentName} ${errorMessage}`); + + if (editor === undefined) { + outputChannel.appendLine( + `${componentName} Can't find visible document with uri.fsPath: '${uri.fsPath}' and uri.path: '${uri.path}'` + ); + + outputChannel.appendLine(`${componentName} URIs of all visible documents:`); + for (const visibleEditor of vscode.window.visibleTextEditors) { + outputChannel.appendLine( + `${componentName} - uri.fsPath: '${visibleEditor.document.uri.fsPath}' and uri.path: '${visibleEditor.document.uri.path}'` + ); + } + } else { + outputChannel.appendLine( + `${componentName} ${isSnippetString ? 'TextEditor.insertSnippet' : 'workspace.applyEdit'} failed.` + ); + } + + throw new Error(`${componentName} ${errorMessage}`); } } diff --git a/src/lsptoolshost/debugger.ts b/src/lsptoolshost/debugger.ts index 5c7bbc705..afae73b7f 100644 --- a/src/lsptoolshost/debugger.ts +++ b/src/lsptoolshost/debugger.ts @@ -10,22 +10,22 @@ import { IWorkspaceDebugInformationProvider } from '../shared/IWorkspaceDebugInf import { RoslynLanguageServer } from './roslynLanguageServer'; import { RoslynWorkspaceDebugInformationProvider } from './roslynWorkspaceDebugConfigurationProvider'; import { PlatformInformation } from '../shared/platform'; -import OptionProvider from '../shared/observers/optionProvider'; import { ServerStateChange } from './serverStateChange'; import { DotnetConfigurationResolver } from '../shared/dotnetConfigurationProvider'; import { getCSharpDevKit } from '../utils/getCSharpDevKit'; +import { RoslynLanguageServerEvents } from './languageServerEvents'; export function registerDebugger( context: vscode.ExtensionContext, languageServer: RoslynLanguageServer, + languageServerEvents: RoslynLanguageServerEvents, platformInfo: PlatformInformation, - optionProvider: OptionProvider, csharpOutputChannel: vscode.OutputChannel ) { const workspaceInformationProvider: IWorkspaceDebugInformationProvider = - new RoslynWorkspaceDebugInformationProvider(languageServer); + new RoslynWorkspaceDebugInformationProvider(languageServer, csharpOutputChannel); - const disposable = languageServer.registerStateChangeEvent(async (state) => { + const disposable = languageServerEvents.onServerStateChange(async (state) => { if (state === ServerStateChange.ProjectInitializationComplete) { const csharpDevkitExtension = getCSharpDevKit(); if (!csharpDevkitExtension) { @@ -39,7 +39,6 @@ export function registerDebugger( const dotnetWorkspaceConfigurationProvider = new DotnetWorkspaceConfigurationProvider( workspaceInformationProvider, platformInfo, - optionProvider, csharpOutputChannel ); diff --git a/src/lsptoolshost/dotnetRuntimeExtensionResolver.ts b/src/lsptoolshost/dotnetRuntimeExtensionResolver.ts index 7039ef8c5..634155b4c 100644 --- a/src/lsptoolshost/dotnetRuntimeExtensionResolver.ts +++ b/src/lsptoolshost/dotnetRuntimeExtensionResolver.ts @@ -9,13 +9,12 @@ import * as semver from 'semver'; import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation'; import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; import { PlatformInformation } from '../shared/platform'; -import { Options } from '../shared/options'; +import { commonOptions } from '../shared/options'; import { existsSync } from 'fs'; import { CSharpExtensionId } from '../constants/csharpExtensionId'; -import { promisify } from 'util'; -import { exec } from 'child_process'; import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { readFile, realpath } from 'fs/promises'; +import { readFile } from 'fs/promises'; +import { RuntimeInfo } from '../shared/utils/dotnetInfo'; export const DotNetRuntimeVersion = '7.0'; @@ -33,16 +32,16 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver { /** * This is a function instead of a string because the server path can change while the extension is active (when the option changes). */ - private getServerPath: (options: Options, platform: PlatformInformation) => string, + private getServerPath: (platform: PlatformInformation) => string, private channel: vscode.OutputChannel, private extensionPath: string ) {} private hostInfo: HostExecutableInformation | undefined; - async getHostExecutableInfo(options: Options): Promise { - let dotnetRuntimePath = options.commonOptions.dotnetPath; - const serverPath = this.getServerPath(options, this.platformInfo); + async getHostExecutableInfo(): Promise { + let dotnetRuntimePath = commonOptions.dotnetPath; + const serverPath = this.getServerPath(this.platformInfo); // Check if we can find a valid dotnet from dotnet --version on the PATH. if (!dotnetRuntimePath) { @@ -62,7 +61,7 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver { dotnetRuntimePath = path.dirname(dotnetInfo.path); } - const dotnetExecutableName = this.platformInfo.isWindows() ? 'dotnet.exe' : 'dotnet'; + const dotnetExecutableName = this.getDotnetExecutableName(); const dotnetExecutablePath = path.join(dotnetRuntimePath, dotnetExecutableName); if (!existsSync(dotnetExecutablePath)) { throw new Error(`Cannot find dotnet path '${dotnetExecutablePath}'`); @@ -151,39 +150,40 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver { } const coreRuntimeVersions = dotnetInfo.Runtimes['Microsoft.NETCore.App']; - let foundRuntimeVersion = false; - for (const version of coreRuntimeVersions) { + let matchingRuntime: RuntimeInfo | undefined = undefined; + for (const runtime of coreRuntimeVersions) { // We consider a match if the runtime is greater than or equal to the required version since we roll forward. - if (semver.gt(version, requiredRuntimeVersion)) { - foundRuntimeVersion = true; + if (semver.gt(runtime.Version, requiredRuntimeVersion)) { + matchingRuntime = runtime; break; } } - if (!foundRuntimeVersion) { + if (!matchingRuntime) { throw new Error( `No compatible .NET runtime found. Minimum required version is ${this.minimumDotnetRuntimeVersion}.` ); } - // Find the location of the dotnet on path. - const command = this.platformInfo.isWindows() ? 'where' : 'which'; - const whereOutput = await promisify(exec)(`${command} dotnet`); - if (!whereOutput.stdout) { - throw new Error(`Unable to find dotnet from ${command}.`); - } - - // There could be multiple paths output from where. Take the first since that is what we used to run dotnet --info. - const path = whereOutput.stdout.trim().replace(/\r/gm, '').split('\n')[0]; - if (!existsSync(path)) { - throw new Error(`dotnet path does not exist: ${path}`); + // The .NET install layout is a well known structure on all platforms. + // See https://github.com/dotnet/designs/blob/main/accepted/2020/install-locations.md#net-core-install-layout + // + // Therefore we know that the runtime path is always in /shared/ + // and the dotnet executable is always at /dotnet(.exe). + // + // Since dotnet --list-runtimes will always use the real assembly path to output the runtime folder (no symlinks!) + // we know the dotnet executable will be two folders up in the install root. + const runtimeFolderPath = matchingRuntime.Path; + const installFolder = path.dirname(path.dirname(runtimeFolderPath)); + const dotnetExecutablePath = path.join(installFolder, this.getDotnetExecutableName()); + if (!existsSync(dotnetExecutablePath)) { + throw new Error( + `dotnet executable path does not exist: ${dotnetExecutablePath}, dotnet installation may be corrupt.` + ); } this.channel.appendLine(`Using dotnet configured on PATH`); - - // If dotnet is just a symlink, resolve it to the actual executable so - // callers will be able to get the actual directory containing the exe. - return await realpath(path); + return dotnetExecutablePath; } catch (e) { this.channel.appendLine( 'Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime' @@ -236,4 +236,8 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver { throw new Error(`Unknown extension target platform: ${targetPlatform}`); } } + + private getDotnetExecutableName(): string { + return this.platformInfo.isWindows() ? 'dotnet.exe' : 'dotnet'; + } } diff --git a/src/lsptoolshost/fixAllCodeAction.ts b/src/lsptoolshost/fixAllCodeAction.ts new file mode 100644 index 000000000..aa133d73a --- /dev/null +++ b/src/lsptoolshost/fixAllCodeAction.ts @@ -0,0 +1,74 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as RoslynProtocol from './roslynProtocol'; +import { LSPAny } from 'vscode-languageserver-protocol'; +import { RoslynLanguageServer } from './roslynLanguageServer'; +import { URIConverter, createConverter } from 'vscode-languageclient/lib/common/protocolConverter'; +import { UriConverter } from './uriConverter'; + +export function registerCodeActionFixAllCommands( + context: vscode.ExtensionContext, + languageServer: RoslynLanguageServer, + outputChannel: vscode.OutputChannel +) { + context.subscriptions.push( + vscode.commands.registerCommand( + 'roslyn.client.fixAllCodeAction', + async (request): Promise => registerFixAllResolveCodeAction(languageServer, request, outputChannel) + ) + ); +} + +async function registerFixAllResolveCodeAction( + languageServer: RoslynLanguageServer, + codeActionData: any, + outputChannel: vscode.OutputChannel +) { + if (codeActionData) { + const data = codeActionData; + const result = await vscode.window.showQuickPick(data.FixAllFlavors, { + placeHolder: vscode.l10n.t('Pick a fix all scope'), + }); + + await vscode.window.withProgress( + { + location: vscode.ProgressLocation.Notification, + title: vscode.l10n.t('Fix All Code Action'), + cancellable: true, + }, + async (_, token) => { + if (result) { + const fixAllCodeAction: RoslynProtocol.RoslynFixAllCodeAction = { + title: data.UniqueIdentifier, + data: data, + scope: result, + }; + + const response = await languageServer.sendRequest( + RoslynProtocol.CodeActionFixAllResolveRequest.type, + fixAllCodeAction, + token + ); + + if (response.edit) { + const uriConverter: URIConverter = (value: string): vscode.Uri => + UriConverter.deserialize(value); + const protocolConverter = createConverter(uriConverter, true, true); + const fixAllEdit = await protocolConverter.asWorkspaceEdit(response.edit); + if (!(await vscode.workspace.applyEdit(fixAllEdit))) { + const componentName = '[roslyn.client.fixAllCodeAction]'; + const errorMessage = 'Failed to make a fix all edit for completion.'; + outputChannel.show(); + outputChannel.appendLine(`${componentName} ${errorMessage}`); + throw new Error('Tried to insert multiple code action edits, but an error occurred.'); + } + } + } + } + ); + } +} diff --git a/src/lsptoolshost/languageServerEvents.ts b/src/lsptoolshost/languageServerEvents.ts new file mode 100644 index 000000000..ded1687a2 --- /dev/null +++ b/src/lsptoolshost/languageServerEvents.ts @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { ServerStateChange } from './serverStateChange'; +import { IDisposable } from '../disposable'; + +/** + * Defines events that are fired by the language server. + * These events can be consumed to wait for the server to reach a certain state. + */ +export interface LanguageServerEvents { + readonly onServerStateChange: vscode.Event; +} + +/** + * Implementation that fires events when the language server reaches a certain state. + * This is intentionally separate from the language server itself, so consumers can + * register for events without having to know about the specific current state of the language server. + */ +export class RoslynLanguageServerEvents implements LanguageServerEvents, IDisposable { + public readonly onServerStateChangeEmitter = new vscode.EventEmitter(); + + public get onServerStateChange(): vscode.Event { + return this.onServerStateChangeEmitter.event; + } + + dispose(): void { + this.onServerStateChangeEmitter.dispose(); + } +} diff --git a/src/lsptoolshost/onAutoInsert.ts b/src/lsptoolshost/onAutoInsert.ts new file mode 100644 index 000000000..538281bb6 --- /dev/null +++ b/src/lsptoolshost/onAutoInsert.ts @@ -0,0 +1,94 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { UriConverter } from './uriConverter'; + +import { FormattingOptions, TextDocumentIdentifier } from 'vscode-languageclient/node'; +import * as RoslynProtocol from './roslynProtocol'; +import { RoslynLanguageServer } from './roslynLanguageServer'; +import { languageServerOptions } from '../shared/options'; + +export function registerOnAutoInsert(languageServer: RoslynLanguageServer) { + let source = new vscode.CancellationTokenSource(); + vscode.workspace.onDidChangeTextDocument(async (e) => { + if (!languageServerOptions.documentSelector.includes(e.document.languageId)) { + return; + } + + if (e.contentChanges.length > 1 || e.contentChanges.length === 0) { + return; + } + + const change = e.contentChanges[0]; + + if (!change.range.isEmpty) { + return; + } + + const capabilities = await languageServer.getServerCapabilities(); + + if (capabilities._vs_onAutoInsertProvider) { + // Regular expression to match all whitespace characters except the newline character + const changeTrimmed = change.text.replace(/[^\S\n]+/g, ''); + + if (!capabilities._vs_onAutoInsertProvider._vs_triggerCharacters.includes(changeTrimmed)) { + return; + } + + source.cancel(); + source = new vscode.CancellationTokenSource(); + await applyAutoInsertEdit(e, changeTrimmed, languageServer, source.token); + } + }); +} + +async function applyAutoInsertEdit( + e: vscode.TextDocumentChangeEvent, + changeTrimmed: string, + languageServer: RoslynLanguageServer, + token: vscode.CancellationToken +) { + const change = e.contentChanges[0]; + // The server expects the request position to represent the caret position in the text after the change has already been applied. + // We need to calculate what that position would be after the change is applied and send that to the server. + const position = new vscode.Position( + change.range.start.line, + change.range.start.character + (change.text.length - change.rangeLength) + ); + const uri = UriConverter.serialize(e.document.uri); + const textDocument = TextDocumentIdentifier.create(uri); + const formattingOptions = getFormattingOptions(); + const request: RoslynProtocol.OnAutoInsertParams = { + _vs_textDocument: textDocument, + _vs_position: position, + _vs_ch: changeTrimmed, + _vs_options: formattingOptions, + }; + + const response = await languageServer.sendRequest(RoslynProtocol.OnAutoInsertRequest.type, request, token); + if (response) { + const textEdit = response._vs_textEdit; + const startPosition = new vscode.Position(textEdit.range.start.line, textEdit.range.start.character); + const endPosition = new vscode.Position(textEdit.range.end.line, textEdit.range.end.character); + const docComment = new vscode.SnippetString(textEdit.newText); + const code: any = vscode; + const textEdits = [new code.SnippetTextEdit(new vscode.Range(startPosition, endPosition), docComment)]; + const edit = new vscode.WorkspaceEdit(); + edit.set(e.document.uri, textEdits); + + const applied = vscode.workspace.applyEdit(edit); + if (!applied) { + throw new Error('Tried to insert a comment but an error occurred.'); + } + } +} + +function getFormattingOptions(): FormattingOptions { + const editorConfig = vscode.workspace.getConfiguration('editor'); + const tabSize = editorConfig.get('tabSize') ?? 4; + const insertSpaces = editorConfig.get('insertSpaces') ?? true; + return FormattingOptions.create(tabSize, insertSpaces); +} diff --git a/src/lsptoolshost/optionChanges.ts b/src/lsptoolshost/optionChanges.ts index dced750d3..e71fe24ac 100644 --- a/src/lsptoolshost/optionChanges.ts +++ b/src/lsptoolshost/optionChanges.ts @@ -5,12 +5,12 @@ import * as vscode from 'vscode'; import { Observable } from 'rxjs'; -import { CommonOptionsThatTriggerReload, LanguageServerOptionsThatTriggerReload, Options } from '../shared/options'; +import { CommonOptionsThatTriggerReload, LanguageServerOptionsThatTriggerReload } from '../shared/options'; import { HandleOptionChanges, OptionChangeObserver, OptionChanges } from '../shared/observers/optionChangeObserver'; import ShowInformationMessage from '../shared/observers/utils/showInformationMessage'; import Disposable from '../disposable'; -export function registerLanguageServerOptionChanges(optionObservable: Observable): Disposable { +export function registerLanguageServerOptionChanges(optionObservable: Observable): Disposable { const optionChangeObserver: OptionChangeObserver = { getRelevantOptions: () => { return { diff --git a/src/lsptoolshost/razorCommands.ts b/src/lsptoolshost/razorCommands.ts new file mode 100644 index 000000000..52495bb8a --- /dev/null +++ b/src/lsptoolshost/razorCommands.ts @@ -0,0 +1,122 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { RoslynLanguageServer } from './roslynLanguageServer'; +import * as vscode from 'vscode'; +import { + DidChangeTextDocumentNotification, + DidCloseTextDocumentNotification, + DidCloseTextDocumentParams, + DidChangeTextDocumentParams, + DocumentDiagnosticParams, + RequestType, + DocumentDiagnosticRequest, + DocumentDiagnosticReport, + CancellationToken, + CodeAction, + CodeActionParams, + CodeActionRequest, + CodeActionResolveRequest, + CompletionParams, + CompletionRequest, + CompletionResolveRequest, + CompletionItem, +} from 'vscode-languageclient/node'; +import SerializableSimplifyMethodParams from '../razor/src/simplify/serializableSimplifyMethodParams'; +import { TextEdit } from 'vscode-html-languageservice'; +import { SerializableFormatNewFileParams } from '../razor/src/formatNewFile/serializableFormatNewFileParams'; + +// These are commands that are invoked by the Razor extension, and are used to send LSP requests to the Roslyn LSP server +export const roslynDidChangeCommand = 'roslyn.changeRazorCSharp'; +export const roslynDidCloseCommand = 'roslyn.closeRazorCSharp'; +export const roslynPullDiagnosticCommand = 'roslyn.pullDiagnosticRazorCSharp'; +export const provideCodeActionsCommand = 'roslyn.provideCodeActions'; +export const resolveCodeActionCommand = 'roslyn.resolveCodeAction'; +export const provideCompletionsCommand = 'roslyn.provideCompletions'; +export const resolveCompletionsCommand = 'roslyn.resolveCompletion'; +export const provideSemanticTokensRangeCommand = 'roslyn.provideSemanticTokensRange'; +export const roslynSimplifyMethodCommand = 'roslyn.simplifyMethod'; +export const roslynFormatNewFileCommand = 'roslyn.formatNewFile'; +export const razorInitializeCommand = 'razor.initialize'; + +export function registerRazorCommands(context: vscode.ExtensionContext, languageServer: RoslynLanguageServer) { + // Razor will call into us (via command) for generated file didChange/didClose notifications. We'll then forward these + // notifications along to Roslyn. didOpen notifications are handled separately via the vscode.openTextDocument method. + context.subscriptions.push( + vscode.commands.registerCommand(roslynDidChangeCommand, async (notification: DidChangeTextDocumentParams) => { + await languageServer.sendNotification(DidChangeTextDocumentNotification.method, notification); + }) + ); + context.subscriptions.push( + vscode.commands.registerCommand(roslynDidCloseCommand, async (notification: DidCloseTextDocumentParams) => { + await languageServer.sendNotification(DidCloseTextDocumentNotification.method, notification); + }) + ); + context.subscriptions.push( + vscode.commands.registerCommand(roslynPullDiagnosticCommand, async (request: DocumentDiagnosticParams) => { + const diagnosticRequestType = new RequestType( + DocumentDiagnosticRequest.method + ); + return await languageServer.sendRequest(diagnosticRequestType, request, CancellationToken.None); + }) + ); + context.subscriptions.push( + vscode.commands.registerCommand( + roslynSimplifyMethodCommand, + async (request: SerializableSimplifyMethodParams) => { + const simplifyMethodRequestType = new RequestType( + 'roslyn/simplifyMethod' + ); + return await languageServer.sendRequest(simplifyMethodRequestType, request, CancellationToken.None); + } + ) + ); + + const formatNewFileRequestType = new RequestType( + 'roslyn/formatNewFile' + ); + context.subscriptions.push( + vscode.commands.registerCommand( + roslynFormatNewFileCommand, + async (request: SerializableFormatNewFileParams) => { + return await languageServer.sendRequest(formatNewFileRequestType, request, CancellationToken.None); + } + ) + ); + + // The VS Code API for code actions (and the vscode.CodeAction type) doesn't support everything that LSP supports, + // namely the data property, which Razor needs to identify which code actions are on their allow list, so we need + // to expose a command for them to directly invoke our code actions LSP endpoints, rather than use built-in commands. + context.subscriptions.push( + vscode.commands.registerCommand(provideCodeActionsCommand, async (request: CodeActionParams) => { + return await languageServer.sendRequest(CodeActionRequest.type, request, CancellationToken.None); + }) + ); + context.subscriptions.push( + vscode.commands.registerCommand(resolveCodeActionCommand, async (request: CodeAction) => { + return await languageServer.sendRequest(CodeActionResolveRequest.type, request, CancellationToken.None); + }) + ); + + context.subscriptions.push( + vscode.commands.registerCommand(provideCompletionsCommand, async (request: CompletionParams) => { + return await languageServer.sendRequest(CompletionRequest.type, request, CancellationToken.None); + }) + ); + context.subscriptions.push( + vscode.commands.registerCommand(resolveCompletionsCommand, async (request: CompletionItem) => { + return await languageServer.sendRequest(CompletionResolveRequest.type, request, CancellationToken.None); + }) + ); + + // Roslyn is responsible for producing a json file containing information for Razor, that comes from the compilation for + // a project. We want to defer this work until necessary, so this command is called by the Razor document manager to tell + // us when they need us to initialize the Razor things. + context.subscriptions.push( + vscode.commands.registerCommand(razorInitializeCommand, async () => { + await languageServer.sendNotification('razor/initialize', {}); + }) + ); +} diff --git a/src/lsptoolshost/roslynLanguageServer.ts b/src/lsptoolshost/roslynLanguageServer.ts index 24d7928bd..152cedd67 100644 --- a/src/lsptoolshost/roslynLanguageServer.ts +++ b/src/lsptoolshost/roslynLanguageServer.ts @@ -8,50 +8,32 @@ import * as fs from 'fs'; import * as path from 'path'; import * as cp from 'child_process'; import * as uuid from 'uuid'; +import * as net from 'net'; import { registerCommands } from './commands'; import { registerDebugger } from './debugger'; import { UriConverter } from './uriConverter'; import { - DidChangeTextDocumentNotification, - DidCloseTextDocumentNotification, LanguageClientOptions, ServerOptions, - DidCloseTextDocumentParams, - DidChangeTextDocumentParams, - DocumentDiagnosticParams, State, Trace, RequestType, RequestType0, - FormattingOptions, - TextDocumentIdentifier, - DocumentDiagnosticRequest, - DocumentDiagnosticReport, - CancellationToken, - CodeAction, - CodeActionParams, - CodeActionRequest, - CodeActionResolveRequest, - CompletionParams, - CompletionRequest, - CompletionResolveRequest, - CompletionItem, PartialResultParams, ProtocolRequestType, - MessageType, + SocketMessageWriter, + SocketMessageReader, + MessageTransports, + RAL, } from 'vscode-languageclient/node'; import { PlatformInformation } from '../shared/platform'; import { readConfigurations } from './configurationMiddleware'; -import OptionProvider from '../shared/observers/optionProvider'; import { DynamicFileInfoHandler } from '../razor/src/dynamicFile/dynamicFileInfoHandler'; import ShowInformationMessage from '../shared/observers/utils/showInformationMessage'; -import EventEmitter = require('events'); -import Disposable from '../disposable'; import * as RoslynProtocol from './roslynProtocol'; import { CSharpDevKitExports } from '../csharpDevKitExports'; -import { ISolutionSnapshotProvider, SolutionSnapshotId } from './services/ISolutionSnapshotProvider'; -import { Options } from '../shared/options'; +import { SolutionSnapshotId } from './services/ISolutionSnapshotProvider'; import { ServerStateChange } from './serverStateChange'; import CSharpIntelliCodeExports from '../csharpIntelliCodeExports'; import { csharpDevkitExtensionId, csharpDevkitIntelliCodeExtensionId, getCSharpDevKit } from '../utils/getCSharpDevKit'; @@ -60,58 +42,46 @@ import { DotnetRuntimeExtensionResolver } from './dotnetRuntimeExtensionResolver import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; import { RoslynLanguageClient } from './roslynLanguageClient'; import { registerUnitTestingCommands } from './unitTesting'; -import SerializableSimplifyMethodParams from '../razor/src/simplify/serializableSimplifyMethodParams'; -import { TextEdit } from 'vscode-html-languageservice'; +import { reportProjectConfigurationEvent } from '../shared/projectConfiguration'; import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; import { registerLanguageServerOptionChanges } from './optionChanges'; import { Observable } from 'rxjs'; import { DotnetInfo } from '../shared/utils/dotnetInfo'; +import { RoslynLanguageServerEvents } from './languageServerEvents'; +import { registerShowToastNotification } from './showToastNotification'; +import { registerRazorCommands } from './razorCommands'; +import { registerOnAutoInsert } from './onAutoInsert'; +import { registerCodeActionFixAllCommands } from './fixAllCodeAction'; +import { commonOptions, languageServerOptions, omnisharpOptions } from '../shared/options'; +import { NamedPipeInformation } from './roslynProtocol'; +import { IDisposable } from '../disposable'; -let _languageServer: RoslynLanguageServer; let _channel: vscode.OutputChannel; let _traceChannel: vscode.OutputChannel; -export class RoslynLanguageServer { - // These are commands that are invoked by the Razor extension, and are used to send LSP requests to the Roslyn LSP server - public static readonly roslynDidOpenCommand: string = 'roslyn.openRazorCSharp'; - public static readonly roslynDidChangeCommand: string = 'roslyn.changeRazorCSharp'; - public static readonly roslynDidCloseCommand: string = 'roslyn.closeRazorCSharp'; - public static readonly roslynPullDiagnosticCommand: string = 'roslyn.pullDiagnosticRazorCSharp'; - public static readonly provideCodeActionsCommand: string = 'roslyn.provideCodeActions'; - public static readonly resolveCodeActionCommand: string = 'roslyn.resolveCodeAction'; - public static readonly provideCompletionsCommand: string = 'roslyn.provideCompletions'; - public static readonly resolveCompletionsCommand: string = 'roslyn.resolveCompletion'; - public static readonly roslynSimplifyMethodCommand: string = 'roslyn.simplifyMethod'; - public static readonly razorInitializeCommand: string = 'razor.initialize'; +// Flag indicating if C# Devkit was installed the last time we activated. +// Used to determine if we need to restart the server on extension changes. +let _wasActivatedWithCSharpDevkit: boolean | undefined; +export class RoslynLanguageServer { // These are notifications we will get from the LSP server and will forward to the Razor extension. private static readonly provideRazorDynamicFileInfoMethodName: string = 'razor/provideDynamicFileInfo'; private static readonly removeRazorDynamicFileInfoMethodName: string = 'razor/removeDynamicFileInfo'; /** - * Event name used to fire events to the _eventBus when the server state changes. + * The encoding to use when writing to and from the stream. */ - private static readonly serverStateChangeEvent: string = 'serverStateChange'; - - /** - * The timeout for stopping the language server (in ms). - */ - private static _stopTimeout = 10000; - private _languageClient: RoslynLanguageClient | undefined; + private static readonly encoding: RAL.MessageBufferEncoding = 'utf-8'; /** - * Flag indicating if C# Devkit was installed the last time we activated. - * Used to determine if we need to restart the server on extension changes. + * The regular expression used to find the named pipe key in the LSP server's stdout stream. */ - private _wasActivatedWithCSharpDevkit: boolean | undefined; + private static readonly namedPipeKeyRegex = /{"pipeName":"[^"]+"}/; /** - * Event emitter that fires events when state related to the server changes. - * For example when the server starts or stops. - * - * Consumers can register to listen for these events if they need to. + * The timeout for stopping the language server (in ms). */ - private _eventBus = new EventEmitter(); + private static _stopTimeout = 10000; /** * The solution file previously opened; we hold onto this so we can send this back over if the server were to be relaunched for any reason, like some other configuration @@ -124,27 +94,96 @@ export class RoslynLanguageServer { private _projectFiles: vscode.Uri[] = new Array(); constructor( - private platformInfo: PlatformInformation, - private hostExecutableResolver: IHostExecutableResolver, - private optionProvider: OptionProvider, - private context: vscode.ExtensionContext, - private additionalExtensionPaths: string[] - ) {} + private _languageClient: RoslynLanguageClient, + private _platformInfo: PlatformInformation, + private _context: vscode.ExtensionContext, + private _languageServerEvents: RoslynLanguageServerEvents + ) { + this.registerSetTrace(); + this.registerSendOpenSolution(); + this.registerOnProjectInitializationComplete(); + this.registerReportProjectConfiguration(); + this.registerExtensionsChanged(); + this.registerTelemetryChanged(); + + // Register Razor dynamic file info handling + this.registerDynamicFileInfo(); + + this.registerDebuggerAttach(); + + registerShowToastNotification(this._languageClient); + } + + private registerSetTrace() { + // Set the language client trace level based on the log level option. + // setTrace only works after the client is already running. + this._languageClient.onDidChangeState(async (state) => { + if (state.newState === State.Running) { + const languageClientTraceLevel = RoslynLanguageServer.GetTraceLevel(languageServerOptions.logLevel); + + await this._languageClient.setTrace(languageClientTraceLevel); + } + }); + } + + private registerSendOpenSolution() { + this._languageClient.onDidChangeState(async (state) => { + if (state.newState === State.Running) { + if (this._solutionFile || this._projectFiles.length > 0) { + await this.sendOpenSolutionAndProjectsNotifications(); + } else { + await this.openDefaultSolutionOrProjects(); + } + await this.sendOrSubscribeForServiceBrokerConnection(); + this._languageServerEvents.onServerStateChangeEmitter.fire(ServerStateChange.Started); + } + }); + } + + private registerOnProjectInitializationComplete() { + this._languageClient.onNotification(RoslynProtocol.ProjectInitializationCompleteNotification.type, () => { + this._languageServerEvents.onServerStateChangeEmitter.fire(ServerStateChange.ProjectInitializationComplete); + }); + } + + private registerReportProjectConfiguration() { + // Store the dotnet info outside of the notification so we're not running dotnet --info every time the project changes. + let dotnetInfo: DotnetInfo | undefined = undefined; + this._languageClient.onNotification(RoslynProtocol.ProjectConfigurationNotification.type, async (params) => { + if (!dotnetInfo) { + dotnetInfo = await getDotnetInfo([]); + } + reportProjectConfigurationEvent( + params, + this._platformInfo, + dotnetInfo, + this._solutionFile?.fsPath, + true + ); + }); + } /** - * Resolves server options and starts the dotnet language server process. The process is started asynchronously and this method will not wait until - * the process is launched. + * Resolves server options and starts the dotnet language server process. + * This promise will complete when the server starts. */ - public async start(): Promise { - const options = this.optionProvider.GetLatestOptions(); - const logLevel = options.languageServerOptions.logLevel; - const languageClientTraceLevel = this.GetTraceLevel(logLevel); - + public static async initializeAsync( + platformInfo: PlatformInformation, + hostExecutableResolver: IHostExecutableResolver, + context: vscode.ExtensionContext, + additionalExtensionPaths: string[], + languageServerEvents: RoslynLanguageServerEvents + ): Promise { const serverOptions: ServerOptions = async () => { - return await this.startServer(logLevel); + return await this.startServer( + platformInfo, + hostExecutableResolver, + context, + additionalExtensionPaths + ); }; - const documentSelector = options.languageServerOptions.documentSelector; + const documentSelector = languageServerOptions.documentSelector; // Options to control the language client const clientOptions: LanguageClientOptions = { @@ -181,134 +220,26 @@ export class RoslynLanguageServer { client.registerProposedFeatures(); - this._languageClient = client; - - // Set the language client trace level based on the log level option. - // setTrace only works after the client is already running. - // We don't use registerOnStateChange here because we need to access the actual _languageClient instance. - this._languageClient.onDidChangeState(async (state) => { - if (state.newState === State.Running) { - await this._languageClient!.setTrace(languageClientTraceLevel); - if (this._solutionFile || this._projectFiles.length > 0) { - await this.sendOpenSolutionAndProjectsNotifications(); - } else { - await this.openDefaultSolutionOrProjects(); - } - await this.sendOrSubscribeForServiceBrokerConnection(); - this._eventBus.emit(RoslynLanguageServer.serverStateChangeEvent, ServerStateChange.Started); - } - }); - - this._languageClient.onNotification(RoslynProtocol.ProjectInitializationCompleteNotification.type, () => { - this._eventBus.emit( - RoslynLanguageServer.serverStateChangeEvent, - ServerStateChange.ProjectInitializationComplete - ); - }); + const server = new RoslynLanguageServer(client, platformInfo, context, languageServerEvents); - // Store the dotnet info outside of the notification so we're not running dotnet --info every time the project changes. - let dotnetInfo: DotnetInfo | undefined = undefined; - this._languageClient.onNotification(RoslynProtocol.ProjectConfigurationNotification.type, async (_) => { - if (!dotnetInfo) { - dotnetInfo = await getDotnetInfo([]); - } - }); - - this._languageClient.onNotification(RoslynProtocol.ShowToastNotification.type, async (notification) => { - const messageOptions: vscode.MessageOptions = { - modal: false, - }; - const commands = notification.commands.map((command) => command.title); - const executeCommandByName = async (result: string | undefined) => { - if (result) { - const command = notification.commands.find((command) => command.title === result); - if (!command) { - throw new Error(`Unknown command ${result}`); - } - - if (command.arguments) { - await vscode.commands.executeCommand(command.command, ...command.arguments); - } else { - await vscode.commands.executeCommand(command.command); - } - } - }; - - switch (notification.messageType) { - case MessageType.Error: { - const result = await vscode.window.showErrorMessage( - notification.message, - messageOptions, - ...commands - ); - executeCommandByName(result); - break; - } - case MessageType.Warning: { - const result = await vscode.window.showWarningMessage( - notification.message, - messageOptions, - ...commands - ); - executeCommandByName(result); - break; - } - default: { - const result = await vscode.window.showInformationMessage( - notification.message, - messageOptions, - ...commands - ); - executeCommandByName(result); - break; - } - } - }); - - this.registerExtensionsChanged(this._languageClient); - this.registerTelemetryChanged(this._languageClient); - - // Start the client. This will also launch the server - this._languageClient.start(); - - // Register Razor dynamic file info handling - this.registerDynamicFileInfo(this._languageClient); - - this.registerDebuggerAttach(this._languageClient); + // Start the client. This will also launch the server process. + await client.start(); + return server; } public async stop(): Promise { - await this._languageClient?.stop(RoslynLanguageServer._stopTimeout); - this._languageClient?.dispose(RoslynLanguageServer._stopTimeout); - this._languageClient = undefined; + await this._languageClient.stop(RoslynLanguageServer._stopTimeout); } - /** - * Restarts the language server. This does not wait until the server has been restarted. - * Note that since some options affect how the language server is initialized, we must - * re-create the LanguageClient instance instead of just stopping/starting it. - */ public async restart(): Promise { - await this.stop(); - await this.start(); - } - - /** - * Allows consumers of this server to register for state change events. - * These state change events will be registered each time the underlying _languageClient instance is created. - */ - public registerStateChangeEvent(listener: (event: ServerStateChange) => Promise): Disposable { - this._eventBus.addListener(RoslynLanguageServer.serverStateChangeEvent, listener); - return new Disposable(() => - this._eventBus.removeListener(RoslynLanguageServer.serverStateChangeEvent, listener) - ); + await this._languageClient.restart(); } /** * Returns whether or not the underlying LSP server is running or not. */ public isRunning(): boolean { - return this._languageClient?.state === State.Running; + return this._languageClient.state === State.Running; } /** @@ -323,7 +254,7 @@ export class RoslynLanguageServer { throw new Error('Tried to send request while server is not started.'); } - const response = await this._languageClient!.sendRequest(type, params, token); + const response = await this._languageClient.sendRequest(type, params, token); return response; } @@ -338,7 +269,7 @@ export class RoslynLanguageServer { throw new Error('Tried to send request while server is not started.'); } - const response = await this._languageClient!.sendRequest(type, token); + const response = await this._languageClient.sendRequest(type, token); return response; } @@ -348,9 +279,6 @@ export class RoslynLanguageServer { onProgress: (p: PR) => Promise, cancellationToken?: vscode.CancellationToken ): Promise { - if (!this._languageClient) { - throw new Error('Tried to send request while server is not started.'); - } // Generate a UUID for our partial result token and apply it to our request. const partialResultToken: string = uuid.v4(); params.partialResultToken = partialResultToken; @@ -372,12 +300,12 @@ export class RoslynLanguageServer { throw new Error('Tried to send request while server is not started.'); } - const response = await this._languageClient!.sendNotification(method, params); + const response = await this._languageClient.sendNotification(method, params); return response; } public async registerSolutionSnapshot(token: vscode.CancellationToken): Promise { - const response = await _languageServer.sendRequest0(RoslynProtocol.RegisterSolutionSnapshotRequest.type, token); + const response = await this.sendRequest0(RoslynProtocol.RegisterSolutionSnapshotRequest.type, token); if (response) { return new SolutionSnapshotId(response.id); } @@ -398,7 +326,7 @@ export class RoslynLanguageServer { } private async sendOpenSolutionAndProjectsNotifications(): Promise { - if (this._languageClient !== undefined && this._languageClient.isRunning()) { + if (this._languageClient.isRunning()) { if (this._solutionFile !== undefined) { const protocolUri = this._languageClient.clientOptions.uriConverters!.code2Protocol(this._solutionFile); await this._languageClient.sendNotification(RoslynProtocol.OpenSolutionNotification.type, { @@ -408,7 +336,7 @@ export class RoslynLanguageServer { if (this._projectFiles.length > 0) { const projectProtocolUris = this._projectFiles.map((uri) => - this._languageClient!.clientOptions.uriConverters!.code2Protocol(uri) + this._languageClient.clientOptions.uriConverters!.code2Protocol(uri) ); await this._languageClient.sendNotification(RoslynProtocol.OpenProjectNotification.type, { projects: projectProtocolUris, @@ -418,17 +346,12 @@ export class RoslynLanguageServer { } private async openDefaultSolutionOrProjects(): Promise { - const options = this.optionProvider.GetLatestOptions(); - // If Dev Kit isn't installed, then we are responsible for picking the solution to open, assuming the user hasn't explicitly // disabled it. - if ( - !this._wasActivatedWithCSharpDevkit && - options.commonOptions.defaultSolution !== 'disable' && - this._solutionFile === undefined - ) { - if (options.commonOptions.defaultSolution !== '') { - this.openSolution(vscode.Uri.file(options.commonOptions.defaultSolution)); + const defaultSolution = commonOptions.defaultSolution; + if (!_wasActivatedWithCSharpDevkit && defaultSolution !== 'disable' && this._solutionFile === undefined) { + if (defaultSolution !== '') { + this.openSolution(vscode.Uri.file(defaultSolution)); } else { // Auto open if there is just one solution target; if there's more the one we'll just let the user pick with the picker. const solutionUris = await vscode.workspace.findFiles('**/*.sln', '**/node_modules/**', 2); @@ -466,7 +389,7 @@ export class RoslynLanguageServer { const projectUris = await vscode.workspace.findFiles( '**/*.csproj', '**/node_modules/**', - options.omnisharpOptions.maxProjectResults + omnisharpOptions.maxProjectResults ); this.openProjects(projectUris); @@ -477,7 +400,7 @@ export class RoslynLanguageServer { } private async sendOrSubscribeForServiceBrokerConnection(): Promise { - const csharpDevKitExtension = vscode.extensions.getExtension(csharpDevkitExtensionId); + const csharpDevKitExtension = getCSharpDevKit(); if (csharpDevKitExtension) { const exports = await csharpDevKitExtension.activate(); @@ -487,10 +410,10 @@ export class RoslynLanguageServer { // then we have no projects, and so this extension won't have anything to do. if (exports.hasServerProcessLoaded()) { const pipeName = await exports.getBrokeredServiceServerPipeName(); - this._languageClient?.sendNotification('serviceBroker/connect', { pipeName: pipeName }); + this._languageClient.sendNotification('serviceBroker/connect', { pipeName: pipeName }); } else { // We'll subscribe if the process later launches, and call this function again to send the pipe name. - this.context.subscriptions.push( + this._context.subscriptions.push( exports.serverProcessLoaded(async () => this.sendOrSubscribeForServiceBrokerConnection()) ); } @@ -498,19 +421,19 @@ export class RoslynLanguageServer { } public getServerCapabilities(): any { - if (!this._languageClient) { - throw new Error('Tried to send request while server is not started.'); - } - const capabilities: any = this._languageClient.initializeResult?.capabilities; return capabilities; } - private async startServer(logLevel: string | undefined): Promise { - const options = this.optionProvider.GetLatestOptions(); - const serverPath = getServerPath(options, this.platformInfo); + private static async startServer( + platformInfo: PlatformInformation, + hostExecutableResolver: IHostExecutableResolver, + context: vscode.ExtensionContext, + additionalExtensionPaths: string[] + ): Promise { + const serverPath = getServerPath(platformInfo); - const dotnetInfo = await this.hostExecutableResolver.getHostExecutableInfo(options); + const dotnetInfo = await hostExecutableResolver.getHostExecutableInfo(); const dotnetRuntimePath = path.dirname(dotnetInfo.path); const dotnetExecutablePath = dotnetInfo.path; @@ -524,26 +447,38 @@ export class RoslynLanguageServer { // Save user's DOTNET_ROOT env-var value so server can recover the user setting when needed env.DOTNET_ROOT_USER = process.env.DOTNET_ROOT ?? 'EMPTY'; + if (languageServerOptions.crashDumpPath) { + // Enable dump collection + env.DOTNET_DbgEnableMiniDump = '1'; + // Collect heap dump + env.DOTNET_DbgMiniDumpType = '2'; + // Collect crashreport.json with additional thread and stack frame information. + env.DOTNET_EnableCrashReport = '1'; + // The dump file name format is ..dmp + env.DOTNET_DbgMiniDumpName = path.join(languageServerOptions.crashDumpPath, '%e.%p.dmp'); + } + let args: string[] = []; - if (options.commonOptions.waitForDebugger) { + if (commonOptions.waitForDebugger) { args.push('--debug'); } + const logLevel = languageServerOptions.logLevel; if (logLevel) { args.push('--logLevel', logLevel); } - for (const extensionPath of this.additionalExtensionPaths) { + for (const extensionPath of additionalExtensionPaths) { args.push('--extension', extensionPath); } // Get the brokered service pipe name from C# Dev Kit (if installed). // We explicitly call this in the LSP server start action instead of awaiting it // in our activation because C# Dev Kit depends on C# activation completing. - const csharpDevkitExtension = vscode.extensions.getExtension(csharpDevkitExtensionId); + const csharpDevkitExtension = getCSharpDevKit(); if (csharpDevkitExtension) { - this._wasActivatedWithCSharpDevkit = true; + _wasActivatedWithCSharpDevkit = true; // Get the starred suggestion dll location from C# Dev Kit IntelliCode (if both C# Dev Kit and C# Dev Kit IntelliCode are installed). const csharpDevkitIntelliCodeExtension = vscode.extensions.getExtension( @@ -559,7 +494,7 @@ export class RoslynLanguageServer { _channel.appendLine('Activating C# + C# Dev Kit...'); } - const csharpDevkitArgs = await this.getCSharpDevkitExportArgs(csharpDevkitExtension, options); + const csharpDevkitArgs = await this.getCSharpDevkitExportArgs(csharpDevkitExtension); args = args.concat(csharpDevkitArgs); await this.setupDevKitEnvironment(env, csharpDevkitExtension); @@ -567,14 +502,14 @@ export class RoslynLanguageServer { // C# Dev Kit is not installed - continue C#-only activation. _channel.appendLine('Activating C# standalone...'); vscode.commands.executeCommand('setContext', 'dotnet.server.activatedStandalone', true); - this._wasActivatedWithCSharpDevkit = false; + _wasActivatedWithCSharpDevkit = false; } if (logLevel && [Trace.Messages, Trace.Verbose].includes(this.GetTraceLevel(logLevel))) { _channel.appendLine(`Starting server at ${serverPath}`); } - args.push('--extensionLogDirectory', this.context.logUri.fsPath); + args.push('--extensionLogDirectory', context.logUri.fsPath); let childProcess: cp.ChildProcessWithoutNullStreams; const cpOptions: cp.SpawnOptionsWithoutStdio = { @@ -601,55 +536,170 @@ export class RoslynLanguageServer { childProcess = cp.spawn(serverPath, args, cpOptions); } - return childProcess; + // Record the stdout and stderr streams from the server process. + childProcess.stdout.on('data', (data: { toString: (arg0: any) => any }) => { + const result: string = isString(data) ? data : data.toString(RoslynLanguageServer.encoding); + _channel.append('[stdout] ' + result); + }); + childProcess.stderr.on('data', (data: { toString: (arg0: any) => any }) => { + const result: string = isString(data) ? data : data.toString(RoslynLanguageServer.encoding); + _channel.append('[stderr] ' + result); + }); + + // Timeout promise used to time out the connection process if it takes too long. + const timeout = new Promise((resolve, reject) => { + RAL().timer.setTimeout(resolve, languageServerOptions.startTimeout); + + // If the child process exited unexpectedly, reject the promise early. + // Error information will be captured from the stdout/stderr streams above. + childProcess.on('exit', (code) => { + if (code && code !== 0) { + _channel.appendLine(`Language server process exited with ${code}`); + reject(); + } + }); + }); + + // The server process will create the named pipe used for communcation. Wait for it to be created, + // and listen for the server to pass back the connection information via stdout. + const namedPipeConnectionPromise = new Promise((resolve) => { + _channel.appendLine('waiting for named pipe information from server...'); + childProcess.stdout.on('data', (data: { toString: (arg0: any) => any }) => { + const result: string = isString(data) ? data : data.toString(RoslynLanguageServer.encoding); + // Use the regular expression to find all JSON lines + const jsonLines = result.match(RoslynLanguageServer.namedPipeKeyRegex); + if (jsonLines) { + const transmittedPipeNameInfo: NamedPipeInformation = JSON.parse(jsonLines[0]); + _channel.appendLine('received named pipe information from server'); + resolve(transmittedPipeNameInfo); + } + }); + }); + + // Wait for the server to send back the name of the pipe to connect to. + // If it takes too long it will timeout and throw an error. + const pipeConnectionInfo = await Promise.race([namedPipeConnectionPromise, timeout]); + if (pipeConnectionInfo === undefined) { + throw new Error('Timeout. Named pipe information not received from server.'); + } + + const socketPromise = new Promise((resolve) => { + _channel.appendLine('attempting to connect client to server...'); + const socket = net.createConnection(pipeConnectionInfo.pipeName, () => { + _channel.appendLine('client has connected to server'); + resolve(socket); + }); + }); + + // Wait for the client to connect to the named pipe. + // If it takes too long it will timeout and throw an error. + const socket = await Promise.race([socketPromise, timeout]); + if (socket === undefined) { + throw new Error( + 'Timeout. Client cound not connect to server via named pipe: ' + pipeConnectionInfo.pipeName + ); + } + + return { + reader: new SocketMessageReader(socket, RoslynLanguageServer.encoding), + writer: new SocketMessageWriter(socket, RoslynLanguageServer.encoding), + }; } - private registerDynamicFileInfo(client: RoslynLanguageClient) { + private registerDynamicFileInfo() { // When the Roslyn language server sends a request for Razor dynamic file info, we forward that request along to Razor via // a command. - client.onRequest(RoslynLanguageServer.provideRazorDynamicFileInfoMethodName, async (request) => + this._languageClient.onRequest(RoslynLanguageServer.provideRazorDynamicFileInfoMethodName, async (request) => vscode.commands.executeCommand(DynamicFileInfoHandler.provideDynamicFileInfoCommand, request) ); - client.onNotification(RoslynLanguageServer.removeRazorDynamicFileInfoMethodName, async (notification) => - vscode.commands.executeCommand(DynamicFileInfoHandler.removeDynamicFileInfoCommand, notification) + this._languageClient.onNotification( + RoslynLanguageServer.removeRazorDynamicFileInfoMethodName, + async (notification) => + vscode.commands.executeCommand(DynamicFileInfoHandler.removeDynamicFileInfoCommand, notification) ); } - private registerDebuggerAttach(client: RoslynLanguageClient) { - client.onRequest( + // eslint-disable-next-line @typescript-eslint/promise-function-async + private WaitForAttachCompleteAsync(attachRequestId: string): Promise { + return new Promise((resolve) => { + let didTerminateRegistation: IDisposable | null = null; + let customEventReg: IDisposable | null = null; + let isComplete = false; + + const fire = (result: boolean) => { + if (isComplete === false) { + isComplete = true; + didTerminateRegistation?.dispose(); + customEventReg?.dispose(); + resolve(result); + } + }; + + didTerminateRegistation = vscode.debug.onDidTerminateDebugSession((session: vscode.DebugSession) => { + if (session.configuration.attachRequestId !== attachRequestId) { + return; + } + + fire(false); + }); + + customEventReg = vscode.debug.onDidReceiveDebugSessionCustomEvent( + (event: vscode.DebugSessionCustomEvent) => { + if (event.session.configuration.attachRequestId !== attachRequestId) { + return; + } + + if (event.event !== 'attachComplete') { + return; + } + + fire(true); + } + ); + }); + } + + private registerDebuggerAttach() { + this._languageClient.onRequest( RoslynProtocol.DebugAttachRequest.type, async (request) => { - const debugOptions = this.optionProvider.GetLatestOptions().commonOptions.unitTestDebuggingOptions; + const debugOptions = commonOptions.unitTestDebuggingOptions; const debugConfiguration: vscode.DebugConfiguration = { ...debugOptions, - name: '.NET Core Attach', + name: '.NET Debug Unit test', type: 'coreclr', request: 'attach', processId: request.processId, + attachRequestId: randomUUID(), }; - const result = await vscode.debug.startDebugging(undefined, debugConfiguration, undefined); - return { - didAttach: result, - }; + const waitCompletePromise = this.WaitForAttachCompleteAsync(debugConfiguration.attachRequestId); + + let success = await vscode.debug.startDebugging(undefined, debugConfiguration, undefined); + if (!success) { + return { didAttach: false }; + } + + success = await waitCompletePromise; + return { didAttach: success }; } ); } - private registerExtensionsChanged(languageClient: RoslynLanguageClient) { + private registerExtensionsChanged() { // subscribe to extension change events so that we can get notified if C# Dev Kit is added/removed later. - languageClient.addDisposable( + this._languageClient.addDisposable( vscode.extensions.onDidChange(async () => { const csharpDevkitExtension = getCSharpDevKit(); - if (this._wasActivatedWithCSharpDevkit === undefined) { + if (_wasActivatedWithCSharpDevkit === undefined) { // Haven't activated yet. return; } const title = vscode.l10n.t('Restart Language Server'); const command = 'dotnet.restartServer'; - if (csharpDevkitExtension && !this._wasActivatedWithCSharpDevkit) { + if (csharpDevkitExtension && !_wasActivatedWithCSharpDevkit) { // We previously started without C# Dev Kit and its now installed. // Offer a prompt to restart the server to use C# Dev Kit. _channel.appendLine(`Detected new installation of ${csharpDevkitExtensionId}`); @@ -663,9 +713,9 @@ export class RoslynLanguageServer { ); } - private registerTelemetryChanged(languageClient: RoslynLanguageClient) { + private registerTelemetryChanged() { // Subscribe to telemetry events so we can enable/disable as needed - languageClient.addDisposable( + this._languageClient.addDisposable( vscode.env.onDidChangeTelemetryEnabled((_: boolean) => { const title = 'Restart Language Server'; const command = 'dotnet.restartServer'; @@ -676,13 +726,12 @@ export class RoslynLanguageServer { ); } - private async getCSharpDevkitExportArgs( - csharpDevkitExtension: vscode.Extension, - options: Options + private static async getCSharpDevkitExportArgs( + csharpDevkitExtension: vscode.Extension ): Promise { const exports: CSharpDevKitExports = await csharpDevkitExtension.activate(); - const extensionPaths = options.languageServerOptions.extensionsPaths || [ + const extensionPaths = languageServerOptions.extensionsPaths || [ this.getLanguageServicesDevKitComponentPath(exports), ]; @@ -700,7 +749,7 @@ export class RoslynLanguageServer { return args; } - private async getCSharpDevkitIntelliCodeExportArgs( + private static async getCSharpDevkitIntelliCodeExportArgs( csharpDevkitIntelliCodeExtension: vscode.Extension ): Promise { const exports = await csharpDevkitIntelliCodeExtension.activate(); @@ -711,7 +760,7 @@ export class RoslynLanguageServer { return csharpIntelliCodeArgs; } - private async setupDevKitEnvironment( + private static async setupDevKitEnvironment( env: NodeJS.ProcessEnv, csharpDevkitExtension: vscode.Extension ): Promise { @@ -726,14 +775,14 @@ export class RoslynLanguageServer { await exports.setupTelemetryEnvironmentAsync(env); } - private getLanguageServicesDevKitComponentPath(csharpDevKitExports: CSharpDevKitExports): string { + private static getLanguageServicesDevKitComponentPath(csharpDevKitExports: CSharpDevKitExports): string { return path.join( csharpDevKitExports.components['@microsoft/visualstudio-languageservices-devkit'], 'Microsoft.VisualStudio.LanguageServices.DevKit.dll' ); } - private GetTraceLevel(logLevel: string): Trace { + private static GetTraceLevel(logLevel: string): Trace { switch (logLevel) { case 'Trace': return Trace.Verbose; @@ -758,7 +807,7 @@ export class RoslynLanguageServer { } public async getBuildOnlyDiagnosticIds(token: vscode.CancellationToken): Promise { - const response = await _languageServer.sendRequest0(RoslynProtocol.BuildOnlyDiagnosticIdsRequest.type, token); + const response = await this.sendRequest0(RoslynProtocol.BuildOnlyDiagnosticIdsRequest.type, token); if (response) { return response.ids; } @@ -768,21 +817,16 @@ export class RoslynLanguageServer { } /** - * Brokered service implementation. + * Creates and activates the Roslyn language server. + * The returned promise will complete when the server starts. */ -export class SolutionSnapshotProvider implements ISolutionSnapshotProvider { - public async registerSolutionSnapshot(token: vscode.CancellationToken): Promise { - return _languageServer.registerSolutionSnapshot(token); - } -} - export async function activateRoslynLanguageServer( context: vscode.ExtensionContext, platformInfo: PlatformInformation, - optionProvider: OptionProvider, - optionObservable: Observable, + optionObservable: Observable, outputChannel: vscode.OutputChannel, - dotnetTestChannel: vscode.OutputChannel + dotnetTestChannel: vscode.OutputChannel, + languageServerEvents: RoslynLanguageServerEvents ): Promise { // Create a channel for outputting general logs from the language server. _channel = outputChannel; @@ -796,63 +840,32 @@ export async function activateRoslynLanguageServer( context.extensionPath ); const additionalExtensionPaths = scanExtensionPlugins(); - _languageServer = new RoslynLanguageServer( + + const languageServer = await RoslynLanguageServer.initializeAsync( platformInfo, hostExecutableResolver, - optionProvider, context, - additionalExtensionPaths + additionalExtensionPaths, + languageServerEvents ); // Register any commands that need to be handled by the extension. - registerCommands(context, _languageServer, optionProvider, hostExecutableResolver, _channel); + registerCommands(context, languageServer, hostExecutableResolver, _channel); - registerRazorCommands(context, _languageServer); + registerCodeActionFixAllCommands(context, languageServer, _channel); - registerUnitTestingCommands(context, _languageServer, dotnetTestChannel); + registerRazorCommands(context, languageServer); - // Register any needed debugger components that need to communicate with the language server. - registerDebugger(context, _languageServer, platformInfo, optionProvider, _channel); + registerUnitTestingCommands(context, languageServer, dotnetTestChannel); - context.subscriptions.push(registerLanguageServerOptionChanges(optionObservable)); - - const options = optionProvider.GetLatestOptions(); - let source = new vscode.CancellationTokenSource(); - vscode.workspace.onDidChangeTextDocument(async (e) => { - if (!options.languageServerOptions.documentSelector.includes(e.document.languageId)) { - return; - } - - if (e.contentChanges.length > 1 || e.contentChanges.length === 0) { - return; - } - - const change = e.contentChanges[0]; - - if (!change.range.isEmpty) { - return; - } - - const capabilities = await _languageServer.getServerCapabilities(); - - if (capabilities._vs_onAutoInsertProvider) { - // Regular expression to match all whitespace characters except the newline character - const changeTrimmed = change.text.replace(/[^\S\n]+/g, ''); - - if (!capabilities._vs_onAutoInsertProvider._vs_triggerCharacters.includes(changeTrimmed)) { - return; - } + // Register any needed debugger components that need to communicate with the language server. + registerDebugger(context, languageServer, languageServerEvents, platformInfo, _channel); - source.cancel(); - source = new vscode.CancellationTokenSource(); - await applyAutoInsertEdit(e, changeTrimmed, source.token); - } - }); + registerOnAutoInsert(languageServer); - // Start the language server. - await _languageServer.start(); + context.subscriptions.push(registerLanguageServerOptionChanges(optionObservable)); - return _languageServer; + return languageServer; function scanExtensionPlugins(): string[] { return vscode.extensions.all.flatMap((extension) => { @@ -876,11 +889,17 @@ export async function activateRoslynLanguageServer( } } -function getServerPath(options: Options, platformInfo: PlatformInformation) { - let serverPath = options.commonOptions.serverPath; - if (!serverPath) { - // Option not set, use the path from the extension. - serverPath = getInstalledServerPath(platformInfo); +function getServerPath(platformInfo: PlatformInformation) { + let serverPath = process.env.DOTNET_ROSLYN_SERVER_PATH; + + if (serverPath) { + _channel.appendLine(`Using server path override from DOTNET_ROSLYN_SERVER_PATH: ${serverPath}`); + } else { + serverPath = commonOptions.serverPath; + if (!serverPath) { + // Option not set, use the path from the extension. + serverPath = getInstalledServerPath(platformInfo); + } } if (!fs.existsSync(serverPath)) { @@ -913,157 +932,6 @@ function getInstalledServerPath(platformInfo: PlatformInformation): string { return pathWithExtension; } -export async function waitForProjectInitialization(): Promise { - return new Promise((resolve, _) => { - _languageServer.registerStateChangeEvent(async (state) => { - if (state === ServerStateChange.ProjectInitializationComplete) { - resolve(); - } - }); - }); -} - -function registerRazorCommands(context: vscode.ExtensionContext, languageServer: RoslynLanguageServer) { - // Razor will call into us (via command) for generated file didChange/didClose notifications. We'll then forward these - // notifications along to Roslyn. didOpen notifications are handled separately via the vscode.openTextDocument method. - context.subscriptions.push( - vscode.commands.registerCommand( - RoslynLanguageServer.roslynDidChangeCommand, - async (notification: DidChangeTextDocumentParams) => { - await languageServer.sendNotification(DidChangeTextDocumentNotification.method, notification); - } - ) - ); - context.subscriptions.push( - vscode.commands.registerCommand( - RoslynLanguageServer.roslynDidCloseCommand, - async (notification: DidCloseTextDocumentParams) => { - await languageServer.sendNotification(DidCloseTextDocumentNotification.method, notification); - } - ) - ); - context.subscriptions.push( - vscode.commands.registerCommand( - RoslynLanguageServer.roslynPullDiagnosticCommand, - async (request: DocumentDiagnosticParams) => { - const diagnosticRequestType = new RequestType( - DocumentDiagnosticRequest.method - ); - return await languageServer.sendRequest(diagnosticRequestType, request, CancellationToken.None); - } - ) - ); - context.subscriptions.push( - vscode.commands.registerCommand( - RoslynLanguageServer.roslynSimplifyMethodCommand, - async (request: SerializableSimplifyMethodParams) => { - const simplifyMethodRequestType = new RequestType( - 'roslyn/simplifyMethod' - ); - return await languageServer.sendRequest(simplifyMethodRequestType, request, CancellationToken.None); - } - ) - ); - - // The VS Code API for code actions (and the vscode.CodeAction type) doesn't support everything that LSP supports, - // namely the data property, which Razor needs to identify which code actions are on their allow list, so we need - // to expose a command for them to directly invoke our code actions LSP endpoints, rather than use built-in commands. - context.subscriptions.push( - vscode.commands.registerCommand( - RoslynLanguageServer.provideCodeActionsCommand, - async (request: CodeActionParams) => { - return await languageServer.sendRequest(CodeActionRequest.type, request, CancellationToken.None); - } - ) - ); - context.subscriptions.push( - vscode.commands.registerCommand(RoslynLanguageServer.resolveCodeActionCommand, async (request: CodeAction) => { - return await languageServer.sendRequest(CodeActionResolveRequest.type, request, CancellationToken.None); - }) - ); - - context.subscriptions.push( - vscode.commands.registerCommand( - RoslynLanguageServer.provideCompletionsCommand, - async (request: CompletionParams) => { - return await languageServer.sendRequest(CompletionRequest.type, request, CancellationToken.None); - } - ) - ); - context.subscriptions.push( - vscode.commands.registerCommand( - RoslynLanguageServer.resolveCompletionsCommand, - async (request: CompletionItem) => { - return await languageServer.sendRequest(CompletionResolveRequest.type, request, CancellationToken.None); - } - ) - ); - - // Roslyn is responsible for producing a json file containing information for Razor, that comes from the compilation for - // a project. We want to defer this work until necessary, so this command is called by the Razor document manager to tell - // us when they need us to initialize the Razor things. - context.subscriptions.push( - vscode.commands.registerCommand(RoslynLanguageServer.razorInitializeCommand, async () => { - await languageServer.sendNotification('razor/initialize', {}); - }) - ); -} - -async function applyAutoInsertEdit( - e: vscode.TextDocumentChangeEvent, - changeTrimmed: string, - token: vscode.CancellationToken -) { - const change = e.contentChanges[0]; - // The server expects the request position to represent the caret position in the text after the change has already been applied. - // We need to calculate what that position would be after the change is applied and send that to the server. - const position = new vscode.Position( - change.range.start.line, - change.range.start.character + (change.text.length - change.rangeLength) - ); - const uri = UriConverter.serialize(e.document.uri); - const textDocument = TextDocumentIdentifier.create(uri); - const formattingOptions = getFormattingOptions(); - const request: RoslynProtocol.OnAutoInsertParams = { - _vs_textDocument: textDocument, - _vs_position: position, - _vs_ch: changeTrimmed, - _vs_options: formattingOptions, - }; - - const response = await _languageServer.sendRequest(RoslynProtocol.OnAutoInsertRequest.type, request, token); - if (response) { - const textEdit = response._vs_textEdit; - const startPosition = new vscode.Position(textEdit.range.start.line, textEdit.range.start.character); - const endPosition = new vscode.Position(textEdit.range.end.line, textEdit.range.end.character); - const docComment = new vscode.SnippetString(textEdit.newText); - const code: any = vscode; - const textEdits = [new code.SnippetTextEdit(new vscode.Range(startPosition, endPosition), docComment)]; - const edit = new vscode.WorkspaceEdit(); - edit.set(e.document.uri, textEdits); - - const applied = vscode.workspace.applyEdit(edit); - if (!applied) { - throw new Error('Tried to insert a comment but an error occurred.'); - } - } -} - -function getFormattingOptions(): FormattingOptions { - const editorConfig = vscode.workspace.getConfiguration('editor'); - const tabSize = editorConfig.get('tabSize') ?? 4; - const insertSpaces = editorConfig.get('insertSpaces') ?? true; - return FormattingOptions.create(tabSize, insertSpaces); -} - -// this method is called when your extension is deactivated -export async function deactivate() { - if (!_languageServer) { - return undefined; - } - return _languageServer.stop(); -} - // VS code will have a default session id when running under tests. Since we may still // report telemetry, we need to give a unique session id instead of the default value. function getSessionId(): string { @@ -1076,3 +944,7 @@ function getSessionId(): string { return sessionId; } + +export function isString(value: any): value is string { + return typeof value === 'string' || value instanceof String; +} diff --git a/src/lsptoolshost/roslynLanguageServerExportChannel.ts b/src/lsptoolshost/roslynLanguageServerExportChannel.ts index 1adfe69a0..be5372881 100644 --- a/src/lsptoolshost/roslynLanguageServerExportChannel.ts +++ b/src/lsptoolshost/roslynLanguageServerExportChannel.ts @@ -7,24 +7,14 @@ import { RequestType } from 'vscode-languageclient/node'; import { RoslynLanguageServer } from './roslynLanguageServer'; export class RoslynLanguageServerExport { - private _server: RoslynLanguageServer | undefined; - - constructor(private serverPromise: Promise) {} - - private async ensureServer(): Promise { - if (this._server === undefined) { - this._server = await this.serverPromise; - } - - return this._server; - } + constructor(private _serverInitialized: Promise) {} public async sendRequest( type: RequestType, params: Params, token: vscode.CancellationToken ): Promise { - const server = await this.ensureServer(); + const server = await this._serverInitialized; // We need to recreate the type parameter to ensure that the prototypes line up. The `RequestType` we receive could have been // from a different version. const newType = new RequestType(type.method); diff --git a/src/lsptoolshost/roslynProtocol.ts b/src/lsptoolshost/roslynProtocol.ts index 27e63e65e..9e6691468 100644 --- a/src/lsptoolshost/roslynProtocol.ts +++ b/src/lsptoolshost/roslynProtocol.ts @@ -5,6 +5,7 @@ import { Command } from 'vscode'; import * as lsp from 'vscode-languageserver-protocol'; +import { CodeAction } from 'vscode-languageserver-protocol'; import { ProjectConfigurationMessage } from '../shared/projectConfiguration'; export interface WorkspaceDebugConfigurationParams { @@ -83,6 +84,11 @@ export interface RunTestsParams extends lsp.WorkDoneProgressParams, lsp.PartialR * Whether the request should attempt to call back to the client to attach a debugger before running the tests. */ attachDebugger: boolean; + + /** + * The absolute path to a .runsettings file to configure the test run. + */ + runSettingsPath?: string; } export interface TestProgress { @@ -136,6 +142,14 @@ export interface BuildOnlyDiagnosticIdsResult { ids: string[]; } +export interface RoslynFixAllCodeAction extends CodeAction { + scope: string; +} + +export interface NamedPipeInformation { + pipeName: string; +} + export namespace WorkspaceDebugConfigurationRequest { export const method = 'workspace/debugConfiguration'; export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.clientToServer; @@ -209,3 +223,9 @@ export namespace BuildOnlyDiagnosticIdsRequest { export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.clientToServer; export const type = new lsp.RequestType0(method); } + +export namespace CodeActionFixAllResolveRequest { + export const method = 'codeAction/resolveFixAll'; + export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.clientToServer; + export const type = new lsp.RequestType(method); +} diff --git a/src/lsptoolshost/roslynWorkspaceDebugConfigurationProvider.ts b/src/lsptoolshost/roslynWorkspaceDebugConfigurationProvider.ts index f5e3cb990..9e820c656 100644 --- a/src/lsptoolshost/roslynWorkspaceDebugConfigurationProvider.ts +++ b/src/lsptoolshost/roslynWorkspaceDebugConfigurationProvider.ts @@ -11,11 +11,15 @@ import { } from '../shared/IWorkspaceDebugInformationProvider'; import { isBlazorWebAssemblyHosted, isBlazorWebAssemblyProject, isWebProject } from '../shared/utils'; import { RoslynLanguageServer } from './roslynLanguageServer'; -import { WorkspaceDebugConfigurationParams, WorkspaceDebugConfigurationRequest } from './roslynProtocol'; +import { + ProjectDebugConfiguration, + WorkspaceDebugConfigurationParams, + WorkspaceDebugConfigurationRequest, +} from './roslynProtocol'; import { UriConverter } from './uriConverter'; export class RoslynWorkspaceDebugInformationProvider implements IWorkspaceDebugInformationProvider { - constructor(private server: RoslynLanguageServer) {} + constructor(private server: RoslynLanguageServer, private outputChannel: vscode.OutputChannel) {} public async getWorkspaceDebugInformation( workspaceFolder: vscode.Uri @@ -28,11 +32,20 @@ export class RoslynWorkspaceDebugInformationProvider implements IWorkspaceDebugI workspacePath: UriConverter.serialize(workspaceFolder), }; - const response = await this.server.sendRequest( - WorkspaceDebugConfigurationRequest.type, - params, - new vscode.CancellationTokenSource().token - ); + let response: ProjectDebugConfiguration[]; + try { + response = await this.server.sendRequest( + WorkspaceDebugConfigurationRequest.type, + params, + new vscode.CancellationTokenSource().token + ); + } catch (e) { + // Server errors are already logged by the language client, but its totally possible + // that we fail because the server is restarting or a process got killed, etc. + // Catch the error and log to the correct output (instead of going to the extension host output). + this.outputChannel.appendLine(`Failed to get debug configuration: ${e}`); + return; + } // LSP serializes and deserializes URIs as (URI formatted) strings not actual types. So convert to the actual type here. const projects: ProjectDebugInformation[] | undefined = await mapAsync(response, async (p) => { diff --git a/src/lsptoolshost/services/solutionSnapshotProvider.ts b/src/lsptoolshost/services/solutionSnapshotProvider.ts new file mode 100644 index 000000000..41908edb8 --- /dev/null +++ b/src/lsptoolshost/services/solutionSnapshotProvider.ts @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { RoslynLanguageServer } from '../roslynLanguageServer'; +import { ISolutionSnapshotProvider, SolutionSnapshotId } from './ISolutionSnapshotProvider'; + +/** + * Brokered service implementation. + */ +export class SolutionSnapshotProvider implements ISolutionSnapshotProvider { + constructor(private _languageServerPromise: Promise) {} + public async registerSolutionSnapshot(token: vscode.CancellationToken): Promise { + const languageServer = await this._languageServerPromise; + return languageServer.registerSolutionSnapshot(token); + } +} diff --git a/src/lsptoolshost/showToastNotification.ts b/src/lsptoolshost/showToastNotification.ts new file mode 100644 index 000000000..df57ac54f --- /dev/null +++ b/src/lsptoolshost/showToastNotification.ts @@ -0,0 +1,58 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { RoslynLanguageClient } from './roslynLanguageClient'; +import { MessageType } from 'vscode-languageserver-protocol'; +import { ShowToastNotification } from './roslynProtocol'; + +export function registerShowToastNotification(client: RoslynLanguageClient) { + client.onNotification(ShowToastNotification.type, async (notification) => { + const messageOptions: vscode.MessageOptions = { + modal: false, + }; + const commands = notification.commands.map((command) => command.title); + const executeCommandByName = async (result: string | undefined) => { + if (result) { + const command = notification.commands.find((command) => command.title === result); + if (!command) { + throw new Error(`Unknown command ${result}`); + } + + if (command.arguments) { + await vscode.commands.executeCommand(command.command, ...command.arguments); + } else { + await vscode.commands.executeCommand(command.command); + } + } + }; + + switch (notification.messageType) { + case MessageType.Error: { + const result = await vscode.window.showErrorMessage(notification.message, messageOptions, ...commands); + executeCommandByName(result); + break; + } + case MessageType.Warning: { + const result = await vscode.window.showWarningMessage( + notification.message, + messageOptions, + ...commands + ); + executeCommandByName(result); + break; + } + default: { + const result = await vscode.window.showInformationMessage( + notification.message, + messageOptions, + ...commands + ); + executeCommandByName(result); + break; + } + } + }); +} diff --git a/src/lsptoolshost/unitTesting.ts b/src/lsptoolshost/unitTesting.ts index 298cda283..ba955b376 100644 --- a/src/lsptoolshost/unitTesting.ts +++ b/src/lsptoolshost/unitTesting.ts @@ -3,10 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as fs from 'fs'; +import * as path from 'path'; import * as vscode from 'vscode'; import * as languageClient from 'vscode-languageclient/node'; import { RoslynLanguageServer } from './roslynLanguageServer'; -import { RunTestsParams, RunTestsPartialResult, RunTestsRequest } from './roslynProtocol'; +import { RunTestsParams, RunTestsPartialResult, RunTestsRequest, TestProgress } from './roslynProtocol'; +import { commonOptions } from '../shared/options'; export function registerUnitTestingCommands( context: vscode.ExtensionContext, @@ -14,39 +17,44 @@ export function registerUnitTestingCommands( dotnetTestChannel: vscode.OutputChannel ) { context.subscriptions.push( - vscode.commands.registerCommand('dotnet.test.run', async (request) => - runTests(request, languageServer, dotnetTestChannel) + vscode.commands.registerCommand( + 'dotnet.test.run', + async (request): Promise => runTests(request, languageServer, dotnetTestChannel) ) ); context.subscriptions.push( - vscode.commands.registerTextEditorCommand( + // We don't use registerTextEditorCommand because it is required to run synchronously and is not awaitable. + // See https://github.com/microsoft/vscode/issues/16814 for more info. + vscode.commands.registerCommand( 'dotnet.test.runTestsInContext', - async (textEditor: vscode.TextEditor) => { - return runTestsInContext(false, textEditor, languageServer, dotnetTestChannel); - } + async (): Promise => runTestsInContext(false, languageServer, dotnetTestChannel) ) ); context.subscriptions.push( - vscode.commands.registerTextEditorCommand( + vscode.commands.registerCommand( 'dotnet.test.debugTestsInContext', - async (textEditor: vscode.TextEditor) => { - return runTestsInContext(true, textEditor, languageServer, dotnetTestChannel); - } + async (): Promise => runTestsInContext(true, languageServer, dotnetTestChannel) ) ); } async function runTestsInContext( debug: boolean, - textEditor: vscode.TextEditor, languageServer: RoslynLanguageServer, dotnetTestChannel: vscode.OutputChannel -) { - const contextRange: languageClient.Range = { start: textEditor.selection.active, end: textEditor.selection.active }; - const textDocument: languageClient.TextDocumentIdentifier = { uri: textEditor.document.fileName }; +): Promise { + const activeEditor = vscode.window.activeTextEditor; + if (!activeEditor) { + throw new Error('No active editor'); + } + const contextRange: languageClient.Range = { + start: activeEditor.selection.active, + end: activeEditor.selection.active, + }; + const textDocument: languageClient.TextDocumentIdentifier = { uri: activeEditor.document.fileName }; const request: RunTestsParams = { textDocument: textDocument, range: contextRange, attachDebugger: debug }; - await runTests(request, languageServer, dotnetTestChannel); + return runTests(request, languageServer, dotnetTestChannel); } let _testRunInProgress = false; @@ -55,16 +63,19 @@ async function runTests( request: RunTestsParams, languageServer: RoslynLanguageServer, dotnetTestChannel: vscode.OutputChannel -) { +): Promise { if (_testRunInProgress) { vscode.window.showErrorMessage('Test run already in progress'); return; } + request.runSettingsPath = getRunSettings(request.textDocument.uri, dotnetTestChannel); + _testRunInProgress = true; dotnetTestChannel.show(true); - vscode.window + let lastProgress: TestProgress | undefined = undefined; + await vscode.window .withProgress( { location: vscode.ProgressLocation.Notification, @@ -87,6 +98,7 @@ async function runTests( const reportIncrement = ((completed - totalReportedComplete) / totalTests) * 100; progress.report({ message: output.stage, increment: reportIncrement }); totalReportedComplete = completed; + lastProgress = output.progress; } else { progress.report({ message: output.stage }); } @@ -121,7 +133,40 @@ async function runTests( } ) .then( - () => (_testRunInProgress = false), - () => (_testRunInProgress = false) + () => { + _testRunInProgress = false; + }, + () => { + _testRunInProgress = false; + } ); + + return lastProgress; +} + +function getRunSettings(documentUri: string, dotnetTestChannel: vscode.OutputChannel): string | undefined { + const runSettingsPathOption = commonOptions.runSettingsPath; + if (runSettingsPathOption.length === 0) { + return undefined; + } + + let absolutePath = runSettingsPathOption; + if (!path.isAbsolute(runSettingsPathOption)) { + // Path is relative to the workspace. Create absolute path. + const workspaceFolder = vscode.workspace.getWorkspaceFolder(vscode.Uri.parse(documentUri)); + if (workspaceFolder === undefined) { + dotnetTestChannel.appendLine( + `Warning: Unable to find workspace folder for ${documentUri}, cannot resolve run settings path ${runSettingsPathOption}.` + ); + return undefined; + } + absolutePath = path.join(workspaceFolder.uri.fsPath, runSettingsPathOption); + } + + if (!fs.existsSync(absolutePath)) { + dotnetTestChannel.appendLine(`Warning: Unable to find run settings file at ${absolutePath}.`); + return undefined; + } + + return absolutePath; } diff --git a/src/main.ts b/src/main.ts index 9b8d9e42d..0e25b424e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -26,7 +26,6 @@ import { addJSONProviders } from './features/json/jsonContributions'; import { ProjectStatusBarObserver } from './observers/projectStatusBarObserver'; import { vscodeNetworkSettingsProvider } from './networkSettings'; import { ErrorMessageObserver } from './observers/errorMessageObserver'; -import OptionProvider from './shared/observers/optionProvider'; import DotNetTestChannelObserver from './observers/dotnetTestChannelObserver'; import DotNetTestLoggerObserver from './observers/dotnetTestLoggerObserver'; import createOptionStream from './shared/observables/createOptionStream'; @@ -39,12 +38,7 @@ import { installRuntimeDependencies } from './installRuntimeDependencies'; import { isValidDownload } from './packageManager/isValidDownload'; import { BackgroundWorkStatusBarObserver } from './observers/backgroundWorkStatusBarObserver'; import { getDotnetPackApi } from './dotnetPack'; -import { - RoslynLanguageServer, - SolutionSnapshotProvider, - activateRoslynLanguageServer, - waitForProjectInitialization, -} from './lsptoolshost/roslynLanguageServer'; +import { RoslynLanguageServer, activateRoslynLanguageServer } from './lsptoolshost/roslynLanguageServer'; import { MigrateOptions } from './shared/migrateOptions'; import { getBrokeredServiceContainer } from './lsptoolshost/services/brokeredServicesHosting'; import { CSharpDevKitExports } from './csharpDevKitExports'; @@ -56,13 +50,18 @@ import { BlazorDebugConfigurationProvider } from './razor/src/blazorDebug/blazor import { RazorOmnisharpDownloader } from './razor/razorOmnisharpDownloader'; import { RoslynLanguageServerExport } from './lsptoolshost/roslynLanguageServerExportChannel'; import { registerOmnisharpOptionChanges } from './omnisharp/omnisharpOptionChanges'; +import { RoslynLanguageServerEvents } from './lsptoolshost/languageServerEvents'; +import { ServerStateChange } from './lsptoolshost/serverStateChange'; +import { SolutionSnapshotProvider } from './lsptoolshost/services/solutionSnapshotProvider'; +import { RazorTelemetryDownloader } from './razor/razorTelemetryDownloader'; +import { commonOptions, omnisharpOptions, razorOptions } from './shared/options'; +import { debugSessionTracker } from './coreclrDebug/provisionalDebugSessionTracker'; export async function activate( context: vscode.ExtensionContext ): Promise { await MigrateOptions(vscode); const optionStream = createOptionStream(vscode); - const optionProvider = new OptionProvider(optionStream); const eventStream = new EventStream(); @@ -85,12 +84,10 @@ export async function activate( const requiredPackageIds: string[] = ['Debugger']; - const razorOptions = optionProvider.GetLatestOptions().razorOptions; requiredPackageIds.push('Razor'); - const csharpDevkitExtension = vscode.extensions.getExtension(csharpDevkitExtensionId); - const useOmnisharpServer = - !csharpDevkitExtension && optionProvider.GetLatestOptions().commonOptions.useOmnisharpServer; + const csharpDevkitExtension = getCSharpDevKit(); + const useOmnisharpServer = !csharpDevkitExtension && commonOptions.useOmnisharpServer; if (useOmnisharpServer) { requiredPackageIds.push('OmniSharp'); } @@ -98,8 +95,10 @@ export async function activate( // If the dotnet bundle is installed, this will ensure the dotnet CLI is on the path. await initializeDotnetPath(); + const useModernNetOption = omnisharpOptions.useModernNet; + const networkSettingsProvider = vscodeNetworkSettingsProvider(vscode); - const useFramework = useOmnisharpServer && optionProvider.GetLatestOptions().omnisharpOptions.useModernNet !== true; + const useFramework = useOmnisharpServer && useModernNetOption !== true; const installDependencies: IInstallDependencies = async (dependencies: AbsolutePathPackage[]) => downloadAndInstallPackages(dependencies, networkSettingsProvider, eventStream, isValidDownload); const runtimeDependenciesExist = await ensureRuntimeDependencies( @@ -113,10 +112,28 @@ export async function activate( let omnisharpLangServicePromise: Promise | undefined = undefined; let omnisharpRazorPromise: Promise | undefined = undefined; - let roslynLanguageServerPromise: Promise | undefined = undefined; + const roslynLanguageServerEvents = new RoslynLanguageServerEvents(); + context.subscriptions.push(roslynLanguageServerEvents); + let roslynLanguageServerStartedPromise: Promise | undefined = undefined; + let razorLanguageServerStartedPromise: Promise | undefined = undefined; let projectInitializationCompletePromise: Promise | undefined = undefined; if (!useOmnisharpServer) { + // Download Razor server telemetry bits if DevKit is installed. + if (csharpDevkitExtension) { + const razorTelemetryDownloader = new RazorTelemetryDownloader( + networkSettingsProvider, + eventStream, + context.extension.packageJSON, + platformInfo, + context.extension.extensionPath + ); + + await razorTelemetryDownloader.DownloadAndInstallRazorTelemetry( + context.extension.packageJSON.defaults.razorTelemetry + ); + } + // Activate Razor. Needs to be activated before Roslyn so commands are registered in the correct order. // Otherwise, if Roslyn starts up first, they could execute commands that don't yet exist on Razor's end. // @@ -125,23 +142,33 @@ export async function activate( // Roslyn starts up and registers Razor-specific didOpen/didClose/didChange commands and sends request to Razor // for dynamic file info once project system is ready -> // Razor sends didOpen commands to Roslyn for generated docs and responds to request with dynamic file info - await activateRazorExtension( + razorLanguageServerStartedPromise = activateRazorExtension( context, context.extension.extensionPath, eventStream, + csharpDevkitExtension, + platformInfo, /* useOmnisharpServer */ false ); - context.subscriptions.push(optionProvider); - roslynLanguageServerPromise = activateRoslynLanguageServer( + // Setup a listener for project initialization complete before we start the server. + projectInitializationCompletePromise = new Promise((resolve, _) => { + roslynLanguageServerEvents.onServerStateChange(async (state) => { + if (state === ServerStateChange.ProjectInitializationComplete) { + resolve(); + } + }); + }); + + // Start the server, but do not await the completion to avoid blocking activation. + roslynLanguageServerStartedPromise = activateRoslynLanguageServer( context, platformInfo, - optionProvider, optionStream, csharpChannel, - dotnetTestChannel + dotnetTestChannel, + roslynLanguageServerEvents ); - projectInitializationCompletePromise = waitForProjectInitialization(); } else { const dotnetChannel = vscode.window.createOutputChannel('.NET'); const dotnetChannelObserver = new DotNetChannelObserver(dotnetChannel); @@ -156,17 +183,17 @@ export async function activate( const omnisharpChannel = vscode.window.createOutputChannel('OmniSharp Log'); const omnisharpLogObserver = new OmnisharpLoggerObserver(omnisharpChannel, platformInfo); - const omnisharpChannelObserver = new OmnisharpChannelObserver(omnisharpChannel, optionProvider); + const omnisharpChannelObserver = new OmnisharpChannelObserver(omnisharpChannel); eventStream.subscribe(omnisharpLogObserver.post); eventStream.subscribe(omnisharpChannelObserver.post); const warningMessageObserver = new WarningMessageObserver( vscode, - () => optionProvider.GetLatestOptions().omnisharpOptions.disableMSBuildDiagnosticWarning || false + () => omnisharpOptions.disableMSBuildDiagnosticWarning || false ); eventStream.subscribe(warningMessageObserver.post); - const informationMessageObserver = new InformationMessageObserver(vscode, optionProvider); + const informationMessageObserver = new InformationMessageObserver(vscode); eventStream.subscribe(informationMessageObserver.post); const errorMessageObserver = new ErrorMessageObserver(vscode); @@ -232,12 +259,10 @@ export async function activate( platformInfo, networkSettingsProvider, eventStream, - optionProvider, context.extension.extensionPath, omnisharpChannel ); - context.subscriptions.push(optionProvider); context.subscriptions.push(registerOmnisharpOptionChanges(optionStream)); // register JSON completion & hover providers for project.json @@ -253,6 +278,8 @@ export async function activate( context, context.extension.extensionPath, eventStream, + undefined, + platformInfo, /* useOmnisharpServer */ true ); } @@ -289,26 +316,34 @@ export async function activate( context, platformInfo, eventStream, - csharpChannel, - optionProvider + csharpChannel ); } if (!useOmnisharpServer) { + debugSessionTracker.initializeDebugSessionHandlers(context); + tryGetCSharpDevKitExtensionExports(csharpLogObserver); - const languageServerExport = new RoslynLanguageServerExport(roslynLanguageServerPromise!); + // If we got here, the server should definitely have been created. + util.isNotNull(roslynLanguageServerStartedPromise); + util.isNotNull(projectInitializationCompletePromise); + + const languageServerExport = new RoslynLanguageServerExport(roslynLanguageServerStartedPromise); return { initializationFinished: async () => { await coreClrDebugPromise; - await roslynLanguageServerPromise; + await razorLanguageServerStartedPromise; + await roslynLanguageServerStartedPromise; await projectInitializationCompletePromise; }, - profferBrokeredServices: (container) => profferBrokeredServices(context, container), + profferBrokeredServices: (container) => + profferBrokeredServices(context, container, roslynLanguageServerStartedPromise!), logDirectory: context.logUri.fsPath, determineBrowserType: BlazorDebugConfigurationProvider.determineBrowserType, experimental: { sendServerRequest: async (t, p, ct) => await languageServerExport.sendRequest(t, p, ct), + languageServerEvents: roslynLanguageServerEvents, }, }; } else { @@ -354,9 +389,9 @@ function tryGetCSharpDevKitExtensionExports(csharpLogObserver: CsharpLoggerObser ]); // Notify the vsdbg configuration provider that C# dev kit has been loaded. - exports.serverProcessLoaded(async () => - coreclrdebug.initializeBrokeredServicePipeName(await exports.getBrokeredServiceServerPipeName()) - ); + exports.serverProcessLoaded(async () => { + debugSessionTracker.onCsDevKitInitialized(await exports.getBrokeredServiceServerPipeName()); + }); vscode.commands.executeCommand('setContext', 'dotnet.debug.serviceBrokerAvailable', true); } else { @@ -371,11 +406,15 @@ function tryGetCSharpDevKitExtensionExports(csharpLogObserver: CsharpLoggerObser ); } -function profferBrokeredServices(context: vscode.ExtensionContext, serviceContainer: GlobalBrokeredServiceContainer) { +function profferBrokeredServices( + context: vscode.ExtensionContext, + serviceContainer: GlobalBrokeredServiceContainer, + languageServerPromise: Promise +) { context.subscriptions.push( serviceContainer.profferServiceFactory( Descriptors.solutionSnapshotProviderRegistration, - (_mk, _op, _sb) => new SolutionSnapshotProvider() + (_mk, _op, _sb) => new SolutionSnapshotProvider(languageServerPromise) ) ); } diff --git a/src/observers/informationMessageObserver.ts b/src/observers/informationMessageObserver.ts index 58d958fd9..e68ee6b45 100644 --- a/src/observers/informationMessageObserver.ts +++ b/src/observers/informationMessageObserver.ts @@ -7,10 +7,10 @@ import * as ObservableEvent from '../omnisharp/loggingEvents'; import { vscode } from '../vscodeAdapter'; import showInformationMessage from '../shared/observers/utils/showInformationMessage'; import { EventType } from '../omnisharp/eventType'; -import OptionProvider from '../shared/observers/optionProvider'; +import { omnisharpOptions } from '../shared/options'; export class InformationMessageObserver { - constructor(private vscode: vscode, private optionProvider: OptionProvider) {} + constructor(private vscode: vscode) {} public post = (event: ObservableEvent.BaseEvent) => { switch (event.type) { @@ -22,7 +22,7 @@ export class InformationMessageObserver { private async handleOmnisharpServerUnresolvedDependencies() { //to do: determine if we need the unresolved dependencies message - if (!this.optionProvider.GetLatestOptions().omnisharpOptions.suppressDotnetRestoreNotification) { + if (!omnisharpOptions.suppressDotnetRestoreNotification) { const message = `There are unresolved dependencies. Please execute the restore command to continue.`; return showInformationMessage(this.vscode, message, { title: 'Restore', command: 'dotnet.restore.all' }); } diff --git a/src/observers/omnisharpChannelObserver.ts b/src/observers/omnisharpChannelObserver.ts index 3ab763dc3..d0b5f6930 100644 --- a/src/observers/omnisharpChannelObserver.ts +++ b/src/observers/omnisharpChannelObserver.ts @@ -7,10 +7,10 @@ import { BaseChannelObserver } from './baseChannelObserver'; import { OutputChannel } from '../vscodeAdapter'; import { BaseEvent } from '../omnisharp/loggingEvents'; import { EventType } from '../omnisharp/eventType'; -import OptionProvider from '../shared/observers/optionProvider'; +import { omnisharpOptions } from '../shared/options'; export class OmnisharpChannelObserver extends BaseChannelObserver { - constructor(channel: OutputChannel, private optionProvider: OptionProvider) { + constructor(channel: OutputChannel) { super(channel); } @@ -30,7 +30,7 @@ export class OmnisharpChannelObserver extends BaseChannelObserver { }; private async handleOmnisharpServerOnStdErr() { - if (this.optionProvider.GetLatestOptions().omnisharpOptions.showOmnisharpLogOnError) { + if (omnisharpOptions.showOmnisharpLogOnError) { this.showChannel(true); } } diff --git a/src/omnisharp/decompilationPrompt.ts b/src/omnisharp/decompilationPrompt.ts index 48a966b75..e4ae10676 100644 --- a/src/omnisharp/decompilationPrompt.ts +++ b/src/omnisharp/decompilationPrompt.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import OptionProvider from '../shared/observers/optionProvider'; +import { omnisharpOptions } from '../shared/options'; const DecompilationAuthorizedOption = 'csharp.decompilationAuthorized'; @@ -12,10 +12,9 @@ export async function resetDecompilationAuthorization(context: vscode.ExtensionC context.globalState.update(DecompilationAuthorizedOption, undefined); } -export async function getDecompilationAuthorization(context: vscode.ExtensionContext, optionProvider: OptionProvider) { +export async function getDecompilationAuthorization(context: vscode.ExtensionContext) { // If decompilation is disabled, then return false - const options = optionProvider.GetLatestOptions(); - if (options.omnisharpOptions.enableDecompilationSupport === false) { + if (omnisharpOptions.enableDecompilationSupport === false) { return false; } diff --git a/src/omnisharp/dotnetResolver.ts b/src/omnisharp/dotnetResolver.ts index f71ce8c73..5d1c2ab4b 100644 --- a/src/omnisharp/dotnetResolver.ts +++ b/src/omnisharp/dotnetResolver.ts @@ -9,20 +9,21 @@ import * as semver from 'semver'; import { promisify } from 'util'; import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation'; import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { Options } from '../shared/options'; import { PlatformInformation } from '../shared/platform'; +import { commonOptions } from '../shared/options'; export class DotnetResolver implements IHostExecutableResolver { private readonly minimumDotnetVersion = '6.0.100'; constructor(private platformInfo: PlatformInformation) {} - public async getHostExecutableInfo(options: Options): Promise { + public async getHostExecutableInfo(): Promise { const dotnet = this.platformInfo.isWindows() ? 'dotnet.exe' : 'dotnet'; const env = { ...process.env }; - if (options.commonOptions.dotnetPath.length > 0) { - env['PATH'] = options.commonOptions.dotnetPath + path.delimiter + env['PATH']; + const dotnetPathOption = commonOptions.dotnetPath; + if (dotnetPathOption.length > 0) { + env['PATH'] = dotnetPathOption + path.delimiter + env['PATH']; } // Test the dotnet exe for version @@ -45,7 +46,7 @@ export class DotnetResolver implements IHostExecutableResolver { return { version: result.stdout, - path: options.commonOptions.dotnetPath, + path: dotnetPathOption, env, }; } diff --git a/src/omnisharp/engines/IEngine.ts b/src/omnisharp/engines/IEngine.ts index 2a2863504..59b227686 100644 --- a/src/omnisharp/engines/IEngine.ts +++ b/src/omnisharp/engines/IEngine.ts @@ -5,21 +5,18 @@ import { CancellationToken } from '../../vscodeAdapter'; import { LaunchTarget } from '../../shared/launchTarget'; -import { Options } from '../../shared/options'; import Disposable from '../../disposable'; import { OmniSharpServer } from '../server'; import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import OptionProvider from '../../shared/observers/optionProvider'; import { Advisor } from '../../features/diagnosticsProvider'; import TestManager from '../../features/dotnetTest'; import { EventStream } from '../../eventStream'; export interface IEngine { - start(cwd: string, args: string[], launchTarget: LaunchTarget, launchPath: string, options: Options): Promise; + start(cwd: string, args: string[], launchTarget: LaunchTarget, launchPath: string): Promise; stop(): Promise; registerProviders( server: OmniSharpServer, - optionProvider: OptionProvider, languageMiddlewareFeature: LanguageMiddlewareFeature, eventStream: EventStream, advisor: Advisor, diff --git a/src/omnisharp/engines/lspEngine.ts b/src/omnisharp/engines/lspEngine.ts index 9af149cd8..de0a3176d 100644 --- a/src/omnisharp/engines/lspEngine.ts +++ b/src/omnisharp/engines/lspEngine.ts @@ -8,7 +8,6 @@ import { CancellationToken } from '../../vscodeAdapter'; import { configure } from '../launcher'; import { LaunchTarget } from '../../shared/launchTarget'; import { EventEmitter } from 'events'; -import { Options } from '../../shared/options'; import { setTimeout } from 'timers'; import * as ObservableEvents from '../loggingEvents'; import { EventStream } from '../../eventStream'; @@ -24,7 +23,7 @@ import { Command, DynamicFeature, LanguageClientOptions, - RequestType0, + RequestType, StaticFeature, Trace, } from 'vscode-languageclient'; @@ -34,7 +33,6 @@ import { ColorProviderFeature } from 'vscode-languageclient/lib/common/colorProv import { WorkspaceFoldersFeature } from 'vscode-languageclient/lib/common/workspaceFolder'; import { DeclarationFeature } from 'vscode-languageclient/lib/common/declaration'; import { DocumentLinkFeature } from 'vscode-languageclient/lib/common/documentLink'; -import { InlayHintsFeature } from 'vscode-languageclient/lib/common/inlayHint'; import { InlineValueFeature } from 'vscode-languageclient/lib/common/inlineValue'; import { DiagnosticFeature } from 'vscode-languageclient/lib/common/diagnostic'; import { NotebookDocumentSyncFeature } from 'vscode-languageclient/lib/common/notebook'; @@ -42,7 +40,6 @@ import { TypeHierarchyFeature } from 'vscode-languageclient/lib/common/typeHiera import { CallHierarchyFeature } from 'vscode-languageclient/lib/common/callHierarchy'; import { Advisor } from '../../features/diagnosticsProvider'; import dotnetTest from '../../features/dotnetTest'; -import OptionProvider from '../../shared/observers/optionProvider'; export class LspEngine implements IEngine { client: LanguageClient | undefined; @@ -60,19 +57,12 @@ export class LspEngine implements IEngine { private _initializeTask: Promise | undefined; - public async start( - cwd: string, - args: string[], - launchTarget: LaunchTarget, - launchPath: string, - options: Options - ): Promise { + public async start(cwd: string, args: string[], launchTarget: LaunchTarget, launchPath: string): Promise { const configuration = await configure( cwd, ['-lsp', '--encoding', 'ascii'].concat(args), launchPath, this.platformInfo, - options, this.monoResolver, this.dotnetResolver ); @@ -249,6 +239,10 @@ export class LspEngine implements IEngine { const result = await next(document, position, token); return result; }, + async provideInlayHints(document, range, token, next) { + const result = await next(document, range, token); + return result; + }, }, }; @@ -282,7 +276,7 @@ export class LspEngine implements IEngine { //disableFeature(FoldingRangeFeature); //disableFeature(HoverFeature); // This feature does not always seem to be working. Wonder if requests are coming in too early. //disableFeature(ImplementationFeature); // Needs metadata document/source generated document support - disableFeature(InlayHintsFeature); // The csharp-language-server-protocol library needs to update with 3.17 changes + //disableFeature(InlayHintsFeature); // The csharp-language-server-protocol library needs to update with 3.17 changes disableFeature(InlineValueFeature); // Not implemented in O# disableFeature(NotebookDocumentSyncFeature); // Not implemented in O# //disableFeature(ReferencesFeature); // Needs metadata document/source generated document support @@ -316,7 +310,6 @@ export class LspEngine implements IEngine { async registerProviders( _server: OmniSharpServer, - _optionProvider: OptionProvider, _languageMiddlewareFeature: LanguageMiddlewareFeature, _eventStream: EventStream, _advisor: Advisor, @@ -342,8 +335,8 @@ export class LspEngine implements IEngine { return this._initializeTask; async function waitForReady(client: LanguageClient) { - const statusRequest = new RequestType0('o#/checkreadystatus'); - while (!(await client.sendRequest(statusRequest))) { + const statusRequest = new RequestType('o#/checkreadystatus'); + while (!(await client.sendRequest(statusRequest, {}))) { await new Promise((r) => setTimeout(r, 100)); } } diff --git a/src/omnisharp/engines/stdioEngine.ts b/src/omnisharp/engines/stdioEngine.ts index 0fdf79a5c..b6d5889ae 100644 --- a/src/omnisharp/engines/stdioEngine.ts +++ b/src/omnisharp/engines/stdioEngine.ts @@ -11,7 +11,7 @@ import { LaunchTarget } from '../../shared/launchTarget'; import { ReadLine, createInterface } from 'readline'; import { Request, RequestQueueCollection } from '../requestQueue'; import { EventEmitter } from 'events'; -import { Options } from '../../shared/options'; +import { omnisharpOptions } from '../../shared/options'; import { PlatformInformation } from '../../shared/platform'; import { launchOmniSharp } from '../launcher'; import { setTimeout } from 'timers'; @@ -46,7 +46,6 @@ import OmniSharpCodeActionProvider from '../../features/codeActionProvider'; import forwardChanges from '../../features/changeForwarding'; import OmniSharpDefinitionProvider from '../../features/definitionProvider'; import reportDiagnostics, { Advisor } from '../../features/diagnosticsProvider'; -import OptionProvider from '../../shared/observers/optionProvider'; import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; import TestManager from '../../features/dotnetTest'; import { OmniSharpStructureProvider } from '../../features/structureProvider'; @@ -74,7 +73,6 @@ export class StdioEngine implements IEngine { async registerProviders( server: OmniSharpServer, - optionProvider: OptionProvider, languageMiddlewareFeature: LanguageMiddlewareFeature, eventStream: EventStream, advisor: Advisor, @@ -84,8 +82,6 @@ export class StdioEngine implements IEngine { language: 'csharp', }; - const options = optionProvider.GetLatestOptions(); - // register language feature provider on start const localDisposables = new CompositeDisposable(); @@ -100,7 +96,7 @@ export class StdioEngine implements IEngine { localDisposables.add( vscode.languages.registerCodeLensProvider( documentSelector, - new OmniSharpCodeLensProvider(server, testManager, optionProvider, languageMiddlewareFeature) + new OmniSharpCodeLensProvider(server, testManager, languageMiddlewareFeature) ) ); localDisposables.add( @@ -127,7 +123,7 @@ export class StdioEngine implements IEngine { new OmniSharpRenameProvider(server, languageMiddlewareFeature) ) ); - if (options.omnisharpOptions.useFormatting) { + if (omnisharpOptions.useFormatting) { localDisposables.add( vscode.languages.registerDocumentRangeFormattingEditProvider( documentSelector, @@ -156,12 +152,7 @@ export class StdioEngine implements IEngine { ); localDisposables.add( vscode.languages.registerWorkspaceSymbolProvider( - new OmniSharpWorkspaceSymbolProvider( - server, - optionProvider, - languageMiddlewareFeature, - sourceGeneratedDocumentProvider - ) + new OmniSharpWorkspaceSymbolProvider(server, languageMiddlewareFeature, sourceGeneratedDocumentProvider) ) ); localDisposables.add( @@ -183,7 +174,7 @@ export class StdioEngine implements IEngine { OmniSharpFixAllProvider.metadata ) ); - localDisposables.add(reportDiagnostics(server, advisor, languageMiddlewareFeature, optionProvider)); + localDisposables.add(reportDiagnostics(server, advisor, languageMiddlewareFeature)); const definitionProvider = new OmniSharpDefinitionProvider( server, @@ -221,7 +212,7 @@ export class StdioEngine implements IEngine { localDisposables.add(forwardChanges(server)); // Since the CodeActionProvider registers its own commands, we must instantiate it and add it to the localDisposables // so that it will be cleaned up if OmniSharp is restarted. - const codeActionProvider = new OmniSharpCodeActionProvider(server, optionProvider, languageMiddlewareFeature); + const codeActionProvider = new OmniSharpCodeActionProvider(server, languageMiddlewareFeature); localDisposables.add(codeActionProvider); localDisposables.add(vscode.languages.registerCodeActionsProvider(documentSelector, codeActionProvider)); @@ -234,11 +225,7 @@ export class StdioEngine implements IEngine { ); localDisposables.add(fileOpenClose(server)); - const semanticTokensProvider = new OmniSharpSemanticTokensProvider( - server, - optionProvider, - languageMiddlewareFeature - ); + const semanticTokensProvider = new OmniSharpSemanticTokensProvider(server, languageMiddlewareFeature); localDisposables.add( vscode.languages.registerDocumentSemanticTokensProvider( documentSelector, @@ -317,19 +304,12 @@ export class StdioEngine implements IEngine { return new Disposable(() => this._eventBus.removeListener(event, listener)); } - public async start( - cwd: string, - args: string[], - launchTarget: LaunchTarget, - launchPath: string, - options: Options - ): Promise { + public async start(cwd: string, args: string[], launchTarget: LaunchTarget, launchPath: string): Promise { const launchResult = await launchOmniSharp( cwd, args.concat('--encoding', 'utf-8'), launchPath, this.platformInfo, - options, this.monoResolver, this.dotnetResolver ); @@ -367,7 +347,7 @@ export class StdioEngine implements IEngine { let listener: Disposable; // Convert the timeout from the seconds to milliseconds, which is required by setTimeout(). - const timeoutDuration = options.omnisharpOptions.projectLoadTimeout * 1000; + const timeoutDuration = omnisharpOptions.projectLoadTimeout * 1000; // timeout logic const handle = setTimeout(() => { diff --git a/src/omnisharp/extension.ts b/src/omnisharp/extension.ts index 943d71569..c1cc041dd 100644 --- a/src/omnisharp/extension.ts +++ b/src/omnisharp/extension.ts @@ -17,7 +17,6 @@ import { EventStream } from '../eventStream'; import { NetworkSettingsProvider } from '../networkSettings'; import CompositeDisposable from '../compositeDisposable'; import Disposable from '../disposable'; -import OptionProvider from '../shared/observers/optionProvider'; import { OmniSharpMonoResolver } from './omniSharpMonoResolver'; import { getMonoVersion } from '../utils/getMonoVersion'; import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; @@ -25,6 +24,7 @@ import { getDecompilationAuthorization } from './decompilationPrompt'; import { DotnetResolver } from './dotnetResolver'; import { Advisor } from '../features/diagnosticsProvider'; import { OmnisharpWorkspaceDebugInformationProvider } from '../omnisharpWorkspaceDebugInformationProvider'; +import { omnisharpOptions, razorOptions } from '../shared/options'; export interface ActivationResult { readonly server: OmniSharpServer; @@ -38,13 +38,11 @@ export async function activate( platformInfo: PlatformInformation, provider: NetworkSettingsProvider, eventStream: EventStream, - optionProvider: OptionProvider, extensionPath: string, outputChannel: vscode.OutputChannel ) { const disposables = new CompositeDisposable(); - const options = optionProvider.GetLatestOptions(); const omnisharpMonoResolver = new OmniSharpMonoResolver(getMonoVersion); const omnisharpDotnetResolver = new DotnetResolver(platformInfo); @@ -52,7 +50,7 @@ export async function activate( languageMiddlewareFeature.register(); disposables.add(languageMiddlewareFeature); - const decompilationAuthorized = await getDecompilationAuthorization(context, optionProvider); + const decompilationAuthorized = await getDecompilationAuthorization(context); const server = new OmniSharpServer( vscode, @@ -60,7 +58,6 @@ export async function activate( packageJSON, platformInfo, eventStream, - optionProvider, extensionPath, omnisharpMonoResolver, omnisharpDotnetResolver, @@ -69,8 +66,8 @@ export async function activate( outputChannel, languageMiddlewareFeature ); - const advisor = new Advisor(server, optionProvider); // create before server is started - const testManager = new TestManager(optionProvider, server, eventStream, languageMiddlewareFeature); + const advisor = new Advisor(server); // create before server is started + const testManager = new TestManager(server, eventStream, languageMiddlewareFeature); const workspaceInformationProvider = new OmnisharpWorkspaceDebugInformationProvider(server); let registrations: Disposable | undefined; @@ -94,7 +91,6 @@ export async function activate( server, platformInfo, eventStream, - optionProvider, omnisharpMonoResolver, omnisharpDotnetResolver, workspaceInformationProvider @@ -163,7 +159,7 @@ export async function activate( disposables.add( server.onBeforeServerStart((path) => { - if (options.razorOptions.razorDevMode) { + if (razorOptions.razorDevMode) { eventStream.post(new RazorDevModeActive()); } @@ -172,7 +168,7 @@ export async function activate( }) ); - if (options.omnisharpOptions.autoStart) { + if (omnisharpOptions.autoStart) { server.autoStart(context.workspaceState.get('lastSolutionPathOrFolder', '')); } @@ -189,12 +185,7 @@ export async function activate( disposables.add( vscode.debug.registerDebugConfigurationProvider( 'coreclr', - new DotnetWorkspaceConfigurationProvider( - workspaceInformationProvider, - platformInfo, - optionProvider, - outputChannel - ) + new DotnetWorkspaceConfigurationProvider(workspaceInformationProvider, platformInfo, outputChannel) ) ); diff --git a/src/omnisharp/launcher.ts b/src/omnisharp/launcher.ts index 0fa7c2018..b239ab332 100644 --- a/src/omnisharp/launcher.ts +++ b/src/omnisharp/launcher.ts @@ -9,7 +9,7 @@ import { ChildProcessWithoutNullStreams } from 'child_process'; import { PlatformInformation } from '../shared/platform'; import * as path from 'path'; import * as vscode from 'vscode'; -import { Options } from '../shared/options'; +import { commonOptions, omnisharpOptions } from '../shared/options'; import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; import { LaunchTarget, LaunchTargetKind, createLaunchTargetForSolution } from '../shared/launchTarget'; @@ -35,14 +35,14 @@ export const disabledSchemes = new Set([vsls]); * (if it doesn't contain a `project.json` file, but `project.json` files exist). In addition, the root folder * is included if there are any `*.csproj` files present, but a `*.sln` or `*.slnf` file is not found. */ -export async function findLaunchTargets(options: Options): Promise { +export async function findLaunchTargets(): Promise { if (!vscode.workspace.workspaceFolders) { return Promise.resolve([]); } const projectFiles = await vscode.workspace.findFiles( /*include*/ '{**/*.sln,**/*.slnf,**/*.csproj,**/project.json,**/*.csx,**/*.cake}', - /*exclude*/ `{${options.omnisharpOptions.projectFilesExcludePattern}}` + /*exclude*/ `{${omnisharpOptions.projectFilesExcludePattern}}` ); const csFiles = await vscode.workspace.findFiles( @@ -54,7 +54,7 @@ export async function findLaunchTargets(options: Options): Promise { return new Promise((resolve, reject) => { - launch(cwd, args, launchPath, platformInfo, options, monoResolver, dotnetResolver) + launch(cwd, args, launchPath, platformInfo, monoResolver, dotnetResolver) .then((result) => { // async error - when target not not ENEOT result.process.on('error', (err) => { @@ -323,11 +322,10 @@ export async function configure( args: string[], launchPath: string, platformInfo: PlatformInformation, - options: Options, monoResolver: IHostExecutableResolver, dotnetResolver: IHostExecutableResolver ): Promise { - if (options.omnisharpOptions.useEditorFormattingSettings) { + if (omnisharpOptions.useEditorFormattingSettings) { const globalConfig = vscode.workspace.getConfiguration('', null); const csharpConfig = vscode.workspace.getConfiguration('[csharp]', null); @@ -352,7 +350,7 @@ export async function configure( ); } - if (options.omnisharpOptions.useModernNet) { + if (omnisharpOptions.useModernNet) { const argsCopy = args.slice(0); let command: string; @@ -364,7 +362,7 @@ export async function configure( argsCopy.unshift(launchPath); } - const dotnetInfo = await dotnetResolver.getHostExecutableInfo(options); + const dotnetInfo = await dotnetResolver.getHostExecutableInfo(); return { hostKind: '.NET', @@ -391,13 +389,13 @@ export async function configure( }; } - const monoInfo = await monoResolver.getHostExecutableInfo(options); + const monoInfo = await monoResolver.getHostExecutableInfo(); if (monoInfo !== undefined) { const argsCopy = args.slice(0); // create copy of details args argsCopy.unshift(launchPath); argsCopy.unshift('--assembly-loader=strict'); - if (options.commonOptions.waitForDebugger) { + if (commonOptions.waitForDebugger) { argsCopy.unshift('--debug'); argsCopy.unshift('--debugger-agent=transport=dt_socket,server=y,address=127.0.0.1:55555'); } @@ -422,19 +420,10 @@ async function launch( args: string[], launchPath: string, platformInfo: PlatformInformation, - options: Options, monoResolver: IHostExecutableResolver, dotnetResolver: IHostExecutableResolver ): Promise { - const configureResults = await configure( - cwd, - args, - launchPath, - platformInfo, - options, - monoResolver, - dotnetResolver - ); + const configureResults = await configure(cwd, args, launchPath, platformInfo, monoResolver, dotnetResolver); return coreLaunch(platformInfo, configureResults); } diff --git a/src/omnisharp/omniSharpMonoResolver.ts b/src/omnisharp/omniSharpMonoResolver.ts index 6e240e1fb..6e3df3434 100644 --- a/src/omnisharp/omniSharpMonoResolver.ts +++ b/src/omnisharp/omniSharpMonoResolver.ts @@ -8,24 +8,25 @@ import * as path from 'path'; import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation'; import { IGetMonoVersion } from '../constants/IGetMonoVersion'; -import { Options } from '../shared/options'; +import { omnisharpOptions } from '../shared/options'; export class OmniSharpMonoResolver implements IHostExecutableResolver { private readonly minimumMonoVersion = '6.4.0'; constructor(private getMonoVersion: IGetMonoVersion) {} - public async getHostExecutableInfo(options: Options): Promise { + public async getHostExecutableInfo(): Promise { const env = { ...process.env }; - if (options.omnisharpOptions.monoPath.length > 0) { - env['PATH'] = path.join(options.omnisharpOptions.monoPath, 'bin') + path.delimiter + env['PATH']; - env['MONO_GAC_PREFIX'] = options.omnisharpOptions.monoPath; + const monoPath = omnisharpOptions.monoPath; + if (monoPath.length > 0) { + env['PATH'] = path.join(monoPath, 'bin') + path.delimiter + env['PATH']; + env['MONO_GAC_PREFIX'] = monoPath; } const monoVersion = await this.getMonoVersion(env); if (monoVersion === undefined) { - const suggestedAction = options.omnisharpOptions.monoPath + const suggestedAction = monoPath ? "Update the \"omnisharp.monoPath\" setting to point to the folder containing Mono's '/bin' folder." : "Ensure that Mono's '/bin' folder is added to your environment's PATH variable."; throw new Error(`Unable to find Mono. ${suggestedAction}`); @@ -39,7 +40,7 @@ export class OmniSharpMonoResolver implements IHostExecutableResolver { return { version: monoVersion, - path: options.omnisharpOptions.monoPath, + path: monoPath, env, }; } diff --git a/src/omnisharp/omnisharpOptionChanges.ts b/src/omnisharp/omnisharpOptionChanges.ts index 73297b2ed..7b56b8eb7 100644 --- a/src/omnisharp/omnisharpOptionChanges.ts +++ b/src/omnisharp/omnisharpOptionChanges.ts @@ -5,12 +5,12 @@ import * as vscode from 'vscode'; import { HandleOptionChanges, OptionChangeObserver } from '../shared/observers/optionChangeObserver'; -import { CommonOptionsThatTriggerReload, OmnisharpOptionsThatTriggerReload, Options } from '../shared/options'; +import { CommonOptionsThatTriggerReload, OmnisharpOptionsThatTriggerReload } from '../shared/options'; import ShowInformationMessage from '../shared/observers/utils/showInformationMessage'; import { Observable } from 'rxjs'; import Disposable from '../disposable'; -export function registerOmnisharpOptionChanges(optionObservable: Observable): Disposable { +export function registerOmnisharpOptionChanges(optionObservable: Observable): Disposable { const optionChangeObserver: OptionChangeObserver = { getRelevantOptions: () => { return { diff --git a/src/omnisharp/requirementCheck.ts b/src/omnisharp/requirementCheck.ts index 781044c6d..4b3282569 100644 --- a/src/omnisharp/requirementCheck.ts +++ b/src/omnisharp/requirementCheck.ts @@ -6,10 +6,10 @@ import * as vscode from 'vscode'; import * as semver from 'semver'; import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { Options } from '../shared/options'; import { getMonoVersion } from '../utils/getMonoVersion'; import { OmniSharpMonoResolver } from './omniSharpMonoResolver'; import { getMSBuildVersion } from '../utils/getMsBuildInfo'; +import { omnisharpOptions } from '../shared/options'; export interface RequirementResult { needsDotNetSdk: boolean; @@ -17,8 +17,8 @@ export interface RequirementResult { needsMSBuildTools: boolean; } -export async function validateRequirements(options: Options): Promise { - const result = await checkRequirements(options); +export async function validateRequirements(): Promise { + const result = await checkRequirements(); if (result.needsDotNetSdk) { const downloadSdk = await promptToDownloadDotNetSDK(); @@ -51,9 +51,9 @@ export async function validateRequirements(options: Options): Promise { return true; } -async function checkRequirements(options: Options): Promise { - if (options.omnisharpOptions.useModernNet) { - const dotnetInfo = await getDotnetInfo(options.omnisharpOptions.dotNetCliPaths); +async function checkRequirements(): Promise { + if (omnisharpOptions.useModernNet) { + const dotnetInfo = await getDotnetInfo(omnisharpOptions.dotNetCliPaths); const needsDotNetSdk = dotnetInfo.Version === undefined || semver.lt(dotnetInfo.Version, '6.0.0'); return { needsDotNetSdk, @@ -73,7 +73,7 @@ async function checkRequirements(options: Options): Promise { const monoResolver = new OmniSharpMonoResolver(getMonoVersion); let monoError = false; try { - await monoResolver.getHostExecutableInfo(options); + await monoResolver.getHostExecutableInfo(); } catch (e) { monoError = true; } diff --git a/src/omnisharp/server.ts b/src/omnisharp/server.ts index b55c0f4f8..8163b1d66 100644 --- a/src/omnisharp/server.ts +++ b/src/omnisharp/server.ts @@ -21,7 +21,6 @@ import { Subject } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; import CompositeDisposable from '../compositeDisposable'; import Disposable from '../disposable'; -import OptionProvider from '../shared/observers/optionProvider'; import { ExtensionContext, OutputChannel } from 'vscode'; import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; import { LspEngine } from './engines/lspEngine'; @@ -34,6 +33,7 @@ import { Advisor } from '../features/diagnosticsProvider'; import TestManager from '../features/dotnetTest'; import { findLaunchTargets } from './launcher'; import { ProjectConfigurationMessage } from '../shared/projectConfiguration'; +import { commonOptions, omnisharpOptions, razorOptions } from '../shared/options'; enum ServerState { Starting, @@ -112,7 +112,6 @@ export class OmniSharpServer { private packageJSON: any, private platformInfo: PlatformInformation, private eventStream: EventStream, - private optionProvider: OptionProvider, private extensionPath: string, private monoResolver: IHostExecutableResolver, private dotnetResolver: IHostExecutableResolver, @@ -299,9 +298,7 @@ export class OmniSharpServer { return; } - const options = this.optionProvider.GetLatestOptions(); - - if (!(await validateRequirements(options))) { + if (!(await validateRequirements())) { this.eventStream.post( new ObservableEvents.OmnisharpServerMessage( 'OmniSharp failed to start because of missing requirements.' @@ -313,7 +310,6 @@ export class OmniSharpServer { const disposables = new CompositeDisposable(); let engine: IEngine | undefined; - const omnisharpOptions = options.omnisharpOptions; if (omnisharpOptions.enableLspDriver) { engine = new LspEngine( this._eventBus, @@ -416,7 +412,7 @@ export class OmniSharpServer { const solutionPath = launchTarget.target; const cwd = path.dirname(solutionPath); - const args = [ + const args: string[] = [ '-z', '-s', solutionPath, @@ -427,11 +423,11 @@ export class OmniSharpServer { omnisharpOptions.loggingLevel, ]; - const razorOptions = options.razorOptions; + const razorPluginPathOption = razorOptions.razorPluginPath; // Razor support only exists for certain platforms, so only load the plugin if present const razorPluginPath = - razorOptions.razorPluginPath.length > 0 - ? razorOptions.razorPluginPath + razorPluginPathOption.length > 0 + ? razorPluginPathOption : path.join( this.extensionPath, '.razoromnisharp', @@ -442,12 +438,13 @@ export class OmniSharpServer { args.push('--plugin', razorPluginPath); } - if (options.commonOptions.waitForDebugger === true) { + if (commonOptions.waitForDebugger === true) { args.push('--debug'); } - for (let i = 0; i < options.commonOptions.excludePaths.length; i++) { - args.push(`FileOptions:SystemExcludeSearchPatterns:${i}=${options.commonOptions.excludePaths[i]}`); + const excludePath = commonOptions.excludePaths; + for (let i = 0; i < excludePath.length; i++) { + args.push(`FileOptions:SystemExcludeSearchPatterns:${i}=${excludePath[i]}`); } if (omnisharpOptions.enableMsBuildLoadProjectsOnDemand === true) { @@ -478,21 +475,24 @@ export class OmniSharpServer { args.push('RoslynExtensionsOptions:EnableAsyncCompletion=true'); } - if (omnisharpOptions.sdkPath.length > 0) { - args.push(`Sdk:Path=${omnisharpOptions.sdkPath}`); + const sdkPath = omnisharpOptions.sdkPath; + if (sdkPath.length > 0) { + args.push(`Sdk:Path=${sdkPath}`); } - if (omnisharpOptions.sdkVersion.length > 0) { - args.push(`Sdk:Version=${omnisharpOptions.sdkVersion}`); + const sdkVersion = omnisharpOptions.sdkVersion; + if (sdkVersion.length > 0) { + args.push(`Sdk:Version=${sdkVersion}`); } if (omnisharpOptions.sdkIncludePrereleases) { args.push(`Sdk:IncludePrereleases=true`); } - if (omnisharpOptions.inlayHintsEnableForParameters === true) { + const enableInlayHintsForParameters = omnisharpOptions.inlayHintsEnableForParameters; + if (enableInlayHintsForParameters === true) { args.push( - `RoslynExtensionsOptions:InlayHintsOptions:EnableForParameters=${omnisharpOptions.inlayHintsEnableForParameters.toString()}` + `RoslynExtensionsOptions:InlayHintsOptions:EnableForParameters=${enableInlayHintsForParameters.toString()}` ); args.push( `RoslynExtensionsOptions:InlayHintsOptions:ForLiteralParameters=${omnisharpOptions.inlayHintsForLiteralParameters.toString()}` @@ -517,9 +517,10 @@ export class OmniSharpServer { ); } - if (omnisharpOptions.inlayHintsEnableForTypes === true) { + const enableInlayHintsForTypes = omnisharpOptions.inlayHintsEnableForTypes; + if (enableInlayHintsForTypes === true) { args.push( - `RoslynExtensionsOptions:InlayHintsOptions:EnableForTypes=${omnisharpOptions.inlayHintsEnableForTypes.toString()}` + `RoslynExtensionsOptions:InlayHintsOptions:EnableForTypes=${enableInlayHintsForTypes.toString()}` ); args.push( `RoslynExtensionsOptions:InlayHintsOptions:ForImplicitVariableTypes=${omnisharpOptions.inlayHintsForImplicitVariableTypes.toString()}` @@ -536,15 +537,16 @@ export class OmniSharpServer { args.push('RoslynExtensionsOptions:AnalyzeOpenDocumentsOnly=true'); } - for (let i = 0; i < omnisharpOptions.dotNetCliPaths.length; i++) { - args.push(`DotNetCliOptions:LocationPaths:${i}=${omnisharpOptions.dotNetCliPaths[i]}`); + const dotnetCliPaths = omnisharpOptions.dotNetCliPaths; + for (let i = 0; i < dotnetCliPaths.length; i++) { + args.push(`DotNetCliOptions:LocationPaths:${i}=${dotnetCliPaths[i]}`); } let launchPath: string; try { launchPath = await this._omnisharpManager.GetOmniSharpLaunchPath( this.packageJSON.defaults.omniSharp, - options.commonOptions.serverPath, + commonOptions.serverPath, /* useFramework */ !omnisharpOptions.useModernNet, this.extensionPath ); @@ -559,13 +561,11 @@ export class OmniSharpServer { return; } - this.eventStream.post( - new ObservableEvents.OmnisharpInitialisation(omnisharpOptions.dotNetCliPaths, new Date(), solutionPath) - ); + this.eventStream.post(new ObservableEvents.OmnisharpInitialisation(dotnetCliPaths, new Date(), solutionPath)); this._fireEvent(Events.BeforeServerStart, solutionPath); try { - await engine.start(cwd, args, launchTarget, launchPath, options); + await engine.start(cwd, args, launchTarget, launchPath); this._setState({ status: ServerState.Started, @@ -602,14 +602,7 @@ export class OmniSharpServer { } const { engine } = this._state; - return await engine.registerProviders( - this, - this.optionProvider, - this.languageMiddlewareFeature, - eventStream, - advisor, - testManager - ); + return await engine.registerProviders(this, this.languageMiddlewareFeature, eventStream, advisor, testManager); } private onProjectConfigurationReceived(listener: (e: ProjectConfigurationMessage) => void) { @@ -678,8 +671,7 @@ export class OmniSharpServer { } public async autoStart(preferredPath: string): Promise { - const options = this.optionProvider.GetLatestOptions(); - const launchTargets = await findLaunchTargets(options); + const launchTargets = await findLaunchTargets(); // If there aren't any potential launch targets, we create file watcher and try to // start the server again once a *.sln, *.slnf, *.csproj, project.json, CSX or Cake file is created. @@ -707,7 +699,7 @@ export class OmniSharpServer { } // First, try to launch against something that matches the user's preferred target - const defaultLaunchSolutionConfigValue = this.optionProvider.GetLatestOptions().commonOptions.defaultSolution; + const defaultLaunchSolutionConfigValue = commonOptions.defaultSolution; const defaultLaunchSolutionTarget = launchTargets.find( (a) => path.basename(a.target) === defaultLaunchSolutionConfigValue ); diff --git a/src/omnisharpWorkspaceDebugInformationProvider.ts b/src/omnisharpWorkspaceDebugInformationProvider.ts index 94653f88a..76c035b0b 100644 --- a/src/omnisharpWorkspaceDebugInformationProvider.ts +++ b/src/omnisharpWorkspaceDebugInformationProvider.ts @@ -44,11 +44,12 @@ export class OmnisharpWorkspaceDebugInformationProvider implements IWorkspaceDeb * Note: serverUtils.requestWorkspaceInformation only retrieves one folder for multi-root workspaces. Therefore, generator will be incorrect for all folders * except the first in a workspace. Currently, this only works if the requested folder is the same as the server's solution path or folder. */ - return projects?.filter((p) => { + const projectsInWorkspace = projects?.filter((p) => { // Get absolute paths of current folder and server folder. const workspaceFolder = path.resolve(workspacePath.fsPath); const projectFolder = path.dirname(p.projectPath); return isSubfolderOf(projectFolder, workspaceFolder); }); + return projectsInWorkspace; } } diff --git a/src/razor/razor.ts b/src/razor/razor.ts index 862e7d16b..43df5df31 100644 --- a/src/razor/razor.ts +++ b/src/razor/razor.ts @@ -9,11 +9,14 @@ import * as path from 'path'; import * as vscode from 'vscode'; import * as Razor from '../../src/razor/src/extension'; import { EventStream } from '../eventStream'; +import { PlatformInformation } from '../shared/platform'; export async function activateRazorExtension( context: vscode.ExtensionContext, extensionPath: string, eventStream: EventStream, + csharpDevkitExtension: vscode.Extension | undefined, + platformInfo: PlatformInformation, useOmnisharpServer: boolean ) { const razorConfig = vscode.workspace.getConfiguration('razor'); @@ -35,7 +38,15 @@ export async function activateRazorExtension( /* enableProposedApis: */ false ); } else { - await Razor.activate(vscode, context, languageServerDir, eventStream, /* enableProposedApis: */ false); + await Razor.activate( + vscode, + context, + languageServerDir, + eventStream, + csharpDevkitExtension, + platformInfo, + /* enableProposedApis: */ false + ); } } else { vscode.window.showWarningMessage( diff --git a/src/razor/razorTelemetryDownloader.ts b/src/razor/razorTelemetryDownloader.ts new file mode 100644 index 000000000..c3ad95e7c --- /dev/null +++ b/src/razor/razorTelemetryDownloader.ts @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { PlatformInformation } from '../shared/platform'; +import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from '../omnisharp/loggingEvents'; +import { EventStream } from '../eventStream'; +import { NetworkSettingsProvider } from '../networkSettings'; +import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages'; +import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils'; +import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall'; +import { isValidDownload } from '../packageManager/isValidDownload'; + +export class RazorTelemetryDownloader { + public constructor( + private networkSettingsProvider: NetworkSettingsProvider, + private eventStream: EventStream, + private packageJSON: any, + private platformInfo: PlatformInformation, + private extensionPath: string + ) {} + + public async DownloadAndInstallRazorTelemetry(version: string): Promise { + const runtimeDependencies = getRuntimeDependenciesPackages(this.packageJSON); + const razorPackages = runtimeDependencies.filter((inputPackage) => inputPackage.id === 'RazorTelemetry'); + const packagesToInstall = await getAbsolutePathPackagesToInstall( + razorPackages, + this.platformInfo, + this.extensionPath + ); + + if (packagesToInstall.length > 0) { + this.eventStream.post(new PackageInstallation(`Razor Telemetry Version = ${version}`)); + this.eventStream.post(new LogPlatformInfo(this.platformInfo)); + if ( + await downloadAndInstallPackages( + packagesToInstall, + this.networkSettingsProvider, + this.eventStream, + isValidDownload + ) + ) { + this.eventStream.post(new InstallationSuccess()); + return true; + } + } + + return false; + } +} diff --git a/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts b/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts index 4afa69663..9530e493b 100644 --- a/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts +++ b/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts @@ -3,11 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import execa = require('execa'); import { promises, readFileSync } from 'fs'; import { join } from 'path'; import { fileURLToPath } from 'url'; import * as vscode from 'vscode'; -import { ChromeBrowserFinder, EdgeBrowserFinder } from 'vscode-js-debug-browsers'; +import { ChromeBrowserFinder, EdgeBrowserFinder } from '@vscode/js-debug-browsers'; import { RazorLogger } from '../razorLogger'; import { JS_DEBUG_NAME, SERVER_APP_NAME } from './constants'; import { onDidTerminateDebugSession } from './terminateDebugHandler'; @@ -180,28 +181,33 @@ export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurati public static async determineBrowserType(): Promise { // There was no browser specified by the user, so we will do some auto-detection to find a browser, - // favoring chrome if multiple valid options are installed. - const chromeBrowserFinder = new ChromeBrowserFinder(process.env, promises, null); - const chromeInstallations = await chromeBrowserFinder.findAll(); - if (chromeInstallations.length > 0) { + // favoring Edge if multiple valid options are installed. + const edgeBrowserFinder = new EdgeBrowserFinder(process.env, promises, execa); + const edgeInstallations = await edgeBrowserFinder.findAll(); + if (edgeInstallations.length > 0) { showInformationMessage( vscode, - BlazorDebugConfigurationProvider.autoDetectUserNotice.replace('{0}', `'Chrome'`) + BlazorDebugConfigurationProvider.autoDetectUserNotice.replace('{0}', `'Edge'`) ); - return BlazorDebugConfigurationProvider.chromeBrowserType; + + return BlazorDebugConfigurationProvider.edgeBrowserType; } - const edgeBrowserFinder = new EdgeBrowserFinder(process.env, promises, null); - const edgeInstallations = await edgeBrowserFinder.findAll(); - if (edgeInstallations.length > 0) { + const chromeBrowserFinder = new ChromeBrowserFinder(process.env, promises, execa); + const chromeInstallations = await chromeBrowserFinder.findAll(); + if (chromeInstallations.length > 0) { showInformationMessage( vscode, - BlazorDebugConfigurationProvider.autoDetectUserNotice.replace('{0}', `'Edge'`) + BlazorDebugConfigurationProvider.autoDetectUserNotice.replace('{0}', `'Chrome'`) ); - return BlazorDebugConfigurationProvider.edgeBrowserType; + + return BlazorDebugConfigurationProvider.chromeBrowserType; } - showErrorMessage(vscode, vscode.l10n.t('Run and Debug: A valid browser is not installed')); + showErrorMessage( + vscode, + vscode.l10n.t('Run and Debug: A valid browser is not installed. Please install Edge or Chrome.') + ); return undefined; } } diff --git a/src/razor/src/codeActions/codeActionsHandler.ts b/src/razor/src/codeActions/codeActionsHandler.ts index abd382827..017f1f611 100644 --- a/src/razor/src/codeActions/codeActionsHandler.ts +++ b/src/razor/src/codeActions/codeActionsHandler.ts @@ -9,11 +9,11 @@ import { RazorDocumentManager } from '../document/razorDocumentManager'; import { RazorLanguageServerClient } from '../razorLanguageServerClient'; import { RazorLogger } from '../razorLogger'; import { SerializableDelegatedCodeActionParams } from './serializableDelegatedCodeActionParams'; -import { RoslynLanguageServer } from '../../../lsptoolshost/roslynLanguageServer'; import { LanguageKind } from '../rpc/languageKind'; import { UriConverter } from '../../../lsptoolshost/uriConverter'; import { SerializableRazorResolveCodeActionParams } from './serializableRazorResolveCodeActionParams'; import { RazorDocumentSynchronizer } from '../document/razorDocumentSynchronizer'; +import { provideCodeActionsCommand, resolveCodeActionCommand } from '../../../lsptoolshost/razorCommands'; export class CodeActionsHandler { private static readonly provideCodeActionsEndpoint = 'razor/provideCodeActions'; @@ -84,9 +84,7 @@ export class CodeActionsHandler { const virtualCSharpUri = UriConverter.serialize(razorDocument.csharpDocument.uri); codeActionParams.textDocument = TextDocumentIdentifier.create(virtualCSharpUri); - return ( - await vscode.commands.executeCommand(RoslynLanguageServer.provideCodeActionsCommand, codeActionParams) - ); + return await vscode.commands.executeCommand(provideCodeActionsCommand, codeActionParams); } catch (error) { this.logger.logWarning(`${CodeActionsHandler.provideCodeActionsEndpoint} failed with ${error}`); } @@ -124,9 +122,7 @@ export class CodeActionsHandler { // Call Roslyn. Since this code action came from Roslyn, we don't even have to point it // to the virtual C# document. - return ( - await vscode.commands.executeCommand(RoslynLanguageServer.resolveCodeActionCommand, codeAction) - ); + return await vscode.commands.executeCommand(resolveCodeActionCommand, codeAction); } catch (error) { this.logger.logWarning(`${CodeActionsHandler.resolveCodeActionsEndpoint} failed with ${error}`); } diff --git a/src/razor/src/completion/provisionalCompletionOrchestrator.ts b/src/razor/src/completion/provisionalCompletionOrchestrator.ts index 62d446ac3..28d171482 100644 --- a/src/razor/src/completion/provisionalCompletionOrchestrator.ts +++ b/src/razor/src/completion/provisionalCompletionOrchestrator.ts @@ -134,7 +134,8 @@ export class ProvisionalCompletionOrchestrator { htmlPosition, provisionalPosition, completionContext, - projection.languageKind + projection.languageKind, + newDocument ); // We track when we add provisional dots to avoid doing unnecessary work on commonly invoked events. diff --git a/src/razor/src/completion/razorCompletionItemProvider.ts b/src/razor/src/completion/razorCompletionItemProvider.ts index a76aadd04..39a65dbf1 100644 --- a/src/razor/src/completion/razorCompletionItemProvider.ts +++ b/src/razor/src/completion/razorCompletionItemProvider.ts @@ -12,7 +12,6 @@ import { RazorLogger } from '../razorLogger'; import { getUriPath } from '../uriPaths'; import { ProvisionalCompletionOrchestrator } from './provisionalCompletionOrchestrator'; import { LanguageKind } from '../rpc/languageKind'; -import { RoslynLanguageServer } from '../../../lsptoolshost/roslynLanguageServer'; import { CompletionItem, CompletionList, @@ -23,6 +22,7 @@ import { import { UriConverter } from '../../../lsptoolshost/uriConverter'; import * as RazorConventions from '../razorConventions'; import { MappingHelpers } from '../mapping/mappingHelpers'; +import { provideCompletionsCommand, resolveCompletionsCommand } from '../../../lsptoolshost/razorCommands'; export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implements vscode.CompletionItemProvider { public static async getCompletions( @@ -30,7 +30,8 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem hostDocumentPosition: vscode.Position, projectedPosition: vscode.Position, context: vscode.CompletionContext, - language: LanguageKind + language: LanguageKind, + razorDocument: vscode.TextDocument ) { if (projectedUri) { // "@" is not a valid trigger character for C# / HTML and therefore we need to translate @@ -59,7 +60,7 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem // that field because it doesn't exist in the declared vs code // CompletionItem type. completions = await vscode.commands.executeCommand( - RoslynLanguageServer.provideCompletionsCommand, + provideCompletionsCommand, params ); } else { @@ -86,6 +87,11 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem // In the code behind it's represented as __o = DateTime. const completionCharacterOffset = projectedPosition.character - hostDocumentPosition.character; for (const completionItem of completionItems) { + // vscode.CompletionItemKind is off by one compared to the LSP CompletionItemKind. + if (completionItem.kind !== undefined) { + completionItem.kind = completionItem.kind - 1; + } + const doc = completionItem.documentation as vscode.MarkdownString; if (doc && doc.value) { // Without this, the documentation doesn't get rendered in the editor. @@ -166,6 +172,8 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem } } + this.addUsingKeyword(language, razorDocument, hostDocumentPosition, completionItems); + const isIncomplete = completions instanceof Array ? false : completions ? completions.isIncomplete : false; return new vscode.CompletionList(completionItems, isIncomplete); } @@ -221,7 +229,8 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem position, projection.position, context, - projection.languageKind + projection.languageKind, + document ); return completionList; @@ -236,7 +245,7 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem // equivalent vscode command to generically do that. if ((item).data) { const newItem = await vscode.commands.executeCommand( - RoslynLanguageServer.resolveCompletionsCommand, + resolveCompletionsCommand, item ); @@ -278,6 +287,38 @@ export class RazorCompletionItemProvider extends RazorLanguageFeatureBase implem return item; } + + private static addUsingKeyword( + language: LanguageKind, + razorDocument: vscode.TextDocument, + hostDocumentPosition: vscode.Position, + completionItems: vscode.CompletionItem[] + ) { + // This is an ugly hack, but it's needed to get the "using" keyword to show up in the completion list. + // The reason it doesn't show up is because the C# generated document puts the position of the cursor + // at '__o = [||]', which isn't a valid location for a using statement. + if (language == LanguageKind.CSharp) { + const line = razorDocument.lineAt(hostDocumentPosition.line); + const lineText = line.text.substring(0, hostDocumentPosition.character); + if ( + lineText.endsWith('@') || + lineText.endsWith( + '@u' || + lineText.endsWith('@us') || + lineText.endsWith('@usi') || + lineText.endsWith('@usin') || + lineText.endsWith('@using') + ) + ) { + const usingItem = new vscode.CompletionItem('using', vscode.CompletionItemKind.Keyword); + + // Matching Roslyn's documentation behavior + (usingItem).documentation = vscode.l10n.t('{0} Keyword', 'using'); + + completionItems.push(usingItem); + } + } + } } function getTriggerKind(triggerKind: vscode.CompletionTriggerKind): CompletionTriggerKind { diff --git a/src/razor/src/csharp/csharpProjectedDocument.ts b/src/razor/src/csharp/csharpProjectedDocument.ts index 5919e8687..3366d1590 100644 --- a/src/razor/src/csharp/csharpProjectedDocument.ts +++ b/src/razor/src/csharp/csharpProjectedDocument.ts @@ -29,6 +29,14 @@ export class CSharpProjectedDocument implements IProjectedDocument { return this.projectedDocumentVersion; } + public get length(): number { + return this.content.length; + } + + public clear() { + this.setContent(''); + } + public update(edits: ServerTextChange[], hostDocumentVersion: number) { this.removeProvisionalDot(); diff --git a/src/razor/src/diagnostics/razorDiagnosticHandler.ts b/src/razor/src/diagnostics/razorDiagnosticHandler.ts index 321348057..8c63228f4 100644 --- a/src/razor/src/diagnostics/razorDiagnosticHandler.ts +++ b/src/razor/src/diagnostics/razorDiagnosticHandler.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import { DocumentDiagnosticReport, DocumentDiagnosticParams, RequestType } from 'vscode-languageclient'; import { RazorLanguageServerClient } from '../razorLanguageServerClient'; -import { RoslynLanguageServer } from '../../../lsptoolshost/roslynLanguageServer'; import { RazorDocumentManager } from '../document/razorDocumentManager'; import { UriConverter } from '../../../lsptoolshost/uriConverter'; import { RazorLanguageServiceClient } from '../razorLanguageServiceClient'; import { RazorLanguageFeatureBase } from '../razorLanguageFeatureBase'; import { RazorDocumentSynchronizer } from '../document/razorDocumentSynchronizer'; import { RazorLogger } from '../razorLogger'; +import { roslynPullDiagnosticCommand } from '../../../lsptoolshost/razorCommands'; export class RazorDiagnosticHandler extends RazorLanguageFeatureBase { private static readonly razorPullDiagnosticsCommand = 'razor/csharpPullDiagnostics'; @@ -52,7 +52,7 @@ export class RazorDiagnosticHandler extends RazorLanguageFeatureBase { const virtualCSharpUri = razorDocument.csharpDocument.uri; request.textDocument.uri = UriConverter.serialize(virtualCSharpUri); const response: DocumentDiagnosticReport = await vscode.commands.executeCommand( - RoslynLanguageServer.roslynPullDiagnosticCommand, + roslynPullDiagnosticCommand, request ); diff --git a/src/razor/src/document/razorDocumentManager.ts b/src/razor/src/document/razorDocumentManager.ts index 411358873..656a6fb85 100644 --- a/src/razor/src/document/razorDocumentManager.ts +++ b/src/razor/src/document/razorDocumentManager.ts @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../../../lsptoolshost/roslynLanguageServer'; import { CSharpProjectedDocument } from '../csharp/csharpProjectedDocument'; import { HtmlProjectedDocument } from '../html/htmlProjectedDocument'; import { RazorLanguage } from '../razorLanguage'; import { RazorLanguageServerClient } from '../razorLanguageServerClient'; import { RazorLogger } from '../razorLogger'; +import { TelemetryReporter } from '../telemetryReporter'; import { UpdateBufferRequest } from '../rpc/updateBufferRequest'; import { getUriPath } from '../uriPaths'; import { IRazorDocument } from './IRazorDocument'; @@ -17,6 +17,7 @@ import { IRazorDocumentChangeEvent } from './IRazorDocumentChangeEvent'; import { IRazorDocumentManager } from './IRazorDocumentManager'; import { RazorDocumentChangeKind } from './razorDocumentChangeKind'; import { createDocument } from './razorDocumentFactory'; +import { razorInitializeCommand } from '../../../lsptoolshost/razorCommands'; export class RazorDocumentManager implements IRazorDocumentManager { public roslynActivated = false; @@ -27,9 +28,12 @@ export class RazorDocumentManager implements IRazorDocumentManager { private readonly onRazorInitializedEmitter = new vscode.EventEmitter(); public razorDocumentGenerationInitialized = false; - private anyRazorDocumentOpen = false; - constructor(private readonly serverClient: RazorLanguageServerClient, private readonly logger: RazorLogger) {} + constructor( + private readonly serverClient: RazorLanguageServerClient, + private readonly logger: RazorLogger, + private readonly telemetryReporter: TelemetryReporter + ) {} public get onChange() { return this.onChangeEmitter.event; @@ -156,7 +160,6 @@ export class RazorDocumentManager implements IRazorDocumentManager { } private async openDocument(uri: vscode.Uri) { - this.anyRazorDocumentOpen = true; await this.ensureRazorInitialized(); const document = this._getDocument(uri); @@ -165,14 +168,13 @@ export class RazorDocumentManager implements IRazorDocumentManager { } public async ensureRazorInitialized() { - // On first open of a Razor document, we kick off the generation of all razor documents so that - // components are discovered correctly. If we do this early, when we initialize everything, we - // just spend a lot of time generating documents and json files that might not be needed. - // If we wait for each individual document to be opened by the user, then locally defined components - // don't work, which is a poor experience. This is the compromise. - if (this.roslynActivated && !this.razorDocumentGenerationInitialized && this.anyRazorDocumentOpen) { + // Kick off the generation of all Razor documents so that components are + // discovered correctly. We need to do this even if a Razor file isn't + // open yet to handle the scenario where the user opens a C# file before + // a Razor file. + if (this.roslynActivated && !this.razorDocumentGenerationInitialized) { this.razorDocumentGenerationInitialized = true; - vscode.commands.executeCommand(RoslynLanguageServer.razorInitializeCommand); + vscode.commands.executeCommand(razorInitializeCommand); for (const document of this.documents) { await this.ensureDocumentAndProjectedDocumentsOpen(document); } @@ -230,6 +232,7 @@ export class RazorDocumentManager implements IRazorDocumentManager { const projectedDocument = document.csharpDocument; if ( + updateBufferRequest.previousWasEmpty || !projectedDocument.hostDocumentSyncVersion || projectedDocument.hostDocumentSyncVersion <= updateBufferRequest.hostDocumentVersion ) { @@ -240,6 +243,15 @@ export class RazorDocumentManager implements IRazorDocumentManager { await vscode.workspace.openTextDocument(document.csharpDocument.uri); const csharpProjectedDocument = projectedDocument as CSharpProjectedDocument; + + // If the language server is telling us that the previous document was empty, then we should clear + // ours out. Hopefully ours would have been empty too, but there are cases where things get out of + // sync + if (updateBufferRequest.previousWasEmpty && projectedDocument.length !== 0) { + this.telemetryReporter.reportBuffersOutOfSync(); + csharpProjectedDocument.clear(); + } + csharpProjectedDocument.update(updateBufferRequest.changes, updateBufferRequest.hostDocumentVersion); this.notifyDocumentChange(document, RazorDocumentChangeKind.csharpChanged); @@ -263,6 +275,7 @@ export class RazorDocumentManager implements IRazorDocumentManager { const projectedDocument = document.htmlDocument; if ( + updateBufferRequest.previousWasEmpty || !projectedDocument.hostDocumentSyncVersion || projectedDocument.hostDocumentSyncVersion <= updateBufferRequest.hostDocumentVersion ) { @@ -273,6 +286,15 @@ export class RazorDocumentManager implements IRazorDocumentManager { await vscode.workspace.openTextDocument(document.htmlDocument.uri); const htmlProjectedDocument = projectedDocument as HtmlProjectedDocument; + + // If the language server is telling us that the previous document was empty, then we should clear + // ours out. Hopefully ours would have been empty too, but there are cases where things get out of + // sync + if (updateBufferRequest.previousWasEmpty && projectedDocument.length !== 0) { + this.telemetryReporter.reportBuffersOutOfSync(); + htmlProjectedDocument.clear(); + } + htmlProjectedDocument.update(updateBufferRequest.changes, updateBufferRequest.hostDocumentVersion); this.notifyDocumentChange(document, RazorDocumentChangeKind.htmlChanged); diff --git a/src/razor/src/extension.ts b/src/razor/src/extension.ts index 2ef7ef004..30e3e21b3 100644 --- a/src/razor/src/extension.ts +++ b/src/razor/src/extension.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as path from 'path'; import * as vscode from 'vscode'; import * as vscodeapi from 'vscode'; import { ExtensionContext } from 'vscode'; @@ -41,9 +42,15 @@ import { RazorReferenceProvider } from './reference/razorReferenceProvider'; import { RazorRenameProvider } from './rename/razorRenameProvider'; import { SemanticTokensRangeHandler } from './semantic/semanticTokensRangeHandler'; import { RazorSignatureHelpProvider } from './signatureHelp/razorSignatureHelpProvider'; -import { TelemetryReporter } from './telemetryReporter'; +import { TelemetryReporter as RazorTelemetryReporter } from './telemetryReporter'; import { RazorDiagnosticHandler } from './diagnostics/razorDiagnosticHandler'; import { RazorSimplifyMethodHandler } from './simplify/razorSimplifyMethodHandler'; +import { CSharpDevKitExports } from '../../csharpDevKitExports'; +import { DotnetRuntimeExtensionResolver } from '../../lsptoolshost/dotnetRuntimeExtensionResolver'; +import { PlatformInformation } from '../../shared/platform'; +import { RazorLanguageServerOptions } from './razorLanguageServerOptions'; +import { resolveRazorLanguageServerOptions } from './razorLanguageServerOptionsResolver'; +import { RazorFormatNewFileHandler } from './formatNewFile/razorFormatNewFileHandler'; // We specifically need to take a reference to a particular instance of the vscode namespace, // otherwise providers attempt to operate on the null extension. @@ -52,28 +59,64 @@ export async function activate( context: ExtensionContext, languageServerDir: string, eventStream: HostEventStream, + csharpDevkitExtension: vscode.Extension | undefined, + platformInfo: PlatformInformation, enableProposedApis = false ) { - const telemetryReporter = new TelemetryReporter(eventStream); + const razorTelemetryReporter = new RazorTelemetryReporter(eventStream); const eventEmitterFactory: IEventEmitterFactory = { create: () => new vscode.EventEmitter(), }; const languageServerTrace = resolveRazorLanguageServerTrace(vscodeType); - const logger = new RazorLogger(vscodeType, eventEmitterFactory, languageServerTrace); + const logger = new RazorLogger(eventEmitterFactory, languageServerTrace); try { + const razorOptions: RazorLanguageServerOptions = resolveRazorLanguageServerOptions( + vscodeType, + languageServerDir, + languageServerTrace, + logger + ); + + const hostExecutableResolver = new DotnetRuntimeExtensionResolver( + platformInfo, + () => razorOptions.serverPath, + logger.outputChannel, + context.extensionPath + ); + + const dotnetInfo = await hostExecutableResolver.getHostExecutableInfo(); + const dotnetRuntimePath = path.dirname(dotnetInfo.path); + + // Take care to always run .NET processes on the runtime that we intend. + // The dotnet.exe we point to should not go looking for other runtimes. + const env: NodeJS.ProcessEnv = { ...process.env }; + env.DOTNET_ROOT = dotnetRuntimePath; + env.DOTNET_MULTILEVEL_LOOKUP = '0'; + // Save user's DOTNET_ROOT env-var value so server can recover the user setting when needed + env.DOTNET_ROOT_USER = process.env.DOTNET_ROOT ?? 'EMPTY'; + + // Set up DevKit environment for telemetry + if (csharpDevkitExtension) { + await setupDevKitEnvironment(env, csharpDevkitExtension, logger); + } + const languageServerClient = new RazorLanguageServerClient( vscodeType, languageServerDir, - telemetryReporter, + razorTelemetryReporter, + csharpDevkitExtension !== undefined, + env, + dotnetInfo.path, logger ); + const languageServiceClient = new RazorLanguageServiceClient(languageServerClient); - const documentManager = new RazorDocumentManager(languageServerClient, logger); + const documentManager = new RazorDocumentManager(languageServerClient, logger, razorTelemetryReporter); const documentSynchronizer = new RazorDocumentSynchronizer(documentManager, logger); - reportTelemetryForDocuments(documentManager, telemetryReporter); + reportTelemetryForDocuments(documentManager, razorTelemetryReporter); const languageConfiguration = new RazorLanguageConfiguration(); const csharpFeature = new RazorCSharpFeature(documentManager, eventEmitterFactory, logger); const htmlFeature = new RazorHtmlFeature(documentManager, languageServiceClient, eventEmitterFactory, logger); @@ -99,7 +142,12 @@ export async function activate( languageServiceClient, logger ); - const semanticTokenHandler = new SemanticTokensRangeHandler(languageServerClient); + const semanticTokenHandler = new SemanticTokensRangeHandler( + documentManager, + documentSynchronizer, + languageServerClient, + logger + ); const colorPresentationHandler = new ColorPresentationHandler( documentManager, languageServerClient, @@ -188,6 +236,13 @@ export async function activate( documentManager, logger ); + const razorFormatNewFileHandler = new RazorFormatNewFileHandler( + documentSynchronizer, + languageServerClient, + languageServiceClient, + documentManager, + logger + ); localRegistrations.push( languageConfiguration.register(), @@ -232,6 +287,7 @@ export async function activate( razorDiagnosticHandler.register(), codeActionsHandler.register(), razorSimplifyMethodHandler.register(), + razorFormatNewFileHandler.register(), ]); }); @@ -252,7 +308,7 @@ export async function activate( context.subscriptions.push(languageServerClient, onStopRegistration, logger); } catch (error) { logger.logError('Failed when activating Razor VSCode.', error as Error); - telemetryReporter.reportErrorOnActivation(error as Error); + razorTelemetryReporter.reportErrorOnActivation(error as Error); } } @@ -284,3 +340,23 @@ async function startLanguageServer( await languageServerClient.start(); } } + +async function setupDevKitEnvironment( + env: NodeJS.ProcessEnv, + csharpDevkitExtension: vscode.Extension, + logger: RazorLogger +): Promise { + try { + const exports = await csharpDevkitExtension.activate(); + + // setupTelemetryEnvironmentAsync was a later addition to devkit (not in preview 1) + // so it may not exist in whatever version of devkit the user has installed + if (!exports.setupTelemetryEnvironmentAsync) { + return; + } + + await exports.setupTelemetryEnvironmentAsync(env); + } catch (error) { + logger.logError('Failed to setup DevKit environment for telemetry.', error as Error); + } +} diff --git a/src/razor/src/formatNewFile/razorFormatNewFileHandler.ts b/src/razor/src/formatNewFile/razorFormatNewFileHandler.ts new file mode 100644 index 000000000..998cd618d --- /dev/null +++ b/src/razor/src/formatNewFile/razorFormatNewFileHandler.ts @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import { RequestType } from 'vscode-languageclient'; +import { RazorLanguageServerClient } from '../razorLanguageServerClient'; +import { RazorDocumentManager } from '../document/razorDocumentManager'; +import { RazorLanguageServiceClient } from '../razorLanguageServiceClient'; +import { RazorLanguageFeatureBase } from '../razorLanguageFeatureBase'; +import { RazorDocumentSynchronizer } from '../document/razorDocumentSynchronizer'; +import { RazorLogger } from '../razorLogger'; +import { SerializableFormatNewFileParams } from './serializableFormatNewFileParams'; +import { roslynFormatNewFileCommand } from '../../../lsptoolshost/razorCommands'; + +export class RazorFormatNewFileHandler extends RazorLanguageFeatureBase { + private static readonly razorFormatNewFileCommand = 'razor/formatNewFile'; + private formatNewFileRequestType: RequestType = + new RequestType(RazorFormatNewFileHandler.razorFormatNewFileCommand); + + constructor( + documentSynchronizer: RazorDocumentSynchronizer, + protected readonly serverClient: RazorLanguageServerClient, + protected readonly serviceClient: RazorLanguageServiceClient, + protected readonly documentManager: RazorDocumentManager, + protected readonly logger: RazorLogger + ) { + super(documentSynchronizer, documentManager, serviceClient, logger); + } + + public async register() { + await this.serverClient.onRequestWithParams( + this.formatNewFileRequestType, + async (request: SerializableFormatNewFileParams, token: vscode.CancellationToken) => + this.getFormatNewFile(request, token) + ); + } + + private async getFormatNewFile( + request: SerializableFormatNewFileParams, + _: vscode.CancellationToken + ): Promise { + if (!this.documentManager.roslynActivated) { + return undefined; + } + + const response: string | undefined = await vscode.commands.executeCommand(roslynFormatNewFileCommand, request); + + return response; + } +} diff --git a/src/razor/src/formatNewFile/serializableFormatNewFileParams.ts b/src/razor/src/formatNewFile/serializableFormatNewFileParams.ts new file mode 100644 index 000000000..26227a24f --- /dev/null +++ b/src/razor/src/formatNewFile/serializableFormatNewFileParams.ts @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SerializableTextDocumentIdentifier } from '../rpc/serializableTextDocumentIdentifier'; + +export interface SerializableFormatNewFileParams { + project: SerializableTextDocumentIdentifier; + document: SerializableTextDocumentIdentifier; + contents: string; +} diff --git a/src/razor/src/html/htmlProjectedDocument.ts b/src/razor/src/html/htmlProjectedDocument.ts index 49abe831e..b8c2fc530 100644 --- a/src/razor/src/html/htmlProjectedDocument.ts +++ b/src/razor/src/html/htmlProjectedDocument.ts @@ -26,6 +26,14 @@ export class HtmlProjectedDocument implements IProjectedDocument { return this.projectedDocumentVersion; } + public get length(): number { + return this.content.length; + } + + public clear() { + this.setContent(''); + } + public update(edits: ServerTextChange[], hostDocumentVersion: number) { this.hostDocumentVersion = hostDocumentVersion; diff --git a/src/razor/src/projection/IProjectedDocument.ts b/src/razor/src/projection/IProjectedDocument.ts index 4b9270900..d4c8df1c8 100644 --- a/src/razor/src/projection/IProjectedDocument.ts +++ b/src/razor/src/projection/IProjectedDocument.ts @@ -10,5 +10,6 @@ export interface IProjectedDocument { readonly uri: vscode.Uri; readonly hostDocumentSyncVersion: number | null; readonly projectedDocumentSyncVersion: number; + readonly length: number; getContent(): string; } diff --git a/src/razor/src/razorLanguageServerClient.ts b/src/razor/src/razorLanguageServerClient.ts index f3acb5d89..b760a3e5b 100644 --- a/src/razor/src/razorLanguageServerClient.ts +++ b/src/razor/src/razorLanguageServerClient.ts @@ -3,7 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as path from 'path'; +import * as cp from 'child_process'; import { EventEmitter } from 'events'; +import * as util from '../../common'; import * as vscode from 'vscode'; import { RequestHandler, RequestType } from 'vscode-jsonrpc'; import { GenericNotificationHandler, InitializeResult, LanguageClientOptions, State } from 'vscode-languageclient'; @@ -13,7 +16,8 @@ import { RazorLanguageServerOptions } from './razorLanguageServerOptions'; import { resolveRazorLanguageServerOptions } from './razorLanguageServerOptionsResolver'; import { resolveRazorLanguageServerTrace } from './razorLanguageServerTraceResolver'; import { RazorLogger } from './razorLogger'; -import { TelemetryReporter } from './telemetryReporter'; +import { TelemetryReporter as RazorTelemetryReporter } from './telemetryReporter'; +import { randomUUID } from 'crypto'; const events = { ServerStop: 'ServerStop', @@ -33,7 +37,10 @@ export class RazorLanguageServerClient implements vscode.Disposable { constructor( private readonly vscodeType: typeof vscode, private readonly languageServerDir: string, - private readonly telemetryReporter: TelemetryReporter, + private readonly razorTelemetryReporter: RazorTelemetryReporter, + private readonly isCSharpDevKitActivated: boolean, + private readonly env: NodeJS.ProcessEnv, + private readonly dotnetExecutablePath: string, private readonly logger: RazorLogger ) { this.isStarted = false; @@ -128,7 +135,7 @@ export class RazorLanguageServerClient implements vscode.Disposable { ) ); - this.telemetryReporter.reportErrorOnServerStart(error as Error); + this.razorTelemetryReporter.reportErrorOnServerStart(error as Error); reject(error); } @@ -211,32 +218,21 @@ export class RazorLanguageServerClient implements vscode.Disposable { languageServerTrace, this.logger ); - this.clientOptions = { outputChannel: options.outputChannel, documentSelector: [{ language: RazorLanguage.id, pattern: RazorLanguage.globbingPattern }], }; const args: string[] = []; - let command = options.serverPath; - if (options.serverPath.endsWith('.dll')) { - this.logger.logMessage( - 'Razor Language Server path is an assembly. ' + - "Using 'dotnet' from the current path to start the server." - ); - - command = 'dotnet'; - args.push(options.serverPath); - } this.logger.logMessage(`Razor language server path: ${options.serverPath}`); args.push('--trace'); args.push(options.trace.toString()); - this.telemetryReporter.reportTraceLevel(options.trace); + this.razorTelemetryReporter.reportTraceLevel(options.trace); if (options.debug) { - this.telemetryReporter.reportDebugLanguageServer(); + this.razorTelemetryReporter.reportDebugLanguageServer(); this.logger.logMessage('Debug flag set for Razor Language Server.'); args.push('--debug'); @@ -245,16 +241,43 @@ export class RazorLanguageServerClient implements vscode.Disposable { // TODO: When all of this code is on GitHub, should we just pass `--omnisharp` as a flag to rzls, and let it decide? if (!options.usingOmniSharp) { args.push('--projectConfigurationFileName'); - args.push('project.razor.vscode.json'); + args.push('project.razor.vscode.bin'); args.push('--DelegateToCSharpOnDiagnosticPublish'); args.push('true'); - args.push('--SupportsDelegatedCodeActions'); - args.push('true'); args.push('--UpdateBuffersForClosedDocuments'); args.push('true'); + + if (this.isCSharpDevKitActivated) { + args.push('--sessionId', getSessionId()); + args.push( + '--telemetryExtensionPath', + path.join(util.getExtensionPath(), '.razortelemetry', 'Microsoft.VisualStudio.DevKit.Razor.dll') + ); + } } - this.serverOptions = { command, args }; + let childProcess: () => Promise; + const cpOptions: cp.SpawnOptionsWithoutStdio = { + detached: true, + windowsHide: true, + env: this.env, + }; + + if (options.serverPath.endsWith('.dll')) { + // If we were given a path to a dll, launch that via dotnet. + const argsWithPath = [options.serverPath].concat(args); + this.logger.logMessage(`Server arguments ${argsWithPath.join(' ')}`); + + childProcess = async () => cp.spawn(this.dotnetExecutablePath, argsWithPath, cpOptions); + } else { + // Otherwise assume we were given a path to an executable. + this.logger.logMessage(`Server arguments ${args.join(' ')}`); + + childProcess = async () => cp.spawn(options.serverPath, args, cpOptions); + } + + this.serverOptions = childProcess; + this.client = new LanguageClient( 'razorLanguageServer', 'Razor Language Server', @@ -263,3 +286,16 @@ export class RazorLanguageServerClient implements vscode.Disposable { ); } } + +// VS code will have a default session id when running under tests. Since we may still +// report telemetry, we need to give a unique session id instead of the default value. +function getSessionId(): string { + const sessionId = vscode.env.sessionId; + + // 'somevalue.sessionid' is the test session id provided by vs code + if (sessionId.toLowerCase() === 'somevalue.sessionid') { + return randomUUID(); + } + + return sessionId; +} diff --git a/src/razor/src/razorLogger.ts b/src/razor/src/razorLogger.ts index 8a2e5625a..970626783 100644 --- a/src/razor/src/razorLogger.ts +++ b/src/razor/src/razorLogger.ts @@ -15,21 +15,17 @@ export class RazorLogger implements vscodeAdapter.Disposable { public static readonly verbositySetting = 'razor.trace'; public verboseEnabled!: boolean; public messageEnabled!: boolean; - public readonly outputChannel: vscodeAdapter.OutputChannel; + public readonly outputChannel: vscode.OutputChannel; private readonly onLogEmitter: vscodeAdapter.EventEmitter; private readonly onTraceLevelChangeEmitter: vscodeAdapter.EventEmitter; - constructor( - private readonly vscodeApi: vscodeAdapter.api, - eventEmitterFactory: IEventEmitterFactory, - public trace: Trace - ) { + constructor(eventEmitterFactory: IEventEmitterFactory, public trace: Trace) { this.processTraceLevel(); this.onLogEmitter = eventEmitterFactory.create(); this.onTraceLevelChangeEmitter = eventEmitterFactory.create(); - this.outputChannel = this.vscodeApi.window.createOutputChannel(RazorLogger.logName); + this.outputChannel = vscode.window.createOutputChannel(RazorLogger.logName); this.logRazorInformation(); this.setupToStringOverrides(); diff --git a/src/razor/src/rpc/updateBufferRequest.ts b/src/razor/src/rpc/updateBufferRequest.ts index f5746d846..619886720 100644 --- a/src/razor/src/rpc/updateBufferRequest.ts +++ b/src/razor/src/rpc/updateBufferRequest.ts @@ -9,6 +9,7 @@ export class UpdateBufferRequest { constructor( public readonly hostDocumentVersion: number, public readonly hostDocumentFilePath: string, - public readonly changes: ServerTextChange[] + public readonly changes: ServerTextChange[], + public readonly previousWasEmpty: boolean ) {} } diff --git a/src/razor/src/semantic/provideSemanticTokensResponse.ts b/src/razor/src/semantic/provideSemanticTokensResponse.ts index 210cd0b41..ce787867d 100644 --- a/src/razor/src/semantic/provideSemanticTokensResponse.ts +++ b/src/razor/src/semantic/provideSemanticTokensResponse.ts @@ -3,9 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SemanticTokensResponse } from './semanticTokensResponse'; - export class ProvideSemanticTokensResponse { // tslint:disable-next-line: variable-name - constructor(public Result: SemanticTokensResponse, public HostDocumentSyncVersion: number | null) {} + constructor(public Tokens: number[], public HostDocumentSyncVersion: number) {} } diff --git a/src/razor/src/semantic/semanticTokensRangeHandler.ts b/src/razor/src/semantic/semanticTokensRangeHandler.ts index fa1d469a6..cbf8c76c6 100644 --- a/src/razor/src/semantic/semanticTokensRangeHandler.ts +++ b/src/razor/src/semantic/semanticTokensRangeHandler.ts @@ -7,8 +7,10 @@ import * as vscode from 'vscode'; import { RequestType } from 'vscode-languageclient'; import { RazorLanguageServerClient } from '../razorLanguageServerClient'; import { ProvideSemanticTokensResponse } from './provideSemanticTokensResponse'; -import { SemanticTokensResponse } from './semanticTokensResponse'; import { SerializableSemanticTokensParams } from './serializableSemanticTokensParams'; +import { RazorDocumentManager } from '../document/razorDocumentManager'; +import { RazorDocumentSynchronizer } from '../document/razorDocumentSynchronizer'; +import { RazorLogger } from '../razorLogger'; export class SemanticTokensRangeHandler { private static readonly getSemanticTokensRangeEndpoint = 'razor/provideSemanticTokensRange'; @@ -17,12 +19,14 @@ export class SemanticTokensRangeHandler { ProvideSemanticTokensResponse, any > = new RequestType(SemanticTokensRangeHandler.getSemanticTokensRangeEndpoint); - private emptySemanticTokensResponse: ProvideSemanticTokensResponse = new ProvideSemanticTokensResponse( - new SemanticTokensResponse(new Array(), ''), - null - ); + private emptyTokensResponse: number[] = new Array(); - constructor(private readonly serverClient: RazorLanguageServerClient) {} + constructor( + private readonly documentManager: RazorDocumentManager, + private readonly documentSynchronizer: RazorDocumentSynchronizer, + private readonly serverClient: RazorLanguageServerClient, + private readonly logger: RazorLogger + ) {} public async register() { await this.serverClient.onRequestWithParams< @@ -37,13 +41,55 @@ export class SemanticTokensRangeHandler { } private async getSemanticTokens( - _semanticTokensParams: SerializableSemanticTokensParams, - _cancellationToken: vscode.CancellationToken + semanticTokensParams: SerializableSemanticTokensParams, + cancellationToken: vscode.CancellationToken ): Promise { - // This is currently a no-op since (1) the default C# semantic tokens experience is already powerful and - // (2) there seems to be an issue with the semantic tokens execute command - possibly either O# not - // returning tokens, or an issue with the command itself: - // https://github.com/dotnet/razor/issues/6922 - return this.emptySemanticTokensResponse; + try { + const razorDocumentUri = vscode.Uri.parse(semanticTokensParams.textDocument.uri, true); + const razorDocument = await this.documentManager.getDocument(razorDocumentUri); + if (razorDocument === undefined) { + this.logger.logWarning( + `Could not find Razor document ${razorDocumentUri}; returning semantic tokens information.` + ); + + return new ProvideSemanticTokensResponse( + this.emptyTokensResponse, + semanticTokensParams.requiredHostDocumentVersion + ); + } + + const textDocument = await vscode.workspace.openTextDocument(razorDocumentUri); + const synchronized = await this.documentSynchronizer.trySynchronizeProjectedDocument( + textDocument, + razorDocument.csharpDocument, + semanticTokensParams.requiredHostDocumentVersion, + cancellationToken + ); + + if (!synchronized) { + return new ProvideSemanticTokensResponse( + this.emptyTokensResponse, + semanticTokensParams.requiredHostDocumentVersion + ); + } + + const tokens = await vscode.commands.executeCommand( + 'vscode.provideDocumentRangeSemanticTokens', + razorDocument.csharpDocument.uri, + semanticTokensParams.ranges[0] + ); + + return new ProvideSemanticTokensResponse( + Array.from(tokens.data), + semanticTokensParams.requiredHostDocumentVersion + ); + } catch (error) { + this.logger.logWarning(`${SemanticTokensRangeHandler.getSemanticTokensRangeEndpoint} failed with ${error}`); + } + + return new ProvideSemanticTokensResponse( + this.emptyTokensResponse, + semanticTokensParams.requiredHostDocumentVersion + ); } } diff --git a/src/razor/src/semantic/serializableSemanticTokensParams.ts b/src/razor/src/semantic/serializableSemanticTokensParams.ts index 618dc6d3e..044027b5c 100644 --- a/src/razor/src/semantic/serializableSemanticTokensParams.ts +++ b/src/razor/src/semantic/serializableSemanticTokensParams.ts @@ -7,6 +7,8 @@ import { SerializableRange } from '../rpc/serializableRange'; import { SerializableTextDocumentIdentifier } from '../rpc/serializableTextDocumentIdentifier'; export interface SerializableSemanticTokensParams { + correlationId: string; textDocument: SerializableTextDocumentIdentifier; - range: SerializableRange; + ranges: SerializableRange[]; + requiredHostDocumentVersion: number; } diff --git a/src/razor/src/simplify/razorSimplifyMethodHandler.ts b/src/razor/src/simplify/razorSimplifyMethodHandler.ts index 478a4547e..2c340e85c 100644 --- a/src/razor/src/simplify/razorSimplifyMethodHandler.ts +++ b/src/razor/src/simplify/razorSimplifyMethodHandler.ts @@ -13,9 +13,9 @@ import { RazorLanguageFeatureBase } from '../razorLanguageFeatureBase'; import { RazorDocumentSynchronizer } from '../document/razorDocumentSynchronizer'; import { RazorLogger } from '../razorLogger'; import { SerializableDelegatedSimplifyMethodParams } from './serializableDelegatedSimplifyMethodParams'; -import { RoslynLanguageServer } from '../../../lsptoolshost/roslynLanguageServer'; import SerializableSimplifyMethodParams from './serializableSimplifyMethodParams'; import { TextEdit } from 'vscode-html-languageservice'; +import { roslynSimplifyMethodCommand } from '../../../lsptoolshost/razorCommands'; export class RazorSimplifyMethodHandler extends RazorLanguageFeatureBase { private static readonly razorSimplifyMethodCommand = 'razor/simplifyMethod'; @@ -62,7 +62,7 @@ export class RazorSimplifyMethodHandler extends RazorLanguageFeatureBase { const params = new SerializableSimplifyMethodParams(identifier, request.textEdit); const response: TextEdit[] | undefined = await vscode.commands.executeCommand( - RoslynLanguageServer.roslynSimplifyMethodCommand, + roslynSimplifyMethodCommand, params ); diff --git a/src/razor/src/telemetryReporter.ts b/src/razor/src/telemetryReporter.ts index 4d4385d86..5ed562d73 100644 --- a/src/razor/src/telemetryReporter.ts +++ b/src/razor/src/telemetryReporter.ts @@ -10,6 +10,7 @@ export class TelemetryReporter { private readonly razorExtensionActivated = createTelemetryEvent('VSCode.Razor.RazorExtensionActivated'); private readonly debugLanguageServerEvent = createTelemetryEvent('VSCode.Razor.DebugLanguageServer'); private readonly workspaceContainsRazorEvent = createTelemetryEvent('VSCode.Razor.WorkspaceContainsRazor'); + private readonly buffersOutOfSyncEvent = createTelemetryEvent('VSCode.Razor.BuffersOutOfSync'); private reportedWorkspaceContainsRazor = false; constructor(private readonly eventStream: HostEventStream) { @@ -24,6 +25,10 @@ export class TelemetryReporter { this.eventStream.post(traceLevelEvent); } + public reportBuffersOutOfSync() { + this.eventStream.post(this.buffersOutOfSyncEvent); + } + public reportErrorOnServerStart(error: unknown) { let realError; if (error instanceof Error) { diff --git a/src/razor/syntaxes/aspnetcorerazor.tmLanguage.yml b/src/razor/syntaxes/aspnetcorerazor.tmLanguage.yml new file mode 100644 index 000000000..46b2accdb --- /dev/null +++ b/src/razor/syntaxes/aspnetcorerazor.tmLanguage.yml @@ -0,0 +1,928 @@ +name: ASP.NET Razor +scopeName: text.aspnetcorerazor +fileTypes: + - 'razor' + - 'cshtml' +patterns: + - include: '#razor-control-structures' + - include: 'text.html.basic' + +repository: + + # Razor control structures, including C# control structures that require an '@' + razor-control-structures: + patterns: + - include: '#razor-comment' + - include: '#razor-codeblock' + - include: '#explicit-razor-expression' + - include: '#escaped-transition' + - include: '#directives' + - include: '#transitioned-csharp-control-structures' + - include: '#implicit-expression' + +# Razor control structures, including C# control structures that don't require an '@' (ie, are nested in a C# context) + optionally-transitioned-razor-control-structures: + patterns: + - include: '#razor-comment' + - include: '#razor-codeblock' + - include: '#explicit-razor-expression' + - include: '#escaped-transition' + - include: '#directives' + - include: '#optionally-transitioned-csharp-control-structures' + - include: '#implicit-expression' + + escaped-transition: + name: constant.character.escape.razor.transition + match: '@@' + + transition: + match: '@' + name: keyword.control.cshtml.transition + +# ---------- Razor Code Block ------------ + + razor-codeblock: + name: 'meta.structure.razor.codeblock' + begin: '(@)(\{)' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.codeblock.open' } + contentName: 'source.cs' + patterns: + - include: '#razor-codeblock-body' + end: '(\})' + endCaptures: + 1: { name: 'keyword.control.razor.directive.codeblock.close' } + + razor-codeblock-body: + patterns: + - include: '#text-tag' + - include: '#wellformed-html' + - include: '#razor-single-line-markup' + - include: '#optionally-transitioned-razor-control-structures' + - include: 'source.cs' + + razor-single-line-markup: + match: '(\@\:)([^$]*)$' + captures: + 1: { name: 'keyword.control.razor.singleLineMarkup' } + 2: + patterns: + - include: '#razor-control-structures' + - include: 'text.html.basic' + + text-tag: + begin: '()' + beginCaptures: + 1: { name: 'keyword.control.cshtml.transition.textTag.open' } + patterns: + - include: '#wellformed-html' + - include: '$self' + end: '()' + endCaptures: + 1: { name: 'keyword.control.cshtml.transition.textTag.close' } + +# --------- Razor Comment ----------- + + razor-comment: + name: 'meta.comment.razor' + begin: '(@)(\*)' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.comment.star' } + contentName: 'comment.block.razor' + end: '(\*)(@)' + endCaptures: + 1: { name: 'keyword.control.razor.comment.star' } + 2: { patterns: [ include: '#transition']} + +# ---------- HTML ------------ + + wellformed-html: + patterns: + - include: '#void-tag' + - include: '#non-void-tag' + + # Void tags are well-known tags that do not have an end tag *and* are not required to be self-closing. + # https://html.spec.whatwg.org/multipage/syntax.html#void-elements + void-tag: + name: 'meta.tag.structure.$3.void.html' + begin: '(?i)(<)(!)?(area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)(?=\s|/?>)' + beginCaptures: + 1: { name: 'punctuation.definition.tag.begin.html'} + 2: { name: 'constant.character.escape.razor.tagHelperOptOut' } + 3: { name: 'entity.name.tag.html' } + patterns: + - include: 'text.html.basic#attribute' + end: '/?>' + endCaptures: + 0: { name: 'punctuation.definition.tag.end.html' } + + # This is some complicated trickery to be able to detect & match + # self-closing components as well as *matching* elements with begin/end tags, + # more-or-less copied from microsoft/TypeScript-TmLanguage's TSX grammar. + # Basically - we match both ways a tag can be closed (self-closing or an end tag), + # and leave the inner patterns to figure out which one we matched. + non-void-tag: + begin: '(?=<(!)?([^/\s>]+)(\s|/?>))' + end: '()|(/>)' # The \2 back-references the second capture in 'begin', for matching tags + endCaptures: + 1: { name: 'punctuation.definition.tag.begin.html' } + 2: { name: 'entity.name.tag.html' } + 3: { name: 'punctuation.definition.tag.end.html' } + 4: { name: 'punctuation.definition.tag.end.html' } + patterns: + - begin: '(<)(!)?([^/\s>]+)(?=\s|/?>)' + beginCaptures: + 1: { name: 'punctuation.definition.tag.begin.html' } + 2: { name: 'constant.character.escape.razor.tagHelperOptOut' } + 3: { name: 'entity.name.tag.html' } + end: '(?=/?>)' + patterns: + - include: '#razor-control-structures' + - include: 'text.html.basic#attribute' + - begin: '>' + beginCaptures: + 0: { name: 'punctuation.definition.tag.end.html' } + end: '(?=\{\}\)\]''"])' + + implicit-expression-body: + patterns: + - include: '#implicit-expression-invocation-start' + - include: '#implicit-expression-accessor-start' + end: '(?=[\s<>\{\}\)\]''"])' + + # CSharp colors method invocations differently than accessors + # This captures situations where you do @SomeMethod() + implicit-expression-invocation-start: + begin: '([_[:alpha:]][_[:alnum:]]*)(?=\()' + beginCaptures: + 1: { name: 'entity.name.function.cs' } + patterns: + - include: '#implicit-expression-continuation' + end: '(?=[\s<>\{\}\)\]''"])' + + # CSharp colors property accessors differently than methods + # This captures situations where you do @SomeProperty + implicit-expression-accessor-start: + begin: '([_[:alpha:]][_[:alnum:]]*)' + beginCaptures: + 1: { name: 'variable.other.object.cs' } + patterns: + - include: '#implicit-expression-continuation' + end: '(?=[\s<>\{\}\)\]''"])' + + implicit-expression-continuation: + patterns: + - include: '#balanced-parenthesis-csharp' + - include: '#balanced-brackets-csharp' + - include: '#implicit-expression-invocation' + - include: '#implicit-expression-accessor' + - include: '#implicit-expression-extension' + end: '(?=[\s<>\{\}\)\]''"])' + + implicit-expression-accessor: + match: '(?<=\.)[_[:alpha:]][_[:alnum:]]*' + name: 'variable.other.object.property.cs' + + implicit-expression-invocation: + match: '(?<=\.)[_[:alpha:]][_[:alnum:]]*(?=\()' + name: 'entity.name.function.cs' + + implicit-expression-operator: + patterns: + - include: '#implicit-expression-dot-operator' + - include: '#implicit-expression-null-conditional-operator' + - include: '#implicit-expression-null-forgiveness-operator' + + implicit-expression-dot-operator: + match: '(\.)(?=[_[:alpha:]][_[:alnum:]]*)' + captures: + 1: { name: 'punctuation.accessor.cs' } + + implicit-expression-null-conditional-operator: + match: '(\?)(?=[.\[])' + captures: + 1: { name: 'keyword.operator.null-conditional.cs' } + + implicit-expression-null-forgiveness-operator: + match: '(\!)(?=(?:\.[_[:alpha:]][_[:alnum:]]*)|\?|[\[\(])' + captures: + 1: { name: 'keyword.operator.logical.cs' } + + balanced-parenthesis-csharp: + begin: '(\()' + beginCaptures: + 1: { name: 'punctuation.parenthesis.open.cs' } + name: 'razor.test.balanced.parenthesis' + patterns: + - include: 'source.cs' + end: '(\))' + endCaptures: + 1: { name: 'punctuation.parenthesis.close.cs' } + + balanced-brackets-csharp: + begin: '(\[)' + beginCaptures: + 1: { name: 'punctuation.squarebracket.open.cs' } + name: 'razor.test.balanced.brackets' + patterns: + - include: 'source.cs' + end: '(\])' + endCaptures: + 1: { name: 'punctuation.squarebracket.close.cs' } + +# ---------- Directives ------------ + + directives: + patterns: + - include: '#code-directive' + - include: '#functions-directive' + - include: '#page-directive' + - include: '#addTagHelper-directive' + - include: '#removeTagHelper-directive' + - include: '#tagHelperPrefix-directive' + - include: '#model-directive' + - include: '#inherits-directive' + - include: '#implements-directive' + - include: '#namespace-directive' + - include: '#inject-directive' + - include: '#attribute-directive' + - include: '#section-directive' + - include: '#layout-directive' + - include: '#using-directive' + + #>>>>> @code and @functions <<<<< + + code-directive: + begin: '(@)(code)((?=\{)|\s+)' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.code'} + patterns: + - include: '#directive-codeblock' + end: '(?<=})|\s' + + functions-directive: + begin: '(@)(functions)((?=\{)|\s+)' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.functions'} + patterns: + - include: '#directive-codeblock' + end: '(?<=})|\s' + + directive-codeblock: + begin: '(\{)' + beginCaptures: + 1: { name: 'keyword.control.razor.directive.codeblock.open' } + name: 'meta.structure.razor.directive.codeblock' + contentName: 'source.cs' + patterns: + - include: 'source.cs#class-or-struct-members' + end: '(\})' + endCaptures: + 1: { name: 'keyword.control.razor.directive.codeblock.close' } + + #>>>>> @page <<<<< + + page-directive: + name: 'meta.directive' + match: '(@)(page)\s+([^$]+)?' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.page'} + 3: { patterns: [ include: 'source.cs#string-literal' ] } + + #>>>>> @addTagHelper, @removeTagHelper and @tagHelperPrefix <<<<< + + addTagHelper-directive: + name: 'meta.directive' + match: '(@)(addTagHelper)\s+([^$]+)?' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.addTagHelper'} + 3: { patterns: [ include: '#tagHelper-directive-argument' ] } + + removeTagHelper-directive: + name: 'meta.directive' + match: '(@)(removeTagHelper)\s+([^$]+)?' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.removeTagHelper'} + 3: { patterns: [ include: '#tagHelper-directive-argument' ] } + + tagHelperPrefix-directive: + name: 'meta.directive' + match: '(@)(tagHelperPrefix)\s+([^$]+)?' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.tagHelperPrefix'} + 3: { patterns: [ include: '#tagHelper-directive-argument' ] } + + tagHelper-directive-argument: + patterns: + - include: 'source.cs#string-literal' + - include: '#unquoted-string-argument' + + unquoted-string-argument: + name: 'string.quoted.double.cs' + match: '[^$]+' + + #>>>>> @model, layout, @implements and @inherits <<<<< + + model-directive: + name: 'meta.directive' + match: '(@)(model)\s+([^$]+)?' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.model'} + 3: { patterns: [ include: 'source.cs#type' ] } + + inherits-directive: + name: 'meta.directive' + match: '(@)(inherits)\s+([^$]+)?' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.inherits'} + 3: { patterns: [ include: 'source.cs#type' ] } + + implements-directive: + name: 'meta.directive' + match: '(@)(implements)\s+([^$]+)?' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.implements'} + 3: { patterns: [ include: 'source.cs#type' ] } + + layout-directive: + name: 'meta.directive' + match: '(@)(layout)\s+([^$]+)?' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.layout'} + 3: { patterns: [ include: 'source.cs#type' ] } + + #>>>>> @namespace <<<<< + + namespace-directive: + name: 'meta.directive' + match: '(@)(namespace)\s+([^\s]+)?' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.namespace'} + 3: { patterns: [ include: '#namespace-directive-argument' ] } + + namespace-directive-argument: + match: '([_[:alpha:]][_[:alnum:]]*)(\.)?' + captures: + 1: { name: 'entity.name.type.namespace.cs' } + 2: { name: 'punctuation.accessor.cs' } + + #>>>>> @inject <<<<< + + inject-directive: + name: 'meta.directive' + match: '(@)(inject)\s*([\S\s]+?)?\s*([_[:alpha:]][_[:alnum:]]*)?\s*(?=$)' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.inject'} + 3: { patterns: [ include: 'source.cs#type' ] } + 4: { name: 'entity.name.variable.property.cs' } + + #>>>>> @attribute <<<<< + + attribute-directive: + name: 'meta.directive' + begin: '(@)(attribute)\b\s+' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.attribute'} + patterns: + - include: 'source.cs#attribute-section' + end: '(?<=\])|$' + + #>>>>> @section <<<<< + + section-directive: + name: 'meta.directive.block' + begin: '(@)(section)\b\s+([_[:alpha:]][_[:alnum:]]*)?' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.razor.directive.section'} + 3: { name: 'variable.other.razor.directive.sectionName' } + patterns: + - include: '#directive-markupblock' + end: '(?<=})' + + directive-markupblock: + name: 'meta.structure.razor.directive.markblock' + begin: '(\{)' + beginCaptures: + 1: { name: 'keyword.control.razor.directive.codeblock.open' } + patterns: + - include: '$self' + end: '(\})' + endCaptures: + 1: { name: 'keyword.control.razor.directive.codeblock.close' } + + #>>>>> @using <<<<< + + using-directive: + name: 'meta.directive' + match: '(@)(using)\b\s+(?!\(|\s)(.+?)?(;)?$' + captures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.other.using.cs'} + 3: + patterns: + - include: '#using-static-directive' + - include: '#using-alias-directive' + - include: '#using-standard-directive' + 4: { name: 'keyword.control.razor.optionalSemicolon'} + + using-static-directive: + match: '(static)\b\s+(.+)' + captures: + 1: { name: 'keyword.other.static.cs' } + 2: { patterns: [ include: 'source.cs#type' ] } + + using-alias-directive: + match: '([_[:alpha:]][_[:alnum:]]*)\b\s*(=)\s*(.+)\s*' + captures: + 1: { name: 'entity.name.type.alias.cs' } + 2: { name: 'keyword.operator.assignment.cs' } + 3: { patterns: [ include: 'source.cs#type' ] } + + using-standard-directive: + match: '([_[:alpha:]][_[:alnum:]]*)\s*' + captures: + 1: { name: 'entity.name.type.namespace.cs' } + + # ---------- Razor C# Control Structures ------------ + + optionally-transitioned-csharp-control-structures: + patterns: + - include: '#using-statement-with-optional-transition' + - include: '#if-statement-with-optional-transition' + - include: '#else-part' + - include: '#foreach-statement-with-optional-transition' + - include: '#for-statement-with-optional-transition' + # while is incompatible with optional transitions because @do { } \n while { } is valid everywhere, and textmate only matches + # one line at a time + - include: '#while-statement' + - include: '#switch-statement-with-optional-transition' + - include: '#lock-statement-with-optional-transition' + - include: '#do-statement-with-optional-transition' + - include: '#try-statement-with-optional-transition' + + transitioned-csharp-control-structures: + patterns: + - include: '#using-statement' + - include: '#if-statement' + - include: '#else-part' + - include: '#foreach-statement' + - include: '#for-statement' + - include: '#while-statement' + - include: '#switch-statement' + - include: '#lock-statement' + - include: '#do-statement' + - include: '#try-statement' + + #>>>>> @using (...) { ... } <<<<< + + using-statement: + name: 'meta.statement.using.razor' + begin: '(?:(@))(using)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.other.using.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + using-statement-with-optional-transition: + name: 'meta.statement.using.razor' + begin: '(?:^\s*|(@))(using)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.other.using.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + #>>>>> @if (...) { ... } <<<<< + + if-statement: + name: 'meta.statement.if.razor' + begin: '(?:(@))(if)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.conditional.if.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + if-statement-with-optional-transition: + name: 'meta.statement.if.razor' + begin: '(?:^\s*|(@))(if)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.conditional.if.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + #>>>>> else [if (...)] { ... } <<<<< + + else-part: + name: 'meta.statement.else.razor' + begin: '(?:^|(?<=}))\s*(else)\b\s*?(?: (if))?\s*?(?=[\n\(\{])' + beginCaptures: + 1: { name: 'keyword.control.conditional.else.cs' } + 2: { name: 'keyword.control.conditional.if.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + #>>>>> @for (...) { ... } <<<<< + + for-statement: + name: 'meta.statement.for.razor' + begin: '(?:(@))(for)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.loop.for.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + for-statement-with-optional-transition: + name: 'meta.statement.for.razor' + begin: '(?:^\s*|(@))(for)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.loop.for.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + #>>>>> @foreach (...) { ... } <<<<< + + foreach-statement: + name: 'meta.statement.foreach.razor' + begin: '(?:(@)(await\s+)?)(foreach)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { patterns: [ include: '#await-prefix' ] } + 3: { name: 'keyword.control.loop.foreach.cs' } + patterns: + - include: '#foreach-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + foreach-statement-with-optional-transition: + name: 'meta.statement.foreach.razor' + begin: '(?:^\s*|(@)(await\s+)?)(foreach)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { patterns: [ include: '#await-prefix' ] } + 3: { name: 'keyword.control.loop.foreach.cs' } + patterns: + - include: '#foreach-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + # This condition is pulled directly from the C# grammar for foreach statements + foreach-condition: + begin: '\(' + beginCaptures: + 0: { name: 'punctuation.parenthesis.open.cs' } + end: '\)' + endCaptures: + 0: { name: 'punctuation.parenthesis.close.cs' } + patterns: + - match: |- + (?x) + (?: + (\bvar\b)| + (? + (?: + (?: + (?:(?@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification + (? # identifier + type arguments (if any) + \g\s* + (?\s*<(?:[^<>]|\g)+>\s*)? + ) + (?:\s*\.\s*\g)* | # Are there any more names being dotted into? + (?\s*\((?:[^\(\)]|\g)+\)) + ) + (?:\s*\?\s*)? # nullable suffix? + (?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix? + ) + ) + )\s+ + (\g)\s+ + \b(in)\b + captures: + 1: { name: 'keyword.other.var.cs' } + 2: + patterns: + - include: 'source.cs#type' + # '3': ? is a sub-expression. It's final value is not considered. + # '4': ? is a sub-expression. It's final value is not considered. + # '5': ? is a sub-expression. It's final value is not considered. + # '6': ? is a sub-expression. It's final value is not considered. + 7: { name: 'entity.name.variable.local.cs' } + 8: { name: 'keyword.control.loop.in.cs' } + - match: |- + (?x) # match foreach (var (x, y) in ...) + (?:\b(var)\b\s*)? + (?\((?:[^\(\)]|\g)+\))\s+ + \b(in)\b + captures: + 1: { name: 'keyword.other.var.cs' } + 2: + patterns: + - include: 'source.cs#tuple-declaration-deconstruction-element-list' + 3: { name: 'keyword.control.loop.in.cs' } + - include: 'source.cs#expression' + + #>>>>> @do (...) while { ... } <<<<< + + do-statement: + name: 'meta.statement.do.razor' + begin: '(?:(@))(do)\b\s' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.loop.do.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + do-statement-with-optional-transition: + name: 'meta.statement.do.razor' + begin: '(?:^\s*|(@))(do)\b\s' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.loop.do.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + #>>>>> @while (...) { ... } <<<<< + + while-statement: + name: 'meta.statement.while.razor' + begin: '(?:(@)|^\s*|(?<=})\s*)(while)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.loop.while.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})|(;)' + endCaptures: + 1: { name: 'punctuation.terminator.statement.cs'} + + #>>>>> @switch (...) { ... } <<<<< + + switch-statement: + name: 'meta.statement.switch.razor' + begin: '(?:(@))(switch)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.switch.cs' } + patterns: + - include: '#csharp-condition' + - include: '#switch-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + switch-statement-with-optional-transition: + name: 'meta.statement.switch.razor' + begin: '(?:^\s*|(@))(switch)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.switch.cs' } + patterns: + - include: '#csharp-condition' + - include: '#switch-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + switch-code-block: + name: 'meta.structure.razor.csharp.codeblock.switch' + begin: '(\{)' + beginCaptures: + 1: { name: 'punctuation.curlybrace.open.cs' } + patterns: + - include: 'source.cs#switch-label' + - include: '#razor-codeblock-body' + end: '(\})' + endCaptures: + 1: { name: 'punctuation.curlybrace.close.cs' } + + #>>>>> @lock (...) { ... } <<<<< + + lock-statement: + name: 'meta.statement.lock.razor' + begin: '(?:(@))(lock)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.other.lock.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + lock-statement-with-optional-transition: + name: 'meta.statement.lock.razor' + begin: '(?:^\s*|(@))(lock)\b\s*(?=\()' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.other.lock.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + #>>>>> @try { ... } [catch|finally] (...) { ... } <<<<< + + try-statement: + patterns: + - include: '#try-block' + - include: '#catch-clause' + - include: '#finally-clause' + + try-statement-with-optional-transition: + patterns: + - include: '#try-block-with-optional-transition' + - include: '#catch-clause' + - include: '#finally-clause' + + try-block: + name: 'meta.statement.try.razor' + begin: '(?:(@))(try)\b\s*' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.try.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + try-block-with-optional-transition: + name: 'meta.statement.try.razor' + begin: '(?:^\s*|(@))(try)\b\s*' + beginCaptures: + 1: { patterns: [ include: '#transition' ] } + 2: { name: 'keyword.control.try.cs' } + patterns: + - include: '#csharp-condition' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + catch-clause: + name: 'meta.statement.catch.razor' + begin: '(?:^|(?<=}))\s*(catch)\b\s*?(?=[\n\(\{])' + beginCaptures: + 1: { name: 'keyword.control.try.catch.cs' } + patterns: + - include: '#catch-condition' + - include: 'source.cs#when-clause' + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + # This condition is pulled directly from the C# grammar for catch clauses + catch-condition: + begin: '\(' + beginCaptures: + 0: { name: 'punctuation.parenthesis.open.cs' } + end: '\)' + endCaptures: + 0: { name: 'punctuation.parenthesis.close.cs' } + patterns: + - match: |- + (?x) + (? + (?: + (?: + (?:(?@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification + (? # identifier + type arguments (if any) + \g\s* + (?\s*<(?:[^<>]|\g)+>\s*)? + ) + (?:\s*\.\s*\g)* | # Are there any more names being dotted into? + (?\s*\((?:[^\(\)]|\g)+\)) + ) + (?:\s*\?\s*)? # nullable suffix? + (?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix? + ) + )\s* + (?:(\g)\b)? + captures: + 1: + patterns: + - include: 'source.cs#type' + # '2': ? is a sub-expression. It's final value is not considered. + # '3': ? is a sub-expression. It's final value is not considered. + # '4': ? is a sub-expression. It's final value is not considered. + # '5': ? is a sub-expression. It's final value is not considered. + 6: { name: entity.name.variable.local.cs } + + finally-clause: + name: 'meta.statement.finally.razor' + begin: '(?:^|(?<=}))\s*(finally)\b\s*?(?=[\n\{])' + beginCaptures: + 1: { name: 'keyword.control.try.finally.cs' } + patterns: + - include: '#csharp-code-block' + - include: '#razor-codeblock-body' + end: '(?<=})' + + # ---------- Misc C# ------------ + + await-prefix: + name: 'keyword.other.await.cs' + match: '(await)\s+' + + csharp-code-block: + name: 'meta.structure.razor.csharp.codeblock' + begin: '(\{)' + beginCaptures: + 1: { name: 'punctuation.curlybrace.open.cs' } + patterns: + - include: '#razor-codeblock-body' + end: '(\})' + endCaptures: + 1: { name: 'punctuation.curlybrace.close.cs' } + + csharp-condition: + begin: '(\()' + beginCaptures: + 1: { name: 'punctuation.parenthesis.open.cs' } + patterns: + - include: 'source.cs#local-variable-declaration' + - include: 'source.cs#expression' + - include: 'source.cs#punctuation-comma' + - include: 'source.cs#punctuation-semicolon' + end: '(\))' + endCaptures: + 1: { name: 'punctuation.parenthesis.close.cs' } \ No newline at end of file diff --git a/src/shared/assets.ts b/src/shared/assets.ts index 164fc6aa1..41a7db31d 100644 --- a/src/shared/assets.ts +++ b/src/shared/assets.ts @@ -293,7 +293,7 @@ export class AssetGenerator { } commandArgs.push('/property:GenerateFullPaths=true'); - commandArgs.push('/consoleloggerparameters:NoSummary'); + commandArgs.push('/consoleloggerparameters:NoSummary;ForceNoAlign'); } private getBuildProjectPath(): string | null { @@ -571,7 +571,8 @@ export async function getBuildOperations(generator: AssetGenerator): Promise