dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.85k stars 669 forks source link

[Mac]An error "Cannot create .NET debug configurations. The active C# project is not within folder" occurred when run or debug the project after install the C# Dev Kit. #6314

Closed v-Judy closed 1 year ago

v-Judy commented 1 year ago

Environment data

VS Code version: 1.81.1 C# Extension version: v 2.1.2 C# Dev Kit: v 0.5.2

Steps to reproduce

  1. Install the VsCode (1.81.1)
  2. Install the C# Dev kit (v 0.5.2) with C# extension (v2.1.2)
  3. Create a new project by following code
    mkdir Razor
    cd Razor
    dotnet new razor
  4. code . to open the project.
  5. F5 to run the project, then select .NET 5+ and .Net Core, the VsCode not respond.
  6. When I try to create a launch.json file, will meet the error

Note

  1. This issue only repro on Mac OS.
  2. This issue does not repro on Linux/Windows OS.
  3. This issue does not repro if I only install the C# extension (v 2.1.2).

Actual behavior

MicrosoftTeams-image MicrosoftTeams-image (1)

Expected behavior

When I debug or run the project, it could create the configurations file successfully.

jeangatto commented 1 year ago

I'm having the same problem

dibarbet commented 1 year ago

Unfortunately I'm not able to repro this myself - @v-Judy (or anyone else) - please include the full contents of the C# output window here (ideally with dotnet.server.trace set to Trace).

Typically this is a symptom of the project failing to load.

dibarbet commented 1 year ago

While I can't repro the specific error message- I can say that F5 -> select .NET 5+ and .Net Core does nothing for me (on both windows and mac) when devkit is installed. Without devkit it generates assets.

