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

[fail]: OmniSharp.MSBuild.ProjectManager Attempted to update project that is not loaded: d:\unity projects\project #1\Assembly-CSharp.csproj [info]: OmniSharp.OmniSharpWorkspace Miscellaneous file: d:\unity projects\project #1\Assets\test.cs added to workspace #3830

Closed
mehamednews opened this issue Jun 5, 2020 · 1 comment

Comments

@mehamednews
Copy link

mehamednews commented Jun 5, 2020

OmniSharp log

Starting OmniSharp server at 6/5/2020, 4:09:34 PM
Target: d:\unity projects\project #1\project #1.sln

OmniSharp server started.
Path: c:\Users\M.Kharrob.vscode\extensions\ms-dotnettools.csharp-1.22.0.omnisharp\1.35.2\OmniSharp.exe
PID: 7356

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 16.4 - "c:\Users\M.Kharrob.vscode\extensions\ms-dotnettools.csharp-1.22.0.omnisharp\1.35.2.msbuild\Current\Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'c:\Users\M.Kharrob.vscode\extensions\ms-dotnettools.csharp-1.22.0.omnisharp\1.35.2.msbuild\Current\Bin\MSBuild.exe'
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.4 - "c:\Users\M.Kharrob.vscode\extensions\ms-dotnettools.csharp-1.22.0.omnisharp\1.35.2.msbuild\Current\Bin"
CscToolExe = csc.exe
CscToolPath = c:\Users\M.Kharrob.vscode\extensions\ms-dotnettools.csharp-1.22.0.omnisharp\1.35.2.msbuild\Current\Bin\Roslyn
MSBuildExtensionsPath = c:\Users\M.Kharrob.vscode\extensions\ms-dotnettools.csharp-1.22.0.omnisharp\1.35.2.msbuild
MSBuildToolsPath = c:\Users\M.Kharrob.vscode\extensions\ms-dotnettools.csharp-1.22.0.omnisharp\1.35.2.msbuild\Current\Bin
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'd:\unity projects\project #1'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'd:\unity projects\project #1\project #1.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\unity projects\project #1\Assembly-CSharp.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'd:\unity projects\project #1'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.MSBuild.ProjectManager
Loading project: d:\unity projects\project #1\Assembly-CSharp.csproj
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.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'd:\unity projects\project #1' on host 10100.
[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:\unity projects\project #1\Assembly-CSharp.csproj'.
d:\unity projects\project #1\Assembly-CSharp.csproj
c:\Users\M.Kharrob.vscode\extensions\ms-dotnettools.csharp-1.22.0.omnisharp\1.35.2.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,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

[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: d:\unity projects\project #1\Assembly-CSharp.csproj
info: OmniSharp.OmniSharpWorkspace
Miscellaneous file: d:\unity projects\project #1\Assets\test.cs added to workspace

Steps to reproduce

1- Open a unity3D project & try to "Open c# project"

Notes:

I've already followed all the steps of using vscode with unity3D, But I couldn't get it to work, The autocomplete isn't working at all, So it's as if unity isn't connected to vsCode at all, I'm sure it's not a unity problem, And that's the only error I'm getting everytime I open a project

@cartermp
Copy link

cartermp commented Jun 9, 2020

This one is a little hard to see based on the error, but the problem is that you're missing the appropriate .NET Framework targeting pack for .NET Framework 4.7.1. If you follow the link here and install it, then things should work: https://dotnet.microsoft.com/download/archives?wt.mc_id=developerpacks

@cartermp cartermp closed this as completed Jun 9, 2020
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