Screenshot of the VS Code file explorer thingy:
I’m just starting to learn C# with VS Code. I installed the C# dev extension, and followed all the steps in the “Welcome” section until the “Create your .NET project” part. I chose NET: New project and then Console App. It automatically created all the files and folders needed inside of the folder I assigned it to. Then when the files opened in vs code, the ConsoleApp1.csproj
file was red (as seen in the picture). In the output part of the terminal it says:
[error] Failed to load project ‘d:devConsoleApp1ConsoleApp1.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”. Exception: “System.IO.FileNotFoundException: Could not load file or assembly ‘System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified.
File name: ‘System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.WorkloadSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, SdkResultFactory factory)
at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.TryResolveSdkUsingSpecifiedResolvers(IList1 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)”” d:devConsoleApp1ConsoleApp1.csproj)
I’m not the most tech savvy person when it comes to stuff like this; and this is my first time attempting to learn how to code so I don’t know how to approach this problem.
Please ask if you need anymore information. Thanks in advance.
nasgor22 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1