@WardenGnaw I'm moving this over to you as I don't think the Roslyn server has any involvement in F5 here (since we're not generating assets?) with devkit installed.

(The error message and screenshot in the bug description do not match the repro steps. The screenshot shows O# but the repro steps say using devkit. I was unable to repro any issue in O#).

WardenGnaw commented 1 year ago

F5 to run the project, then select .NET 5+ and .Net Core, the VsCode not respond.

This expected. If you have C# Dev Kit installed. >NET 5+ and .NET Core will not work. You will want to use the C# option. See https://code.visualstudio.com/docs/csharp/debugging#_debug-with-f5

Related: https://github.com/microsoft/vscode/issues/184457

v-Judy commented 1 year ago

Unfortunately I'm not able to repro this myself - @v-Judy (or anyone else) - please include the full contents of the C# output window here (ideally with dotnet.server.trace set to Trace).

The C# output windows' content show as below:

C# outputVersion:1.0 StartHTML:000000096 EndHTML:000024784 StartFragment:000000186 EndFragment:000024770 dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Remote.Workspaces.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.Workspaces.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Scripting.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.MSBuild.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Elfie.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.Features.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.AnalyzerUtilities.dll added to workspace. dbug: LanguageServerWorkspaceFactory[0] Solution-level analyzer at /Users/vs/.vscode/extensions/ms-dotnettools.csharp-2.1.2-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Features.dll added to workspace. [Info - 3:47:25 PM] [Program]Language server initialized [LanguageServerHost][07:47:25.862][Start]initialize [LanguageServerHost][07:47:25.867][Start]Initialize [LanguageServerHost][07:47:26.604][End]Initialize [LanguageServerHost][07:47:26.947][End]initialize [LanguageServerHost][07:47:26.988][Start]initialized [LanguageServerHost][07:47:27.427][End]initialized [LanguageServerHost][07:47:27.574][Start]workspace/diagnostic [LanguageServerHost]PublicWorkspacePullDiagnosticsHandler(category: , source: ) started getting diagnostics [LanguageServerHost]previousResults.Length=0 [LanguageServerHost]Processing 0 documents [LanguageServerHost][07:47:27.839][Start]serviceBroker/connect [BrokeredServiceTraceListener]ServiceBroker Information: 1 : [BrokeredServiceTraceListener]SameProcess proffered brokered service(s): Microsoft.VisualStudio.RemoteBrokeredServiceManifest (0.2). [BrokeredServiceTraceListener]ServiceBroker Information: 1 : [BrokeredServiceTraceListener]SameProcess proffered brokered service(s): Microsoft.VisualStudio.GlobalBrokeredServiceContainer.MissingServiceDiagnostics (1.0). [BrokeredServiceTraceListener]ServiceBroker Information: 1 : [BrokeredServiceTraceListener]SameProcess proffered brokered service(s): Microsoft.ServiceHub.Framework.AuthorizationService. [BrokeredServiceTraceListener]ServiceBroker Information: 1 : [BrokeredServiceTraceListener]SameProcess proffered brokered service(s): Microsoft.CodeAnalysis.LanguageServer.IHelloWorld (0.1), Microsoft.VisualStudio.LanguageServices.WorkspaceProjectFactoryService, Microsoft.VisualStudio.Server.IBrokeredServiceBridgeManifest (0.1), Microsoft.CodeAnalysis.LanguageServer.ManagedHotReloadLanguageService (0.1). [Microsoft.CodeAnalysis.LanguageServer.BrokeredServices.BrokeredServiceBridgeProvider]Setting up brokered service bridge [BrokeredServiceTraceListener]ServiceBroker Start: 0 : [BrokeredServiceTraceListener]Requesting proxy to "helloServiceHubDotNetHost (0.1)" [BrokeredServiceTraceListener]ServiceBroker Warning: 3 : [BrokeredServiceTraceListener]Brokered service "helloServiceHubDotNetHost (0.1)" has no proffering source and no package registered to load. [BrokeredServiceTraceListener]ServiceBroker Warning: 2 : [BrokeredServiceTraceListener]Request for proxy to "helloServiceHubDotNetHost (0.1)" is declined: ServiceFactoryNotProffered. [BrokeredServiceTraceListener]ServiceBroker Stop: 0 : [BrokeredServiceTraceListener]Requesting proxy to "helloServiceHubDotNetHost (0.1)" [BrokeredServiceTraceListener]ServiceBroker Information: 0 : [BrokeredServiceTraceListener]Added local RPC method "handshake" -> Microsoft.ServiceHub.Framework.IpcRelayServiceBroker.HandshakeAsync(ServiceBrokerClientMetadata, CancellationToken) (Microsoft.ServiceHub.Framework.IpcRelayServiceBroker) [BrokeredServiceTraceListener]ServiceBroker Information: 0 : [BrokeredServiceTraceListener]Added local RPC method "requestServiceChannel" -> Microsoft.ServiceHub.Framework.IpcRelayServiceBroker.RequestServiceChannelAsync(ServiceMoniker, ServiceActivationOptions, CancellationToken) (Microsoft.ServiceHub.Framework.IpcRelayServiceBroker) [BrokeredServiceTraceListener]ServiceBroker Information: 0 : [BrokeredServiceTraceListener]Added local RPC method "cancelServiceRequest" -> Microsoft.ServiceHub.Framework.IpcRelayServiceBroker.CancelServiceRequestAsync(Guid) (Microsoft.ServiceHub.Framework.IpcRelayServiceBroker) [BrokeredServiceTraceListener]ServiceBroker Information: 0 : [BrokeredServiceTraceListener]Added local RPC method "dispose" -> Microsoft.ServiceHub.Framework.IpcRelayServiceBroker.Dispose() (Microsoft.ServiceHub.Framework.IpcRelayServiceBroker) [BrokeredServiceTraceListener]ServiceBroker Information: 0 : [BrokeredServiceTraceListener]Added local RPC method "handshake" -> Microsoft.ServiceHub.Framework.IpcRelayServiceBroker.HandshakeAsync(ServiceBrokerClientMetadata, CancellationToken) (Microsoft.ServiceHub.Framework.IpcRelayServiceBroker) [BrokeredServiceTraceListener]ServiceBroker Information: 0 : [BrokeredServiceTraceListener]Added local RPC method "requestServiceChannel" -> Microsoft.ServiceHub.Framework.IpcRelayServiceBroker.RequestServiceChannelAsync(ServiceMoniker, ServiceActivationOptions, CancellationToken) (Microsoft.ServiceHub.Framework.IpcRelayServiceBroker) [BrokeredServiceTraceListener]ServiceBroker Information: 0 : [BrokeredServiceTraceListener]Added local RPC method "cancelServiceRequest" -> Microsoft.ServiceHub.Framework.IpcRelayServiceBroker.CancelServiceRequestAsync(Guid) (Microsoft.ServiceHub.Framework.IpcRelayServiceBroker) [BrokeredServiceTraceListener]ServiceBroker Information: 2 : [BrokeredServiceTraceListener]Listening for events from Microsoft.ServiceHub.Framework.IpcRelayServiceBroker.AvailabilityChanged to raise notification. [BrokeredServiceTraceListener]ServiceBroker Information: 3 : [BrokeredServiceTraceListener]Listening started. [BrokeredServiceTraceListener]ServiceBroker Information: 7 : [BrokeredServiceTraceListener]{"id":2,"method":"handshake"} [BrokeredServiceTraceListener]ServiceBroker Verbose: 7 : [BrokeredServiceTraceListener]Received: {"jsonrpc":"2.0","id":2,"method":"handshake","params":[{"supportedConnections":"IpcPipe","localServiceHost":{"operatingSystem":2,"processArchitecture":1,"runtime":2,"runtimeVersion":"7.0.10"}}]} [BrokeredServiceTraceListener]ServiceBroker Information: 6 : [BrokeredServiceTraceListener]Received request "2" for method "handshake". [BrokeredServiceTraceListener]ServiceBroker Information: 0 : [BrokeredServiceTraceListener]Added local RPC method "availabilityChanged" -> _proxy_Microsoft.ServiceHub.Framework.IRemoteServiceBroker_aa24b9e3-ca9b-4ac6-9528-7b0003ecda75.OnAvailabilityChanged(BrokeredServicesChangedEventArgs) (_proxy_Microsoft.ServiceHub.Framework.IRemoteServiceBroker_aa24b9e3-ca9b-4ac6-9528-7b0003ecda75) [BrokeredServiceTraceListener]ServiceBroker Information: 1 : [BrokeredServiceTraceListener]IRemoteServiceBroker proffered from remote source: OtherProcessOnSameMachine. [BrokeredServiceTraceListener]ServiceBroker Information: 3 : [BrokeredServiceTraceListener]Listening started. [BrokeredServiceTraceListener]ServiceBroker Information: 1 : [BrokeredServiceTraceListener]OtherProcessOnSameMachine proffered brokered service(s): Microsoft.CodeAnalysis.LanguageClient.SolutionSnapshotProvider (0.1), Microsoft.VisualStudio.Debugger.ManagedHotReloadService (0.1), Microsoft.VisualStudio.ProjectSystem.ProjectInitializationStatusService (0.1), helloServiceHubDotNetHost (0.1), vs-intellicode-base-models (0.1). [BrokeredServiceTraceListener]ServiceBroker Information: 2 : [BrokeredServiceTraceListener]Request for "helloServiceHubDotNetHost (0.1)" will be fulfilled by OtherProcessOnSameMachine [BrokeredServiceTraceListener]ServiceBroker Start: 0 : [BrokeredServiceTraceListener]Requesting proxy to "helloServiceHubDotNetHost (0.1)" [BrokeredServiceTraceListener]ServiceBroker Information: 2 : [BrokeredServiceTraceListener]Request for "helloServiceHubDotNetHost (0.1)" will be fulfilled by OtherProcessOnSameMachine [BrokeredServiceTraceListener]ServiceBroker Information: 9 : [BrokeredServiceTraceListener]Invoking Microsoft.ServiceHub.Framework.IpcRelayServiceBroker.HandshakeAsync(ServiceBrokerClientMetadata, CancellationToken) [BrokeredServiceTraceListener]ServiceBroker Start: 0 : [BrokeredServiceTraceListener]handshake [BrokeredServiceTraceListener]ServiceBroker Stop: 0 : [BrokeredServiceTraceListener]handshake [BrokeredServiceTraceListener]ServiceBroker Information: 8 : [BrokeredServiceTraceListener]{"id":2} [BrokeredServiceTraceListener]ServiceBroker Verbose: 8 : [BrokeredServiceTraceListener]Sent: {"jsonrpc":"2.0","id":2,"result":null} [BrokeredServiceTraceListener]ServiceBroker Information: 8 : [BrokeredServiceTraceListener]{"id":2,"method":"handshake"} [BrokeredServiceTraceListener]ServiceBroker Verbose: 8 : [BrokeredServiceTraceListener]Sent: {"jsonrpc":"2.0","id":2,"method":"handshake","params":[{"supportedConnections":"Multiplexing, IpcPipe","localServiceHost":{"operatingSystem":2,"processArchitecture":1,"runtime":2,"runtimeVersion":"8.0.0"}}],"traceparent":"00-179fd03d98ef1648834b5e3ff364c0a5-97c9aa2cd272ec4e-01"} [BrokeredServiceTraceListener]ServiceBroker Information: 7 : [BrokeredServiceTraceListener]{"id":2} [BrokeredServiceTraceListener]ServiceBroker Verbose: 7 : [BrokeredServiceTraceListener]Received: {"jsonrpc":"2.0","id":2,"result":null} [BrokeredServiceTraceListener]ServiceBroker Information: 11 : [BrokeredServiceTraceListener]Received result for request "2". [BrokeredServiceTraceListener]ServiceBroker Information: 7 : [BrokeredServiceTraceListener]{"id":3,"method":"requestServiceChannel"} [BrokeredServiceTraceListener]ServiceBroker Verbose: 7 : [BrokeredServiceTraceListener]Received: {"jsonrpc":"2.0","id":3,"method":"requestServiceChannel","params":[{"name":"Microsoft.VisualStudio.Server.IBrokeredServiceBridgeManifest","version":"0.1"},{"clientCulture":"en-US","clientUICulture":"en-US"}]} [BrokeredServiceTraceListener]ServiceBroker Information: 6 : [BrokeredServiceTraceListener]Received request "3" for method "requestServiceChannel". [BrokeredServiceTraceListener]ServiceBroker Information: 9 : [BrokeredServiceTraceListener]Invoking Microsoft.ServiceHub.Framework.IpcRelayServiceBroker.RequestServiceChannelAsync(ServiceMoniker, ServiceActivationOptions, CancellationToken) [BrokeredServiceTraceListener]ServiceBroker Start: 0 : [BrokeredServiceTraceListener]requestServiceChannel [BrokeredServiceTraceListener]ServiceBroker Transfer: 0 : [BrokeredServiceTraceListener]Transfer, relatedActivityId=e8c694ae-57ed-48dc-8bc5-0c99e02a01ca [BrokeredServiceTraceListener]ServiceBroker Start: 0 : [BrokeredServiceTraceListener]Requesting pipe to "Microsoft.VisualStudio.Server.IBrokeredServiceBridgeManifest (0.1)" [BrokeredServiceTraceListener]ServiceBroker Information: 2 : [BrokeredServiceTraceListener]Request for "Microsoft.VisualStudio.Server.IBrokeredServiceBridgeManifest (0.1)" will be fulfilled by SameProcess [BrokeredServiceTraceListener]ServiceBroker Transfer: 0 : [BrokeredServiceTraceListener]Transfer, relatedActivityId=abd73fdf-6c5a-46fc-84b8-a1a9ddc31203 [BrokeredServiceTraceListener]ServiceBroker Start: 0 : [BrokeredServiceTraceListener]Requesting proxy to "Microsoft.ServiceHub.Framework.AuthorizationService" [BrokeredServiceTraceListener]ServiceBroker Information: 2 : [BrokeredServiceTraceListener]Request for "Microsoft.ServiceHub.Framework.AuthorizationService" will be fulfilled by SameProcess [BrokeredServiceTraceListener]ServiceBroker Information: 2 : [BrokeredServiceTraceListener]Request for proxy to "Microsoft.ServiceHub.Framework.AuthorizationService" is Fulfilled by SameProcess: NoExplanation. [BrokeredServiceTraceListener]ServiceBroker Stop: 0 : [BrokeredServiceTraceListener]Requesting proxy to "Microsoft.ServiceHub.Framework.AuthorizationService" [BrokeredServiceTraceListener]ServiceBroker Transfer: 0 : [BrokeredServiceTraceListener]Transfer, relatedActivityId=e8c694ae-57ed-48dc-8bc5-0c99e02a01ca [BrokeredServiceTraceListener]ServiceBroker Information: 2 : [BrokeredServiceTraceListener]Request for pipe to "Microsoft.VisualStudio.Server.IBrokeredServiceBridgeManifest (0.1)" is Fulfilled by SameProcess: NoExplanation. [BrokeredServiceTraceListener]ServiceBroker Stop: 0 : [BrokeredServiceTraceListener]Requesting pipe to "Microsoft.VisualStudio.Server.IBrokeredServiceBridgeManifest (0.1)" [BrokeredServiceTraceListener]ServiceBroker Transfer: 0 : [BrokeredServiceTraceListener]Transfer, relatedActivityId=faa60882-b8c9-4dbf-b404-1d4233a1bfb9 [BrokeredServiceTraceListener]ServiceBroker Stop: 0 : [BrokeredServiceTraceListener]requestServiceChannel [BrokeredServiceTraceListener]ServiceBroker Information: 8 : [BrokeredServiceTraceListener]{"id":3} [BrokeredServiceTraceListener]ServiceBroker Verbose: 8 : [BrokeredServiceTraceListener]Sent: {"jsonrpc":"2.0","id":3,"result":{"requestId":"d23770f3-1bb9-4cc8-96c6-09053a4e29ca","pipeName":"/var/folders/qq/x4z1t1j926n6lhfxqys16_qm0000gn/T/085f0d86831148df99a5a04c56bda88f"}} [Microsoft.CodeAnalysis.LanguageServer.BrokeredServices.Services.BrokeredServiceBridgeManifest.BrokeredServiceBridgeManifest]Proffered services: Microsoft.CodeAnalysis.LanguageServer.IHelloWorld (0.1),Microsoft.VisualStudio.LanguageServices.WorkspaceProjectFactoryService,Microsoft.CodeAnalysis.LanguageServer.ManagedHotReloadLanguageService (0.1) [BrokeredServiceTraceListener]ServiceBroker Information: 8 : [BrokeredServiceTraceListener]{"id":3,"method":"requestServiceChannel"} [BrokeredServiceTraceListener]ServiceBroker Verbose: 8 : [BrokeredServiceTraceListener]Sent: {"jsonrpc":"2.0","id":3,"method":"requestServiceChannel","params":[{"name":"helloServiceHubDotNetHost","version":"0.1"},{"clientCredentials":{},"clientCulture":"en-US","clientUICulture":"en-US"}],"traceparent":"00-179fd03d98ef1648834b5e3ff364c0a5-5463078fa524234c-01"} [BrokeredServiceTraceListener]ServiceBroker Information: 7 : [BrokeredServiceTraceListener]{"id":3} [BrokeredServiceTraceListener]ServiceBroker Verbose: 7 : [BrokeredServiceTraceListener]Received: {"jsonrpc":"2.0","id":3,"result":{"requestId":"9fe93f6f-8adc-422c-a931-8d6a858bd983","multiplexingChannelId":3}} [BrokeredServiceTraceListener]ServiceBroker Information: 11 : [BrokeredServiceTraceListener]Received result for request "3". [BrokeredServiceTraceListener]ServiceBroker Information: 2 : [BrokeredServiceTraceListener]Request for proxy to "helloServiceHubDotNetHost (0.1)" is Fulfilled by OtherProcessOnSameMachine: NoExplanation. [BrokeredServiceTraceListener]ServiceBroker Stop: 0 : [BrokeredServiceTraceListener]Requesting proxy to "helloServiceHubDotNetHost (0.1)" [Microsoft.CodeAnalysis.LanguageServer.BrokeredServices.Services.HelloWorld.RemoteHelloWorldProvider]Response from remote: Hello, C#! - with love from ServiceHub running on .NET [LanguageServerHost][07:47:29.728][End]serviceBroker/connect

Typically this is a symptom of the project failing to load.

This is indeed a symptom that the project cannot be loaded. The log information of the project is as follows:

Project logVersion:1.0 StartHTML:000000096 EndHTML:000010607 StartFragment:000000186 EndFragment:000010593 2023-09-12 15:42:41.182 [error] (/Users/vs/RazorNoAuth/RazorNoAuth.csproj): SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk.Web". Exception: "System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. File name: 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir, String globalJsonPath) at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory) at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.TryResolveSdkUsingSpecifiedResolvers(IList`1 resolvers, Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio, SdkResult& sdkResult, IEnumerable`1& errors, IEnumerable`1& warnings)"" 2023-09-12 15:42:41.327 [info] Project system initialization finished. 0 project(s) are loaded, and 1 failed to load. 2023-09-12 15:42:41.347 [error] Failed to load project '/Users/vs/RazorNoAuth/RazorNoAuth.csproj'. One or more errors occurred. (SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk.Web". Exception: "System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. File name: 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir, String globalJsonPath) at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory) at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.TryResolveSdkUsingSpecifiedResolvers(IList`1 resolvers, Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio, SdkResult& sdkResult, IEnumerable`1& errors, IEnumerable`1& warnings)"" /Users/vs/RazorNoAuth/RazorNoAuth.csproj) 2023-09-12 15:47:31.038 [error] (/Users/vs/RazorNoAuth/RazorNoAuth.csproj): SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk.Web". Exception: "System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. File name: 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir, String globalJsonPath) at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory) at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.TryResolveSdkUsingSpecifiedResolvers(IList`1 resolvers, Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio, SdkResult& sdkResult, IEnumerable`1& errors, IEnumerable`1& warnings)"" 2023-09-12 15:47:31.151 [error] Failed to load project '/Users/vs/RazorNoAuth/RazorNoAuth.csproj'. One or more errors occurred. (SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk.Web". Exception: "System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. File name: 'System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir, String globalJsonPath) at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory) at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.TryResolveSdkUsingSpecifiedResolvers(IList`1 resolvers, Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio, SdkResult& sdkResult, IEnumerable`1& errors, IEnumerable`1& warnings)"" /Users/vs/RazorNoAuth/RazorNoAuth.csproj) 2023-0
dibarbet commented 1 year ago

Thanks for the logs - that indeed confirms its a project loading issue. I'm transferring this issue over to the devkit side since they're responsible for the project load.

Issue here - https://github.com/microsoft/vscode-dotnettools/issues/551