Unable to resolve assemblies in existing Unity project
See original GitHub issueEnvironment data
dotnet --info
output:
.NET Command Line Tools (2.0.2)
Product Information:
Version: 2.0.2
Commit SHA-1 hash: a04b4bf512
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.0.2/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
VS Code version: 1.19.1
C# Extension version: 1.13.1
Steps to reproduce
Open pre-existing Unity project in VS Code.
Expected behavior
IDE features to work.
Actual behavior
Missing assembly warnings and no IDE features.
The project worked fine a few months ago; I switched to Visual Studio for Mac for a bit but trying to switch back I’ve been hit with this and after all of my attempts to figure out what is going on I have been unsuccessful. I created a brand new project and while I still am getting the same unable to resolve assembly
warning intellisense seems to work; it’s just pre-existing projects that seem to be the issue.
Full disclosure in case it is part of the issue; I’m using a compiled omnisharp-roslyn because for some reason the one shipped with the C# extension errors out on my machine.
Omnisharp log:
Starting OmniSharp server at 1/8/2018, 11:28:10 AM
Target: /Users/mattbengston/Development/Games/spooky-jumps/spooky-jumps.sln
OmniSharp server started wth Mono
Path: /Users/mattbengston/Development/Utils/omnisharp-roslyn/artifacts/scripts/OmniSharp.Stdio
PID: 84470
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on MacOS 10.12.6 (x64)
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin"
2: StandAlone 15.0 - "/Users/mattbengston/Development/Utils/omnisharp-roslyn/artifacts/publish/OmniSharp.Stdio/mono/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Mono 15.0 - "/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin"
CscToolPath = /Users/mattbengston/Development/Utils/omnisharp-roslyn/artifacts/publish/OmniSharp.Stdio/mono/msbuild/15.0/Bin/Roslyn
CscToolExe = csc.exe
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/mattbengston/Development/Games/spooky-jumps'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.DotNet.DotNetProjectSystem
Initializing in /Users/mattbengston/Development/Games/spooky-jumps
[info]: OmniSharp.DotNet.DotNetProjectSystem
Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
Resolving projects references
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/Users/mattbengston/Development/Games/spooky-jumps/spooky-jumps.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mattbengston/Development/Games/spooky-jumps/JumperCore.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mattbengston/Development/Games/spooky-jumps/JumperLevelGeneration.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mattbengston/Development/Games/spooky-jumps/spooky-jumps.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mattbengston/Development/Games/spooky-jumps/JumperLevelEditor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mattbengston/Development/Games/spooky-jumps/spooky-jumps.Editor.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/mattbengston/Development/Games/spooky-jumps'.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mattbengston/Development/Games/spooky-jumps/JumperCore.csproj
[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 '/Users/mattbengston/Development/Games/spooky-jumps' on host 84449.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mattbengston/Development/Games/spooky-jumps/JumperCore.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mattbengston/Development/Games/spooky-jumps/JumperLevelGeneration.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mattbengston/Development/Games/spooky-jumps/JumperLevelGeneration.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mattbengston/Development/Games/spooky-jumps/spooky-jumps.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mattbengston/Development/Games/spooky-jumps/spooky-jumps.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mattbengston/Development/Games/spooky-jumps/JumperLevelEditor.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mattbengston/Development/Games/spooky-jumps/JumperLevelEditor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mattbengston/Development/Games/spooky-jumps/spooky-jumps.Editor.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mattbengston/Development/Games/spooky-jumps/spooky-jumps.Editor.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Update project: JumperCore
[info]: OmniSharp.MSBuild.ProjectManager
Update project: JumperLevelGeneration
[warn]: OmniSharp.MSBuild.ProjectManager
Unable to resolve assembly '/Users/mattbengston/Development/Games/spooky-jumps/Temp/UnityVS_bin/Debug/JumperCore.dll'
[info]: OmniSharp.MSBuild.ProjectManager
Update project: spooky-jumps
[warn]: OmniSharp.MSBuild.ProjectManager
Unable to resolve assembly '/Users/mattbengston/Development/Games/spooky-jumps/Temp/UnityVS_bin/Debug/JumperCore.dll'
[warn]: OmniSharp.MSBuild.ProjectManager
Unable to resolve assembly '/Users/mattbengston/Development/Games/spooky-jumps/Temp/UnityVS_bin/Debug/JumperLevelEditor.dll'
[warn]: OmniSharp.MSBuild.ProjectManager
Unable to resolve assembly '/Users/mattbengston/Development/Games/spooky-jumps/Temp/UnityVS_bin/Debug/JumperLevelGeneration.dll'
[info]: OmniSharp.MSBuild.ProjectManager
Update project: JumperLevelEditor
[warn]: OmniSharp.MSBuild.ProjectManager
Unable to resolve assembly '/Users/mattbengston/Development/Games/spooky-jumps/Temp/UnityVS_bin/Debug/JumperCore.dll'
[warn]: OmniSharp.MSBuild.ProjectManager
Unable to resolve assembly '/Users/mattbengston/Development/Games/spooky-jumps/Temp/UnityVS_bin/Debug/JumperLevelGeneration.dll'
[info]: OmniSharp.MSBuild.ProjectManager
Update project: spooky-jumps.Editor
[warn]: OmniSharp.MSBuild.ProjectManager
Unable to resolve assembly '/Users/mattbengston/Development/Games/spooky-jumps/Temp/UnityVS_bin/Debug/Assembly-CSharp.dll'
[warn]: OmniSharp.MSBuild.ProjectManager
Unable to resolve assembly '/Users/mattbengston/Development/Games/spooky-jumps/Temp/UnityVS_bin/Debug/JumperCore.dll'
[warn]: OmniSharp.MSBuild.ProjectManager
Unable to resolve assembly '/Users/mattbengston/Development/Games/spooky-jumps/Temp/UnityVS_bin/Debug/JumperLevelEditor.dll'
[warn]: OmniSharp.MSBuild.ProjectManager
Unable to resolve assembly '/Users/mattbengston/Development/Games/spooky-jumps/Temp/UnityVS_bin/Debug/JumperLevelGeneration.dll'
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:18 (1 by maintainers)
Top GitHub Comments
@rchande seems like it’s not related to the project but rather my machine/vscode/something super strange 😅
I’m on OSX and despite a couple fresh re-installs of the plugin and VSCode the default path the plugin was using was:
This threw a ton of errors, namely:
After comparing the output of a friends editor we noticed that his path was
.omnisharp/run
, so I updated my settings to:And viola, everything works in every project with no issues.
No idea why it was using
OmniSharp.exe
vsrun
, but everything is working perfectly now; so this can probably be closed 😃Ok, got it… VS code C# extension
1.15.2