Failing to Load Unity Project File
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: linuxmint
OS Version: 18.1
OS Platform: Linux
RID: linuxmint.18.1-x64
Base Path: /usr/share/dotnet/sdk/2.0.2/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
VS Code version:
Version 1.17.2
Commit b813d12980308015bcd2b3a2f6efa5c810c33ba5
Date 2017-10-16T13:57:00.652Z
Shell 1.7.7
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
Mono Version
Mono JIT compiler version 5.4.0.201 (tarball Fri Oct 13 21:51:45 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen (concurrent by default)
C# Extension version:
1.13.0
Unity Version (download at http://beta.unity3d.com/download/ee86734cf592/unity-editor_amd64-2017.2.0f3.deb):
2017.2.0f3 Personal
Steps to reproduce
- Create a Unity 2D project
- Set
code
to beExternal Script Editor
- Go to
Edit
>Preferences
.- Go to
External Tools
tab and change theExternal Script Editor
using theBrowse...
option- Select
/usr/bin/code/
- Select
- Go to
- Go to
- Back in Unity, create a C# script asset
- Double click on script
Expected behavior
C# Intellisense to work.
Actual behavior
C# Intellisense doesn’t work. Here is my OmniSharp Log
output:
Starting OmniSharp server at 11/8/2017, 12:45:30 PM
Target: /home/dhicks/Dropbox/unity_class/Text101/Text101.sln
OmniSharp server started wth Mono
Path: /home/dhicks/.vscode/extensions/ms-vscode.csharp-1.13.0/.omnisharp/omnisharp/OmniSharp.exe
PID: 20320
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Mono 15.0 - "/usr/lib/mono/msbuild/15.0/bin"
2: StandAlone 15.0 - "/home/dhicks/.vscode/extensions/ms-vscode.csharp-1.13.0/.omnisharp/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Mono 15.0 - "/usr/lib/mono/msbuild/15.0/bin"
CscToolPath = /home/dhicks/.vscode/extensions/ms-vscode.csharp-1.13.0/.omnisharp/omnisharp/msbuild/15.0/Bin/Roslyn
CscToolExe = csc.exe
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/home/dhicks/Dropbox/unity_class/Text101'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.DotNet.DotNetProjectSystem
Initializing in /home/dhicks/Dropbox/unity_class/Text101
[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.MSBuildProjectSystem
Detecting projects in '/home/dhicks/Dropbox/unity_class/Text101/Text101.sln'.
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
Loading project: /home/dhicks/Dropbox/unity_class/Text101/Assembly-CSharp.csproj
[warn]: OmniSharp.MSBuild.MSBuildProjectSystem
Failed to load project file '/home/dhicks/Dropbox/unity_class/Text101/Assembly-CSharp.csproj'.
/home/dhicks/Dropbox/unity_class/Text101/Assembly-CSharp.csproj(1,1)
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at OmniSharp.MSBuild.MSBuildProjectSystem.LoadProject (System.String projectFilePath) [0x00038] in <b33b7bcd685c4ae4bb5069e4d26c1bf0>:0
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/home/dhicks/Dropbox/unity_class/Text101'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.Stdio.Program
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.Stdio.Program
Configuration finished.
[info]: OmniSharp.Stdio.Program
Omnisharp server running using Stdio at location '/home/dhicks/Dropbox/unity_class/Text101' on host 20231.
What I have tried.
- Updating to the latest version of Mono (http://www.mono-project.com/download/)
- Updateing to the latest version of dotnet (https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.2-sdk-download.md)
- Loading the
.csproj
file outside of Unity. - Using the
VSCode
asset in Unity - Disabling and Enabling the C# plugin in vscode.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Creating Project Folder Failed (Cannot load projects)
The things I would check first is if you have sufficient disk space for the project, and if you have proper permissions to...
Read more >I'm starting an Unity project however my coding environment ...
Failed to load project file 'c:\Forest\Assembly-CSharp.csproj'. I'll also mention that I changed the omnisharp.path to latest and have installed ...
Read more >Unity project file is not loading in visual studio 2019
Unsupported This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version...
Read more >Troubleshooting - Unity - Manual
Back up and then delete the package sources in your project's Packages folder, leaving only the manifest.json file. Then try to reload the...
Read more >How To Fix Unity Creating Project Folder Failed Error - YouTube
In This Video We Will See How To Fix Unity Creating Project Folder Failed ErrorHere Are The Steps To Fix Unity Creating Project...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hmmm… it seems that Microsoft.Build.dll simply doesn’t exist. That’s very strange if you installed both
mono-devel
andmono-complete
. However, that would also explain the problem. I would also assume that runningmsbuild
at the command-line would fail.I believe there’s a separate
msbuild
package for Debian environments that Mono provides. I would have expected it to be installed with the mono packages you installed, but maybe there’s an issue. Try installingmsbuild
via apt-get.It is super weird, I agree. No idea what happened. Okay, I ran
sudo apt install msbuild
.