Skip to content

Failure when only .NET SDK 9.0 is installedΒ #259

@rainersigwald

Description

@rainersigwald

I recently reinstalled Windows and have only .NET SDK 9.0.100-rc.2 installed (no 8 SDK). Trying to load a project in VSCode I get

Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime
Could not find extension target platform in c:\Users\raines\.vscode\extensions\mhutch.msbuild-editor-2.9.682-g7aee27024f\.vsixmanifest
Dotnet path: c:\Users\raines\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime\.dotnet\8.0.10~x64\dotnet.exe
waiting for named pipe information from server...
[stdout] {"pipeName":"\\\\.\\pipe\\f495e219"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info  - 4:37:20 PM] [Program] Language server initialized
[stderr] No .NET SDKs were found.

Download a .NET SDK:
https://aka.ms/dotnet/download

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
[Error - 4:37:21 PM] [LanguageServerHost] System.InvalidOperationException: No instances of MSBuild could be detected.
Try calling RegisterInstance or RegisterMSBuildPath to manually register one.
   at Microsoft.Build.Locator.MSBuildLocator.RegisterDefaults()
   at MonoDevelop.MSBuild.Editor.LanguageServer.Services.MSBuildRuntimeService..ctor(ILspLogger logger) in /_/MSBuildLanguageServer/Services/MSBuildRuntimeServiceFactory.cs:line 46
   at MonoDevelop.MSBuild.Editor.LanguageServer.Services.MSBuildRuntimeServiceFactory.CreateILspService(LspServices lspServices, WellKnownLspServerKinds serverKind) in /_/MSBuildLanguageServer/Services/MSBuildRuntimeServiceFactory.cs:line 27
   at Microsoft.CodeAnalysis.LanguageServer.LspServices.<>c__DisplayClass4_1.<.ctor>b__0() in /_/external/roslyn/src/LanguageServer/Protocol/LspServices/LspServices.cs:line 54
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Microsoft.CodeAnalysis.LanguageServer.LspServices.GetService(String typeName) in /_/external/roslyn/src/LanguageServer/Protocol/LspServices/LspServices.cs:line 142
   at Microsoft.CodeAnalysis.LanguageServer.LspServices.TryGetService(Type type, Object& service) in /_/external/roslyn/src/LanguageServer/Protocol/LspServices/LspServices.cs:line 113
   at Microsoft.CodeAnalysis.LanguageServer.LspServices.GetService[T]() in /_/external/roslyn/src/LanguageServer/Protocol/LspServices/LspServices.cs:line 84
   at Microsoft.CodeAnalysis.LanguageServer.LspServices.GetRequiredService[T]() in /_/external/roslyn/src/LanguageServer/Protocol/LspServices/LspServices.cs:line 77
   at MonoDevelop.MSBuild.Editor.LanguageServer.Parser.LspMSBuildParserFactory.CreateILspService(LspServices lspServices, WellKnownLspServerKinds serverKind) in /_/MSBuildLanguageServer/Parser/LspMSBuildParserServiceFactory.cs:line 35
   at Microsoft.CodeAnalysis.LanguageServer.LspServices.<>c__DisplayClass4_1.<.ctor>b__0() in /_/external/roslyn/src/LanguageServer/Protocol/LspServices/LspServices.cs:line 54
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Microsoft.CodeAnalysis.LanguageServer.LspServices.GetService(String typeName) in /_/external/roslyn/src/LanguageServer/Protocol/LspServices/LspServices.cs:line 142
   at Microsoft.CodeAnalysis.LanguageServer.LspServices.TryGetService(Type type, Object& service) in /_/external/roslyn/src/LanguageServer/Protocol/LspServices/LspServices.cs:line 113
   at Microsoft.CodeAnalysis.LanguageServer.LspServices.GetService[T]() in /_/external/roslyn/src/LanguageServer/Protocol/LspServices/LspServices.cs:line 84
   at Microsoft.CodeAnalysis.LanguageServer.LspServices.GetRequiredService[T]() in /_/external/roslyn/src/LanguageServer/Protocol/LspServices/LspServices.cs:line 77
   at Microsoft.CodeAnalysis.LanguageServer.Handler.RequestContext.GetRequiredService[T]() in /_/MSBuildLanguageServer/Import/RequestContext.cs:line 420
   at MonoDevelop.MSBuild.Editor.LanguageServer.Handler.DocumentDiagnosticsHandler.HandleRequestAsync(DocumentDiagnosticParams request, RequestContext context, CancellationToken cancellationToken) in /_/MSBuildLanguageServer/Handler/DocumentDiagnosticsHandler.cs:line 32
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.StartRequestAsync[TRequest,TResponse](TRequest request, TRequestContext context, IMethodHandler handler, String language, CancellationToken cancellationToken) in /_/external/roslyn/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 187
[Error - 4:37:28 PM] Request textDocument/diagnostic failed.
  Message: No instances of MSBuild could be detected.
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions