From f48a0b1c66bfd433a1489dc3ba9dfffce5834a1f Mon Sep 17 00:00:00 2001 From: David Barbet Date: Mon, 27 Nov 2023 16:14:09 -0800 Subject: [PATCH 1/8] Increment prerelease version --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 9575274bf..0824d78ec 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "2.12", + "version": "2.13", "publicReleaseRefSpec": [ "^refs/heads/release$", "^refs/heads/main$", From b8a3c26bd6e1e4cb3e865e001182b7016dc2e06f Mon Sep 17 00:00:00 2001 From: David Barbet Date: Wed, 15 Nov 2023 17:49:17 -0800 Subject: [PATCH 2/8] Enable automatic nuget restore on the client --- package.json | 5 +++++ src/lsptoolshost/restore.ts | 28 ++++++++++++++++++------ src/lsptoolshost/roslynLanguageServer.ts | 8 +++++++ src/lsptoolshost/roslynProtocol.ts | 19 +++++++++++++--- src/main.ts | 2 +- 5 files changed, 51 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 3f78bee94..5180ede6f 100644 --- a/package.json +++ b/package.json @@ -1742,6 +1742,11 @@ "default": null, "description": "Sets a path where MSBuild binary logs are written to when loading projects, to help diagnose loading errors." }, + "dotnet.projects.enableAutomaticRestore": { + "type": "boolean", + "default": true, + "description": "Sets whether or not automatic nuget restore is enabled if the project system detects assets are missing." + }, "razor.languageServer.directory": { "type": "string", "scope": "machine-overridable", diff --git a/src/lsptoolshost/restore.ts b/src/lsptoolshost/restore.ts index 6cf34697e..0b6075714 100644 --- a/src/lsptoolshost/restore.ts +++ b/src/lsptoolshost/restore.ts @@ -5,7 +5,13 @@ import * as vscode from 'vscode'; import { RoslynLanguageServer } from './roslynLanguageServer'; -import { RestorableProjects, RestoreParams, RestorePartialResult, RestoreRequest } from './roslynProtocol'; +import { + RestorableProjects, + RestoreParams, + RestorePartialResult, + RestoreRequest, + UnresolvedProjectDependenciesNotification, +} from './roslynProtocol'; import path = require('path'); let _restoreInProgress = false; @@ -22,10 +28,15 @@ export function registerRestoreCommands( ); context.subscriptions.push( vscode.commands.registerCommand('dotnet.restore.all', async (): Promise => { - return restore(languageServer, restoreChannel); + return restore(languageServer, restoreChannel, [], true); }) ); + + languageServer.registerOnRequest(UnresolvedProjectDependenciesNotification.type, async (params) => { + await restore(languageServer, restoreChannel, params.projectFilePaths, false); + }); } + async function chooseProjectAndRestore( languageServer: RoslynLanguageServer, restoreChannel: vscode.OutputChannel @@ -49,22 +60,25 @@ async function chooseProjectAndRestore( return; } - await restore(languageServer, restoreChannel, pickedItem.description); + await restore(languageServer, restoreChannel, [pickedItem.description!], true); } -async function restore( +export async function restore( languageServer: RoslynLanguageServer, restoreChannel: vscode.OutputChannel, - projectFile?: string + projectFiles: string[], + showOutput: boolean ): Promise { if (_restoreInProgress) { vscode.window.showErrorMessage(vscode.l10n.t('Restore already in progress')); return; } _restoreInProgress = true; - restoreChannel.show(true); + if (showOutput) { + restoreChannel.show(true); + } - const request: RestoreParams = { projectFilePath: projectFile }; + const request: RestoreParams = { projectFilePaths: projectFiles }; await vscode.window .withProgress( { diff --git a/src/lsptoolshost/roslynLanguageServer.ts b/src/lsptoolshost/roslynLanguageServer.ts index 38cc801a4..176167149 100644 --- a/src/lsptoolshost/roslynLanguageServer.ts +++ b/src/lsptoolshost/roslynLanguageServer.ts @@ -27,6 +27,7 @@ import { MessageTransports, RAL, CancellationToken, + RequestHandler, } from 'vscode-languageclient/node'; import { PlatformInformation } from '../shared/platform'; import { readConfigurations } from './configurationMiddleware'; @@ -319,6 +320,13 @@ export class RoslynLanguageServer { return response; } + public registerOnRequest( + type: RequestType, + handler: RequestHandler + ) { + this._languageClient.addDisposable(this._languageClient.onRequest(type, handler)); + } + public async registerSolutionSnapshot(token: vscode.CancellationToken): Promise { const response = await this.sendRequest0(RoslynProtocol.RegisterSolutionSnapshotRequest.type, token); if (response) { diff --git a/src/lsptoolshost/roslynProtocol.ts b/src/lsptoolshost/roslynProtocol.ts index 2d58906c1..0d7fa8eda 100644 --- a/src/lsptoolshost/roslynProtocol.ts +++ b/src/lsptoolshost/roslynProtocol.ts @@ -152,10 +152,10 @@ export interface NamedPipeInformation { export interface RestoreParams extends lsp.WorkDoneProgressParams, lsp.PartialResultParams { /** - * An optional file path to restore. - * If none is specified, the solution (or all loaded projects) are restored. + * The set of projects to restore. + * If none are specified, the solution (or all loaded projects) are restored. */ - projectFilePath?: string; + projectFilePaths: string[]; } export interface RestorePartialResult { @@ -163,6 +163,13 @@ export interface RestorePartialResult { message: string; } +export interface UnresolvedProjectDependenciesParams { + /** + * The set of projects that have unresolved dependencies and require a restore. + */ + projectFilePaths: string[]; +} + export namespace WorkspaceDebugConfigurationRequest { export const method = 'workspace/debugConfiguration'; export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.clientToServer; @@ -260,3 +267,9 @@ export namespace RestorableProjects { export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.clientToServer; export const type = new lsp.RequestType0(method); } + +export namespace UnresolvedProjectDependenciesNotification { + export const method = 'workspace/_roslyn_unresolvedProjectDependencies'; + export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.serverToClient; + export const type = new lsp.RequestType(method); +} diff --git a/src/main.ts b/src/main.ts index 7998132bd..07899f3e1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -83,9 +83,9 @@ export async function activate( // ensure it gets properly disposed. Upon disposal the events will be flushed. context.subscriptions.push(reporter); - const csharpChannel = vscode.window.createOutputChannel('C#'); const dotnetTestChannel = vscode.window.createOutputChannel('.NET Test Log'); const dotnetChannel = vscode.window.createOutputChannel('.NET NuGet Restore'); + const csharpChannel = vscode.window.createOutputChannel('C#'); const csharpchannelObserver = new CsharpChannelObserver(csharpChannel); const csharpLogObserver = new CsharpLoggerObserver(csharpChannel); eventStream.subscribe(csharpchannelObserver.post); From 0b41c68a72d6cfa38fee23f1ede805f9e9774520 Mon Sep 17 00:00:00 2001 From: Gregg Miskelly Date: Mon, 4 Dec 2023 13:16:41 -0800 Subject: [PATCH 3/8] Debugger docs: point to official docs (#6674) This PR updates the debugger docs to just point at the official documentation rather than duplicating its content. --- debugger-launchjson.md | 364 +---------------------------------------- debugger.md | 44 +---- 2 files changed, 11 insertions(+), 397 deletions(-) diff --git a/debugger-launchjson.md b/debugger-launchjson.md index 6e09438cd..78e4f8d9e 100644 --- a/debugger-launchjson.md +++ b/debugger-launchjson.md @@ -1,363 +1,3 @@ -# Configuring launch.json for C# debugging -The launch.json file is used to configure the debugger in Visual Studio Code. +## Debugger Settings -Visual Studio Code generates a launch.json with almost all of the required information. -If your workspace has only one launchable project, the C# extension will offer to automatically generate this file. -If you missed this prompt, you can force the generation by executing the command `.NET: Generate Assets for Build and Debug` from the VS Code command palette. -The generated file contains two sections. One that configures debugging for launch and a second that configures debugging for attach. - -If you have more than one launchable project, then you will need to modify your launch.json file by hand. -Visual Studio Code will still generate a basic template, but you will need to fill in the 'program' field to point at the executable dll that you would like to debug. - - -# Configurating VS Code's debugging behavior - -## PreLaunchTask -The `preLaunchTask` field runs the associated taskName in tasks.json before debugging your program. You can get the default build prelaunch task by executing the command `Tasks: Configure Tasks Runner` from the VS Code command palette. - -This will create a task that runs `dotnet build`. You can read more about tasks at [https://code.visualstudio.com/docs/editor/tasks](https://code.visualstudio.com/docs/editor/tasks). - -## Program -The program field is set to the path of the application dll or .NET Core host executable to launch. - -This property normally takes the form: "${workspaceFolder}/bin/Debug/\/\". - -Example: `"${workspaceFolder}/bin/Debug/netcoreapp1.1/MyProject.dll"` - -Where: - -* \ is the framework that the debugged project is being built for. This is normally found in the project file as the 'TargetFramework' property. -* \ 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. - -## Cwd -The working directory of the target process. - -## Args -These are the arguments that will be passed to your program. - -## Stop at Entry -If you need to stop at the entry point of the target, you can optionally set `stopAtEntry` to be "true". - -## Starting a Web Browser - -The default launch.json template (as of C# extension v1.20.0) for ASP.NET Core projects will use the following to configure VS Code to launch a web browser when ASP.NET starts: - -```json - "serverReadyAction": { - "action": "openExternally", - "pattern": "\\bNow listening on:\\s+(https?://\\S+)" - } -``` - -Notes about this: -1. If you do **NOT** want the browser to automatically start, you can just delete this element - (and a `launchBrowser` element if your launch.json has that instead). -2. This pattern will launch the web browser using the URL that ASP.NET Core writes - to the console. If you want to modify the URL see [specifying the browser's URL](#specifying-the-browsers-url). - This may be useful if the target application is running on another machine or container, - or if `applicationUrl` has a special host name (example: `"applicationUrl": "http://*:1234/"`). -3. `serverReadyAction` is a new feature from VS Code. It is recommended over the previous - `launchBrowser` feature that is built into the C# extension's debugger as it can work when - the C# extension is running on a remote machine, it uses the default browser configured for VS - Code, and it also allows using a script debugger. You can continue using `launchBrowser` instead - if none of those features are important to you. You also can continue to use `launchBrowser` if - you want to run a specific program instead of starting the default browser. -4. More documentation for `serverReadyAction` can be found in the [Visual Studio Code February 2019 release notes](https://code.visualstudio.com/updates/v1_32#_automatically-open-a-uri-when-debugging-a-server-program). -5. The way this works is that VS Code will scrape the output which is set to the console. If a line - matches the pattern, it will launch a browser against the URL which was 'captured' by the pattern. - Here is an explanation of what the pattern does: - * `\\b` : Matches on a word boundary. Note that `\b` indicates a word boundary, but because this is in a json string, the `\` needs to be escaped, hence `\\b`. - * `Now listening on:` : This is a string literal, meaning that the next text must be `Now listening on:`. - * `\\s+` : Matches one or more space characters. - * `(` : This is the beginning of a 'capture group' -- this indicates which region of text will be saved and used to launch the browser. - * `http` : String literal. - * `s?` : Either the character `s` or nothing. - * `://` : String literal. - * `\\S+` : One or more non-whitespace characters. - * `)` : The end of the capture group. -6. Both forms of browser launch require `"console": "internalConsole"`, as the browser launcher scrapes - the standard output of the target process to know when the web server has initialized itself. - -### Specifying the browser's URL - -If you want to ignore the URL from the console output, you can remove the -`(` and `)` from the pattern, and the set `uriFormat` to what you want to launch. Example: - -```json - "serverReadyAction": { - "action": "openExternally", - "pattern": "\\bNow listening on:\\s+https?://\\S", - "uriFormat": "http://localhost:1234" - } -``` - -If you want to use the port number from the console output, but not the host name, you can also use something like this: - -```json - "serverReadyAction": { - "action": "openExternally", - "pattern": "\\bNow listening on:\\s+http://\\S+:([0-9]+)", - "uriFormat": "http://localhost:%s" - } -``` - -In fact, you can open almost any url, for example you could open the default swagger ui by doing something like this: - -```json - "serverReadyAction": { - "action": "openExternally", - "pattern": "\\bNow listening on:\\s+http://\\S+:([0-9]+)", - "uriFormat": "http://localhost:%s/swagger/index.html" - } -``` - -> **Note** You need to make sure your project has swaggerui setup to do this. - -## Environment variables -Environment variables may be passed to your program using this schema: - - "env": { - "myVariableName":"theValueGoesHere" - } - -## Console (terminal) window - -The `"console"` setting controls what console (terminal) window the target app is launched into. It can be set to any of these values -- - -`"internalConsole"` (default) : the target process's console input (stdin) and output (stdout/stderr) are routed through the VS Code Debug Console. The advantage of this mode is that it allows you to see messages from both the debugger and the target program in one place, so you will not miss important messages or need to switch back and forth. This is useful for programs with simple console interactions (example: using `Console.WriteLine` and/or `Console.ReadLine`). This should NOT be used when the target program needs full control over the console, such as a program that changes the cursor position, uses `Console.ReadKey` for input, etc. See below for instructions on inputting into the console. - -`"integratedTerminal"` : the target process will run inside [VS Code's integrated terminal](https://code.visualstudio.com/docs/editor/integrated-terminal). Click the 'Terminal' tab in the tab group beneath the editor to interact with your application. When using this mode, by default, the Debug Console will not be shown when starting debugging. This can be configured with `internalConsoleOptions`. - -`"externalTerminal"`: the target process will run inside its own external terminal. When using this mode, you will need to switch focus between Visual Studio Code and the external terminal window. - -### Inputting text into the target process when using `internalConsole` - -When using `internalConsole`, you can input text into Visual Studio Code that will be returned from `Console.ReadLine` and similar APIs that read from `stdin`. To do so, while the program is running, type text into the input box at the bottom of the Debug Console. Pressing enter will send the text to the target process. Note that if you enter text in this box while your program is stopped under the debugger, this text will be evaluated as a C# expression, not sent to the target process. - -Example: - -![Example of inputting text to the Console to be set to the target process's standard input](https://raw.githubusercontent.com/wiki/dotnet/vscode-csharp/images/ConsoleInput.gif) - -## launchSettings.json support - -In addition to launch.json, launch options can be configured through a launchSettings.json file. The advantage of -launchSettings.json is that it allows settings to be shared between Visual Studio Code, full Visual Studio, and `dotnet run`. - -To configure which launchSettings.json profile to use (or to prevent it from being used), set the `launchSettingsProfile` option: - - "launchSettingsProfile": "ProfileNameGoesHere" - -Which would then, for example, use `myVariableName` from this example launchSettings.json file: - -```json -{ - "profiles": { - "ProfileNameGoesHere": { - "commandName": "Project", - "environmentVariables": { - "myVariableName":"theValueGoesHere" - } - } - } -} -``` - -If `launchSettingsProfile` is NOT specified, the first profile with `"commandName": "Project"` will be used. - -If `launchSettingsProfile` is set to null/an empty string, then Properties/launchSettings.json will be ignored. - -By default, the debugger will search for launchSettings.json in {cwd}/Properties/launchSettings.json. To customize this path, set `launchSettingsFilePath`: - - "launchSettingsFilePath": "${workspaceFolder}/F1) and run `Extensions: Install Extensions`. Enter `C#` in the search box and press `Enter`. Select the extension and click on `Install`. If you have previously installed the C# extension, make sure that you have a recent version. You can check this by opening the command palette (press F1) and running `Extensions: Show Installed Extensions`. -##### 4: Wait for download of platform-specific files -The first time that C# code is opened in VS Code, the extension will download the platform-specific files needed for debugging and editing. Debugging and editor features will not work until these steps finish. - - ### Once for each project The following steps have to be executed for every project. ##### 1: Get a project @@ -73,11 +71,8 @@ If your code was built on a different computer from where you would like to run #### [Configurating launch.json for C# Debugging](debugger-launchjson.md) #### Attach Support -The C# debugger supports attaching to processes. To do this, switch to the Debug tab, and open the configuration drop down. -![Debug launch configuration drop down](https://raw.githubusercontent.com/wiki/dotnet/vscode-csharp/images/debug-launch-configurations.png) - -Select the '.NET Core Attach' configuration. Clicking the play button (or pressing F5) will then try to attach. In launch.json, if `processId` is set to `""` this will provide UI to select which process to attach to. +See the [official documentation](https://code.visualstudio.com/docs/csharp/debugging#_attaching-to-a-process). #### Remote Debugging @@ -85,25 +80,4 @@ The debugger supports remotely launching or attaching to processes. See [Attachi #### Exception Settings -The VS Code .NET debugger supports configuration options for if the debugger stops when exceptions are thrown or caught. This is done through two different entries in the BREAKPOINTS section of the Run view: - -![Exceptions settings in BREAKPOINTS Run View](https://raw.githubusercontent.com/wiki/dotnet/vscode-csharp/images/Exception-Settings.png) - -Note that the BREAKPOINTS section will be missing these entries until the first time that the folder has been debugged with the .NET debugger. - -Checking 'All Exceptions' will configure the debugger to stop when an exception is thrown. If Just My Code is enabled (which it is by default) the debugger will not break if an exception is internally thrown and caught in library code. Though if the exception is thrown in library code and returned to user code the debugger will break then. - -Checking 'User-Unhandled Exceptions' will configure the debugger to stop when an exception is caught in non-user code after having been thrown in user code or traveled through user code. Exceptions that become user-unhandled aren't always a problem, it could be that user code is implementing an API and is expected to raise an exception in this scenario, but it is often a problem. So, by default, the debugger will stop when an exception becomes user-unhandled. - -##### Exception Conditions -Both checkboxes support conditions to break on only selected exception types. To edit the condition, click on the pencil icon (see image above) or right click on the entry and invoke 'Edit Condition'. The condition is a comma-separated list of exception types to break on, or if the list starts with '!', a list of exception types to ignore. - -Examples conditions: - -| Example condition value | Result | -|-------------------------|--------| -| System.NullReferenceException | This will break on just null reference exceptions. | -| System.NullReferenceException, System.InvalidOperationException | This will break on both null reference exceptions and invalid operation exceptions. | -| !System.Threading.Tasks.TaskCanceledException | This will break on all exceptions except for task canceled. | -| !System.Threading.Tasks.TaskCanceledException, System.NotImplementedException | This will break on all exceptions except for task cancelled and not implemented. | - +See the [official documentation](https://code.visualstudio.com/docs/csharp/debugging#_stopping-on-exceptions). From 4f20608cfe21c2bc5d04bcfa7d876aa4be5aa93a Mon Sep 17 00:00:00 2001 From: David Barbet Date: Tue, 28 Nov 2023 13:38:03 -0800 Subject: [PATCH 4/8] Review feedback --- src/lsptoolshost/restore.ts | 4 ++-- src/lsptoolshost/roslynProtocol.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lsptoolshost/restore.ts b/src/lsptoolshost/restore.ts index 0b6075714..3a20664f9 100644 --- a/src/lsptoolshost/restore.ts +++ b/src/lsptoolshost/restore.ts @@ -10,7 +10,7 @@ import { RestoreParams, RestorePartialResult, RestoreRequest, - UnresolvedProjectDependenciesNotification, + ProjectHasUnresolvedDependenciesNotification, } from './roslynProtocol'; import path = require('path'); @@ -32,7 +32,7 @@ export function registerRestoreCommands( }) ); - languageServer.registerOnRequest(UnresolvedProjectDependenciesNotification.type, async (params) => { + languageServer.registerOnRequest(ProjectHasUnresolvedDependenciesNotification.type, async (params) => { await restore(languageServer, restoreChannel, params.projectFilePaths, false); }); } diff --git a/src/lsptoolshost/roslynProtocol.ts b/src/lsptoolshost/roslynProtocol.ts index 0d7fa8eda..7e734ca26 100644 --- a/src/lsptoolshost/roslynProtocol.ts +++ b/src/lsptoolshost/roslynProtocol.ts @@ -268,8 +268,8 @@ export namespace RestorableProjects { export const type = new lsp.RequestType0(method); } -export namespace UnresolvedProjectDependenciesNotification { - export const method = 'workspace/_roslyn_unresolvedProjectDependencies'; +export namespace ProjectHasUnresolvedDependenciesNotification { + export const method = 'workspace/_roslyn_projectHasUnresolvedDependencies'; export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.serverToClient; export const type = new lsp.RequestType(method); } From 19828dbb89e91d2b0aa6ed53f9fc519f77461461 Mon Sep 17 00:00:00 2001 From: David Barbet Date: Mon, 4 Dec 2023 14:20:25 -0800 Subject: [PATCH 5/8] More localization --- package.json | 2 +- package.nls.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5180ede6f..99d0a1585 100644 --- a/package.json +++ b/package.json @@ -1745,7 +1745,7 @@ "dotnet.projects.enableAutomaticRestore": { "type": "boolean", "default": true, - "description": "Sets whether or not automatic nuget restore is enabled if the project system detects assets are missing." + "description": "%configuration.dotnet.projects.enableAutomaticRestore%" }, "razor.languageServer.directory": { "type": "string", diff --git a/package.nls.json b/package.nls.json index fedc83a97..1e3deecef 100644 --- a/package.nls.json +++ b/package.nls.json @@ -31,6 +31,7 @@ "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.projects.enableAutomaticRestore": "Enables automatic NuGet restore if the extension detects assets are missing.", "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.", From 2325fae8005c70bcb9a85aec7a1a362e42cd88ab Mon Sep 17 00:00:00 2001 From: David Barbet Date: Mon, 4 Dec 2023 14:40:59 -0800 Subject: [PATCH 6/8] Rename --- src/lsptoolshost/restore.ts | 4 ++-- src/lsptoolshost/roslynProtocol.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lsptoolshost/restore.ts b/src/lsptoolshost/restore.ts index 3a20664f9..1aa32cdb0 100644 --- a/src/lsptoolshost/restore.ts +++ b/src/lsptoolshost/restore.ts @@ -10,7 +10,7 @@ import { RestoreParams, RestorePartialResult, RestoreRequest, - ProjectHasUnresolvedDependenciesNotification, + ProjectHasUnresolvedDependenciesRequest, } from './roslynProtocol'; import path = require('path'); @@ -32,7 +32,7 @@ export function registerRestoreCommands( }) ); - languageServer.registerOnRequest(ProjectHasUnresolvedDependenciesNotification.type, async (params) => { + languageServer.registerOnRequest(ProjectHasUnresolvedDependenciesRequest.type, async (params) => { await restore(languageServer, restoreChannel, params.projectFilePaths, false); }); } diff --git a/src/lsptoolshost/roslynProtocol.ts b/src/lsptoolshost/roslynProtocol.ts index 7e734ca26..70fba0a01 100644 --- a/src/lsptoolshost/roslynProtocol.ts +++ b/src/lsptoolshost/roslynProtocol.ts @@ -268,7 +268,7 @@ export namespace RestorableProjects { export const type = new lsp.RequestType0(method); } -export namespace ProjectHasUnresolvedDependenciesNotification { +export namespace ProjectHasUnresolvedDependenciesRequest { export const method = 'workspace/_roslyn_projectHasUnresolvedDependencies'; export const messageDirection: lsp.MessageDirection = lsp.MessageDirection.serverToClient; export const type = new lsp.RequestType(method); From 348828bdfb38a3ead050dbeebe23b9d42f07ccae Mon Sep 17 00:00:00 2001 From: David Barbet Date: Mon, 4 Dec 2023 16:00:36 -0800 Subject: [PATCH 7/8] Update required VSCode version to account for APIs in vscode-extension-telementry --- package.json | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/package.json b/package.json index 3f78bee94..d8b32a05c 100644 --- a/package.json +++ b/package.json @@ -1014,7 +1014,7 @@ } ], "engines": { - "vscode": "^1.73.0" + "vscode": "^1.75.0" }, "activationEvents": [ "onDebugInitialConfigurations", @@ -1023,18 +1023,7 @@ "onDebugResolve:clr", "onDebugResolve:dotnet", "onLanguage:csharp", - "onLanguage:aspnetcorerazor", - "onCommand:o.restart", - "onCommand:o.pickProjectAndStart", "onCommand:o.showOutput", - "onCommand:dotnet.restore.project", - "onCommand:dotnet.restore.all", - "onCommand:dotnet.generateAssets", - "onCommand:dotnet.openSolution", - "onCommand:csharp.downloadDebugger", - "onCommand:csharp.listProcess", - "onCommand:csharp.listRemoteProcess", - "onCommand:csharp.listRemoteDockerProcess", "onCommand:omnisharp.registerLanguageMiddleware", "workspaceContains:project.json", "workspaceContains:**/*.{csproj,sln,slnf,csx,cake}" From bd054288de2d7ba00f38aed6d3dfeec514c2d449 Mon Sep 17 00:00:00 2001 From: David Barbet Date: Mon, 4 Dec 2023 17:06:49 -0800 Subject: [PATCH 8/8] Update Roslyn version --- CHANGELOG.md | 11 ++++++++++- package.json | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5abb2224d..a712c3eb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,16 @@ - [O# Parity] Nuget restore [#5725](https://github.com/dotnet/vscode-csharp/issues/5725) - Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876) -## Latest +## 2.12.19 +* Update Roslyn to 4.9.0-3.23604.10 (PR: [#6676](https://github.com/dotnet/vscode-csharp/pull/6676)) + * Pass through folders for additional files (PR: [#71061](https://github.com/dotnet/roslyn/pull/71061)) + * Automatically detect missing NuGet packages and restore (PR: [#70851](https://github.com/dotnet/roslyn/pull/70851)) + * Enable route embedded language features in vscode (PR: [#70927](https://github.com/dotnet/roslyn/pull/70927)) +* Add automatic nuget restore support to C# standalone (PR: [#6676](https://github.com/dotnet/vscode-csharp/pull/6676)) +* Update required VSCode version to 1.75.0 (PR: [#6711](https://github.com/dotnet/vscode-csharp/pull/6711)) +* Update debugger docs to point to official documentation (PR: [#6674](https://github.com/dotnet/vscode-csharp/pull/6674)) + +## 2.12.19 * Update Roslyn to 4.9.0-2.23563.2 (PR: [#6664](https://github.com/dotnet/vscode-csharp/pull/6664)) * Implement textDocument/prepareRename to show error in invalid rename locations (PR: [#70724](https://github.com/dotnet/roslyn/pull/70724)) * Improve Hover markdown on 'await' keyword (PR: [#70629](https://github.com/dotnet/roslyn/pull/70629)) diff --git a/package.json b/package.json index 99d0a1585..09e552b1e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ } }, "defaults": { - "roslyn": "4.9.0-2.23571.2", + "roslyn": "4.9.0-3.23604.10", "omniSharp": "1.39.10", "razor": "7.0.0-preview.23528.1", "razorOmnisharp": "7.0.0-preview.23363.1",