Skip to content

Conversation

@dibarbet
Copy link
Member

@dibarbet dibarbet commented Jun 20, 2023

On Mac we use an dotnet executable dll instead of an actual executable (currently we only build on windows which doesn't allow us to create a codesigned executable for mac).

However, in this code path we were just launching 'dotnet' on the CLI instead of using the runtime downloaded dotnet. If you don't have .net7 available on the CLI, it'll throw (since the server requires the .net 7 runtime)

You must install or update .NET to run this application.

App: C:\Users\dibar\.vscode\extensions\ms-dotnettools.csharp-2.0.212-win32-x64\.roslyn\Microsoft.CodeAnalysis.LanguageServer.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '7.0.0-preview.7.22362.8' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
  6.0.11 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.18 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=7.0.0-preview.7.22362.8&arch=x64&rid=win10-x64

This can be reproduced on windows by only having .net 6 installed on the CLI and pointing the server path setting (dotnet.server.path) to a dll instead of the exe.

Resolves #5836

@dibarbet dibarbet requested a review from genlu June 20, 2023 21:43
@dibarbet dibarbet marked this pull request as ready for review June 20, 2023 21:50
@dibarbet dibarbet requested a review from a team as a code owner June 20, 2023 21:50
@dibarbet dibarbet merged commit 7caec7e into dotnet:main Jun 20, 2023
@dibarbet dibarbet deleted the use_correct_runtime_dll branch June 20, 2023 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C# prerelease version of C# extension errors with .NET 6

3 participants