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.

[fail]: OmniSharp.MSBuild.ProjectManager Attempted to update project that is not loaded

See original GitHub issue

Issue Description

I keep getting an error when loading my projects.

Steps to Reproduce

Launch the project/Start OmniSharp

Expected Behavior

Omnisharp loads the project correctly.

Actual Behavior

[fail]: OmniSharp.MSBuild.ProjectManager Attempted to update project that is not loaded: d:\Damian\Hakier\Csharp\Szachy\SzachyMulti\SzachyMulti.csproj error keeps appearing.

Logs

OmniSharp log

Starting OmniSharp server at 12.04.2020, 14:59:27 Target: d:\Damian\Hakier\Csharp\Szachy\SzachyMulti

OmniSharp server started. Path: C:\Users\Dom.vscode\extensions\ms-dotnettools.csharp-1.21.16.omnisharp\1.34.15\OmniSharp.exe PID: 4112

    Starting OmniSharp on Windows 6.1.7601.65536 (x64)
    DotNetPath set to dotnet
    Located 2 MSBuild instance(s)
        1: Visual Studio Build Tools 2019 16.5.30002.166 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
        2: StandAlone 16.4 - "C:\Users\Dom\.vscode\extensions\ms-dotnettools.csharp-1.21.16\.omnisharp\1.34.15\.msbuild\Current\Bin"
    Registered MSBuild instance: Visual Studio Build Tools 2019 16.5.30002.166 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
    Detecting Cake files in 'd:\Damian\Hakier\Csharp\Szachy\SzachyMulti'.
    Could not find any Cake files
    No solution files found in 'd:\Damian\Hakier\Csharp\Szachy\SzachyMulti'
    Queue project update for 'd:\Damian\Hakier\Csharp\Szachy\SzachyMulti\SzachyMulti.csproj'
    Detecting CSX files in 'd:\Damian\Hakier\Csharp\Szachy\SzachyMulti'.
    Could not find any CSX files
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
    Loading project: d:\Damian\Hakier\Csharp\Szachy\SzachyMulti\SzachyMulti.csproj
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
    Configuration finished.
    Omnisharp server running using Stdio at location 'd:\Damian\Hakier\Csharp\Szachy\SzachyMulti' on host 3392.
    Failed to load project file 'd:\Damian\Hakier\Csharp\Szachy\SzachyMulti\SzachyMulti.csproj'.

d:\Damian\Hakier\Csharp\Szachy\SzachyMulti\SzachyMulti.csproj(1,1) Microsoft.Build.Exceptions.InvalidProjectFileException: Nie można znaleźć określonego zestawu SDK „Microsoft.NET.Sdk”. d:\Damian\Hakier\Csharp\Szachy\SzachyMulti\SzachyMulti.csproj w Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args) w Microsoft.Build.Evaluation.Evaluator4.ExpandAndLoadImportsFromUnescapedImportExpressionConditioned(String directoryOfImportingFile, ProjectImportElement importElement, List1& projects, SdkResult& sdkResult, Boolean throwOnFileNotExistsError) w Microsoft.Build.Evaluation.Evaluator4.ExpandAndLoadImports(String directoryOfImportingFile, ProjectImportElement importElement, SdkResult& sdkResult) w Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) w Microsoft.Build.Evaluation.Evaluator4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport) w Microsoft.Build.Evaluation.Evaluator4.Evaluate(ILoggingService loggingService, BuildEventContext buildEventContext) w Microsoft.Build.Evaluation.Evaluator4.Evaluate(IEvaluatorData4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary1 environmentProperties, ILoggingService loggingService, IItemFactory2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive) w Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) w Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) w Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext) w Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) w Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) w Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary2 globalProperties, String toolsVersion) w OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore(String filePath) w D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs:wiersz 129 w OmniSharp.MSBuild.ProjectLoader.BuildProject(String filePath) w D:\a\1\s\src\OmniSharp.MSBuild\ProjectLoader.cs:wiersz 72 w OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load(String filePath, ProjectIdInfo projectIdInfo, ProjectLoader loader) w D:\a\1\s\src\OmniSharp.MSBuild\ProjectFile\ProjectFileInfo.cs:wiersz 99 w OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject(String projectFilePath, Func1 loader) w D:\a\1\s\src\OmniSharp.MSBuild\ProjectManager.cs:wiersz 308

    Attempted to update project that is not loaded: d:\Damian\Hakier\Csharp\Szachy\SzachyMulti\SzachyMulti.csproj</details>

C# log

Post the output from Output-->C# here

Environment information

VSCode version: 1.44.0 C# Extension: 1.21.16

Dotnet Information Zestaw .NET Core SDK (odzwierciedlenie dowolnego pliku global.json): Version: 3.1.201 Commit: b1768b4ae7

�rodowisko uruchomieniowe: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64 Base Path: C:\Program Files\dotnet\sdk\3.1.201\

Host (useful for support): Version: 3.1.3 Commit: 4a9f85e9f8

.NET Core SDKs installed: 2.1.403 [C:\Program Files\dotnet\sdk] 3.1.101 [C:\Program Files\dotnet\sdk] 3.1.102 [C:\Program Files\dotnet\sdk] 3.1.201 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
cpptools ms-vscode 0.27.0
csharp ms-dotnettools 1.21.16
dotenv mikestead 1.0.1
ftp-simple humy2833 0.7.5
glitch glitch 0.1.6
jinja wholroyd 0.0.8
npm-intellisense christian-kohler 1.3.0
python ms-python 2020.3.71659
python-extension-pack donjayamanne 1.6.0
vscode-eslint dbaeumer 2.1.2
vscode-icons vscode-icons-team 10.1.1
vscode-language-babel mgmcdermott 0.0.27
vscode-npm-script eg2 0.3.11
vscode-nuget-package-manager jmrog 1.1.6
vscode-pull-request-github GitHub 0.15.0
vscodeintellicode VisualStudioExptTeam 1.2.6
I tried to change version to 1.15.2 as suggested in #2509 however it doesn't solve the problem.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
cartermpcommented, Apr 14, 2020

Thanks for the report. Based on the log, this looks like a duplicate of this issue: https://github.com/OmniSharp/omnisharp-vscode/issues/3541

1reaction
Nekuskuscommented, Apr 14, 2020

After installing dotnet-sdk-3.1 on Fedora today I found vscode could not locate “Microsoft.NET.Sdk”. After trying numerous workarounds I created a ~/.omnisharp/omnisharp.json file as per omnisharp-roslyn#1313:

{
    "MsBuild": {
        "UseLegacySdkResolver": true
    }
}

and now it’s working fine

Sadly it doesn’t solve my issue (i’m on windows btw)

Read more comments on GitHub >

github_iconTop Results From Across the Web

OmniSharp.MSBuild.ProjectManager Attempted to update ...
I think the reason was to not showing Intellisense/Suggestions the project is not properly loaded. Can anyone tell me how to avoid this...
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 >
[fail]: OmniSharp.MSBuild.ProjectManager Attempted ... - GitHub
MSBuild.ProjectManager Attempted to update project that is not loaded: d:\unity projects\project #1\Assembly-CSharp.csproj [info]: OmniSharp.
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 >
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded 'c:\Source\CodeCommit\Directory\src\Api.csproj'. Solution. In VS Code. Windows:.
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