diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a6e567854..d0929dbf04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,15 @@ - Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876) # 2.90.x -* Bump Razor to 10.0.0-preview.25416.1 (PR: [#8557](https://github.com/dotnet/vscode-csharp/pull/8557)) +* Bump Roslyn to 5.0.0-2.25424.1 (PR: [#8559](https://github.com/dotnet/vscode-csharp/pull/8559)) + * Generate `init` accessor for required properties inside `readonly struct`s (PR: [#80004](https://github.com/dotnet/roslyn/pull/80004)) + * Allow Razor cohosting to work with non-Razor SDK projects (PR: [#79953](https://github.com/dotnet/roslyn/pull/79953)) + * Update 'use expr body' to be a purely syntactic analyzer (PR: [#79979](https://github.com/dotnet/roslyn/pull/79979)) + * Implement "Simplify property accessor" feature (PR: [#79754](https://github.com/dotnet/roslyn/pull/79754)) + * Allow Razor to hook up the source generator in misc files (PR: [#79891](https://github.com/dotnet/roslyn/pull/79891)) +* Bump Razor to 10.0.0-preview.25424.9 (PR: [#8559](https://github.com/dotnet/vscode-csharp/pull/8559)) + * Allow Razor cohosting to work with non-Razor SDK projects (PR: [#12118](https://github.com/dotnet/razor/pull/12118)) + * Allow the source generator to produce results for miscellaneous files (PR: [#12106](https://github.com/dotnet/razor/pull/12106)) * Fix range formatting in the presence of K&R braces (PR: [#12121](https://github.com/dotnet/razor/pull/12121)) * Add codelens endpoints and services for cohosting (PR: [#12078](https://github.com/dotnet/razor/pull/12078)) * Support Go To Def for Mvc tag helpers in cohosting (PR: [#12102](https://github.com/dotnet/razor/pull/12102)) diff --git a/package.json b/package.json index 7ef1eab978..c96baf7055 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,9 @@ "workspace" ], "defaults": { - "roslyn": "5.0.0-2.25412.5", - "omniSharp": "1.39.14", - "razor": "10.0.0-preview.25419.3", + "roslyn": "5.0.0-2.25424.1", + "omniSharp": "1.39.14", + "razor": "10.0.0-preview.25424.9", "razorOmnisharp": "7.0.0-preview.23363.1", "xamlTools": "17.14.36106.43" }, diff --git a/src/lsptoolshost/server/roslynLanguageServer.ts b/src/lsptoolshost/server/roslynLanguageServer.ts index 1171b196a4..8d1951d1f4 100644 --- a/src/lsptoolshost/server/roslynLanguageServer.ts +++ b/src/lsptoolshost/server/roslynLanguageServer.ts @@ -666,7 +666,7 @@ export class RoslynLanguageServer { args.push( '--razorDesignTimePath', - path.join(razorPath, 'Targets', 'Microsoft.NET.Sdk.Razor.DesignTime.targets') + path.join(razorSourceGeneratorPath, 'Targets', 'Microsoft.NET.Sdk.Razor.DesignTime.targets') ); // Get the brokered service pipe name from C# Dev Kit (if installed). @@ -706,6 +706,15 @@ export class RoslynLanguageServer { // Set command enablement to use roslyn standalone commands. await vscode.commands.executeCommand('setContext', 'dotnet.server.activationContext', 'Roslyn'); _wasActivatedWithCSharpDevkit = false; + + if (razorOptions.cohostingEnabled) { + // Razor has code in Microsoft.CSharp.DesignTime.targets to handle non-Razor-SDK projects, but that doesn't get imported outside + // of DevKit so we polyfill with a mini-version that Razor provides for that scenario. + args.push( + '--csharpDesignTimePath', + path.join(razorComponentPath, 'Targets', 'Microsoft.CSharpExtension.DesignTime.targets') + ); + } } for (const extensionPath of additionalExtensionPaths) {