Fail: OmniSharp.MSBuild.ProjectManager, Attemped to update project that is not loaded
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 2.1.300
Commit: adab45bf0c
Runtime Environment: OS Name: Windows OS Version: 10.0.17134 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.300\
Host (useful for support): Version: 2.1.0 Commit: caa7b7e2ba
.NET Core SDKs installed: 1.0.0 [C:\Program Files\dotnet\sdk] 2.1.300 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
VS Code version: 1.27.1 C# Extension version:
Steps to reproduce
OmniSharp is updated itself
Expected behavior
Project to be working
Actual behavior
OmniSharp Log:
OmniSharp server started.
Path: C:\Users\Burak\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\OmniSharp.exe
PID: 8796
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on Windows 6.2.9200.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 15.0 - "C:\Users\Burak\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild\15.0\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'C:\Users\Burak\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild\15.0\Bin\MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 15.0 - "C:\Users\Burak\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild\15.0\Bin"
CscToolExe = csc.exe
CscToolPath = C:\Users\Burak\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild\15.0\Bin\Roslyn
MSBuildExtensionsPath = C:\Users\Burak\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild
MSBuildToolsPath = C:\Users\Burak\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild\15.0\Bin
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'c:\SwayPay-Marketing\ota-app-hotelbeds-content'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.Stdio.Host
Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'c:\SwayPay-Marketing\ota-app-hotelbeds-content\HotelContentFetcher.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\SwayPay-Marketing\ota-app-hotelbeds-content\Fetcher\HotelContentFetcher.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\SwayPay-Marketing\ota-app-hotelbeds-content\FetcherTests\FetcherTests.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'c:\SwayPay-Marketing\ota-app-hotelbeds-content'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.Stdio.Host
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.Stdio.Host
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'c:\SwayPay-Marketing\ota-app-hotelbeds-content' on host 16256.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: c:\SwayPay-Marketing\ota-app-hotelbeds-content\Fetcher\HotelContentFetcher.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\SwayPay-Marketing\ota-app-hotelbeds-content\Fetcher\HotelContentFetcher.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\SwayPay-Marketing\ota-app-hotelbeds-content\Fetcher\HotelContentFetcher.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: c:\SwayPay-Marketing\ota-app-hotelbeds-content\FetcherTests\FetcherTests.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Users\Burak\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild\15.0\Bin" directory.
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file 'c:\SwayPay-Marketing\ota-app-hotelbeds-content\FetcherTests\FetcherTests.csproj'.
c:\SwayPay-Marketing\ota-app-hotelbeds-content\FetcherTests\FetcherTests.csproj
C:\Users\Burak\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1657,5): Error: The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Users\Burak\.vscode\extensions\ms-vscode.csharp-1.16.0\.omnisharp\1.32.4\msbuild\15.0\Bin" directory.
[info]: OmniSharp.MSBuild.ProjectManager
Update project: HotelContentFetcher
[fail]: OmniSharp.MSBuild.ProjectManager
Attemped to update project that is not loaded: c:\SwayPay-Marketing\ota-app-hotelbeds-content\FetcherTests\FetcherTests.csproj
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:56 (6 by maintainers)
Top GitHub Comments
@ErikSharp I found some workarounds that resolved the issue for me, more specifically:
MSBuild
directory thereUnfortunately, the issue doesn’t seem to be considered serious here as none of the maintainers has commented on this.
@akshita31 Will the root cause be fixed? After all, a workaround should not be considered as the solution. I do need the Build Tools for building other things like C++.