Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OmniSharp failing to update project that is not loaded #4891

Closed
oblaydes opened this issue Nov 12, 2021 · 1 comment
Closed

OmniSharp failing to update project that is not loaded #4891

oblaydes opened this issue Nov 12, 2021 · 1 comment

Comments

@oblaydes
Copy link

Issue Description

When starting up vscode it gives a warning that "Some projects have trouble loading. Please review the output for more details." (details in OmniSharp log)

Steps to Reproduce

I really dont know. Everyone here has a solution to how to do this but I'm a noob when it comes to coding and GitHub. I'm just following the steps of an online beginners class and the C# extension is causing a problem that I don't know how to fix

Expected Behavior

vscode to load and update projects correctly

Actual Behavior

Its giving me a fail that it has "Attemped to update project that is not loaded"

Logs

OmniSharp log

Starting OmniSharp server at 11/12/2021, 3:20:53 PM
Target: d:\Project Storage\Water Car\Water Car.sln

OmniSharp server started.
Path: c:\Users\oblay.vscode\extensions\ms-dotnettools.csharp-1.23.16.omnisharp\1.37.16\OmniSharp.exe
PID: 16264

Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
info: OmniSharp.Services.DotNetCliService
Using the 'dotnet' on the PATH.
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 17.0.0 - "c:\Users\oblay.vscode\extensions\ms-dotnettools.csharp-1.23.16.omnisharp\1.37.16.msbuild\Current\Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'c:\Users\oblay.vscode\extensions\ms-dotnettools.csharp-1.23.16.omnisharp\1.37.16.msbuild\Current\Bin\MSBuild.exe'
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 17.0.0 - "c:\Users\oblay.vscode\extensions\ms-dotnettools.csharp-1.23.16.omnisharp\1.37.16.msbuild\Current\Bin"
CscToolExe = csc.exe
CscToolPath = c:\Users\oblay.vscode\extensions\ms-dotnettools.csharp-1.23.16.omnisharp\1.37.16.msbuild\Current\Bin\Roslyn
MSBuildExtensionsPath = c:\Users\oblay.vscode\extensions\ms-dotnettools.csharp-1.23.16.omnisharp\1.37.16.msbuild
MSBuildToolsPath = c:\Users\oblay.vscode\extensions\ms-dotnettools.csharp-1.23.16.omnisharp\1.37.16.msbuild\Current\Bin
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'd:\Project Storage\Water Car'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'd:\Project Storage\Water Car\Water Car.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\Project Storage\Water Car\Assembly-CSharp.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'd:\Project Storage\Water Car'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'd:\Project Storage\Water Car' on host 15736.
info: OmniSharp.MSBuild.ProjectManager
Loading project: d:\Project Storage\Water Car\Assembly-CSharp.csproj
fail: OmniSharp.MSBuild.ProjectLoader
The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file 'd:\Project Storage\Water Car\Assembly-CSharp.csproj'.
d:\Project Storage\Water Car\Assembly-CSharp.csproj
c:\Users\oblay.vscode\extensions\ms-dotnettools.csharp-1.23.16.omnisharp\1.37.16.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1217,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

Attempted to update project that is not loaded: d:\Project Storage\Water Car\Assembly-CSharp.csproj

C# log

N/A (happens on startup)

Environment information

VSCode version: 1.62.2
C# Extension: 1.23.16

Dotnet Information .NET SDK (reflecting any global.json): Version: 5.0.403 Commit: bf9d168ac2

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19042
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.403\

Host (useful for support):
Version: 5.0.12
Commit: 7211aa01b3

.NET SDKs installed:
5.0.403 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

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

Visual Studio Code Extensions
Extension Author Version
csharp ms-dotnettools 1.23.16
unity-code-snippets kleber-swf 1.3.0
@JoeRobich
Copy link
Member

@oblaydes From the OmniSharp log I can see you are missing the .NET 4.7.1 developer pack installed which is what Unity uses for their projects. You can download the pack from https://dotnet.microsoft.com/download/dotnet-framework/thank-you/net471-developer-pack-offline-installer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants