OmniSharp.MSBuild.ProjectManager Failed to load project file
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json): Version: 2.2.401 Commit: 729b316c13
Runtime Environment: OS Name: Windows OS Version: 10.0.18362 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.2.401\
Host (useful for support): Version: 2.2.6 Commit: 7dac9b1b51
.NET Core SDKs installed: 2.2.401 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
VS Code version: 1.36.1 C# Extension version: 1.21.0
Steps to reproduce
Press F5 to begin debugging with .NET Core
Expected behavior
As the dotnet run
does
Actual behavior
Starting OmniSharp server at 7/28/2019, 4:38:05 PM Target: c:\Users\limen\myApp\classes
OmniSharp server started. Path: C:\Users\limen.vscode\extensions\ms-vscode.csharp-1.21.0.omnisharp\1.34.0\OmniSharp.exe PID: 11920
Starting OmniSharp on Windows 6.2.9200.0 (x64)
DotNetPath set to dotnet
Located 2 MSBuild instance(s)
1: Visual Studio Community 2019 16.2.29123.88 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
2: StandAlone 16.0 - "c:\Users\limen\.vscode\extensions\ms-vscode.csharp-1.21.0\.omnisharp\1.34.0\.msbuild\Current\Bin"
Registered MSBuild instance: Visual Studio Community 2019 16.2.29123.88 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
Detecting Cake files in 'c:\Users\limen\myApp\classes'.
Could not find any Cake files
No solution files found in 'c:\Users\limen\myApp\classes'
Queue project update for 'c:\Users\limen\myApp\classes\classes.csproj'
Detecting CSX files in 'c:\Users\limen\myApp\classes'.
Could not find any CSX files
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
Loading project: c:\Users\limen\myApp\classes\classes.csproj
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
Configuration finished.
Omnisharp server running using Stdio at location 'c:\Users\limen\myApp\classes' on host 10016.
Failed to load project file 'c:\Users\limen\myApp\classes\classes.csproj'.
c:\Users\limen\myApp\classes\classes.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK ‘Microsoft.NET.Sdk’ specified could not be found. c:\Users\limen\myApp\classes\classes.csproj
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
at Microsoft.Build.Evaluation.Evaluator4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List
1& projects, SdkResult& sdkResult, Boolean throwOnFileNotExistsError)
at Microsoft.Build.Evaluation.Evaluator4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement, SdkResult& sdkResult) at Microsoft.Build.Evaluation.Evaluator
4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)
at Microsoft.Build.Evaluation.Evaluator4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) at Microsoft.Build.Evaluation.Evaluator
4.Evaluate(ILoggingService loggingService, BuildEventContext buildEventContext)
at Microsoft.Build.Evaluation.Project.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.Project.Initialize(IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary
2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary2 globalProperties, String toolsVersion) at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore(String filePath) in C:\projects\omnisharp-roslyn\src\OmniSharp.MSBuild\ProjectLoader.cs:line 129 at OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath) in C:\projects\omnisharp-roslyn\src\OmniSharp.MSBuild\ProjectLoader.cs:line 72 at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectIdInfo projectIdInfo, ProjectLoader loader) in C:\projects\omnisharp-roslyn\src\OmniSharp.MSBuild\ProjectFile\ProjectFileInfo.cs:line 95 at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func
1 loader) in C:\projects\omnisharp-roslyn\src\OmniSharp.MSBuild\ProjectManager.cs:line 308
Attempted to update project that is not loaded: c:\Users\limen\myApp\classes\classes.csproj
Miscellaneous file: c:\Users\limen\myApp\classes\BankAccount.cs added to workspace
Miscellaneous file: c:\Users\limen\myApp\classes\Program.cs added to workspace
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
In fact, I don’t really want to install vs studio…
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
Can you try installing the build tools from the above ?