question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OmniSharp.MSBuild.ProjectManager Failed to load project file

See original GitHub issue

Environment 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, List1& projects, SdkResult& sdkResult, Boolean throwOnFileNotExistsError) at Microsoft.Build.Evaluation.Evaluator4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement, SdkResult& sdkResult) at Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) at Microsoft.Build.Evaluation.Evaluator4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) at Microsoft.Build.Evaluation.Evaluator4.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, IDictionary2 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, Func1 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:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
lliillcommented, Aug 7, 2019

In fact, I don’t really want to install vs studio…

0reactions
akshita31commented, Aug 5, 2019

https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019

Can you try installing the build tools from the above ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

OmniSharp.MSBuild.ProjectManager Failed to load project file
Run the command "sudo dotnet clean" · Navigate to the obj folder, delete "project.nuget.cache" and delete the folder net5. · Run the command...
Read more >
OmniSharp.MSBuild.ProjectManager Attempted to update ...
MSBuild.ProjectManager Attempted to update project that is not loaded" error. See below answer on setting Omnisharp Use Global Mono to "always".
Read more >
OmniSharp.MSBuild.ProjectManager Attempted to ... - YouTube
A possible solution to OmniSharp extension issues in VS Code. ... MSBuild. ProjectManager Attempted to update project that is not loaded :.
Read more >
getting omnisharp.msbuild.projectmanager failed to load ...
getting omnisharp.msbuild.projectmanager failed to load project file error. I have edited my json file to include "omnisharp.path":"latest" ...
Read more >
Bug - Omnisharp won't update project? - Unity Forum
[fail]: OmniSharp.MSBuild.ProjectManager. Attempted to update project that is not loaded: c:\Users\karta\Desktop\Unity Projects\2D ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found