SOLVED: Fixed the problem by reinstalling VS Code and the C# extension.
I’ve used Visual Studio Code for few days now to edit my scripts. VSCode was working, before VSCode updates. After the update, OmniSharp fails to validate the Unity project files and the editor refuses to initialize IntelliSense. Is this a bug or my own end? Reinstalled the C# extension but no luck.
Starting OmniSharp server at 12/15/2016, 12:12:05 PM
Target: c:\Users\Tetriser\Documents\Unity\MagneticKart\MagneticKart.sln
OmniSharp server started
Path: C:\Users\Tetriser.vscode\extensions\ms-vscode.csharp-1.5.3\bin\omnisharp\OmniSharp.exe
PID: 2156
OmniSharp: -s c:\Users\Tetriser\Documents\Unity\MagneticKart\MagneticKart.sln --hostPID 5560 --stdio DotNet:enablePackageRestore=false --encoding utf-8
[INFORMATION:OmniSharp.Startup] Omnisharp server running using Stdio at location ‘c:\Users\Tetriser\Documents\Unity\MagneticKart’ on host 5560.
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Initializing in c:\Users\Tetriser\Documents\Unity\MagneticKart
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Auto package restore: False
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update workspace context
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Resolving projects references
[INFORMATION:OmniSharp#MSBuild] Detecting projects in ‘c:\Users\Tetriser\Documents\Unity\MagneticKart\MagneticKart.sln’.
[INFORMATION:OmniSharp#MSBuild] Loading project from ‘c:\Users\Tetriser\Documents\Unity\MagneticKart\Assembly-CSharp-firstpass.csproj’.
[INFORMATION:OmniSharp#ProjectFileInfo] Using tools version: 15.0
[ERROR:OmniSharp#ProjectFileInfo] The OutputPath property is not set for project ‘Assembly-CSharp-firstpass.csproj’. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration=‘Debug’ Platform=‘MCD’. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn’t exist for this project.
[WARNING:OmniSharp#MSBuild] Failed to process project file ‘c:\Users\Tetriser\Documents\Unity\MagneticKart\Assembly-CSharp-firstpass.csproj’.
c:\Users\Tetriser\Documents\Unity\MagneticKart\Assembly-CSharp-firstpass.csproj
[INFORMATION:OmniSharp#MSBuild] Loading project from ‘c:\Users\Tetriser\Documents\Unity\MagneticKart\Assembly-CSharp.csproj’.
[INFORMATION:OmniSharp#ProjectFileInfo] Using tools version: 15.0
[ERROR:OmniSharp#ProjectFileInfo] The OutputPath property is not set for project ‘Assembly-CSharp.csproj’. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration=‘Debug’ Platform=‘MCD’. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn’t exist for this project.
[WARNING:OmniSharp#MSBuild] Failed to process project file ‘c:\Users\Tetriser\Documents\Unity\MagneticKart\Assembly-CSharp.csproj’.
c:\Users\Tetriser\Documents\Unity\MagneticKart\Assembly-CSharp.csproj
[INFORMATION:OmniSharp#MSBuild] Loading project from ‘c:\Users\Tetriser\Documents\Unity\MagneticKart\Assembly-CSharp-Editor-firstpass.csproj’.
[INFORMATION:OmniSharp#ProjectFileInfo] Using tools version: 15.0
[ERROR:OmniSharp#ProjectFileInfo] The OutputPath property is not set for project ‘Assembly-CSharp-Editor-firstpass.csproj’. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration=‘Debug’ Platform=‘MCD’. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn’t exist for this project.
[WARNING:OmniSharp#MSBuild] Failed to process project file ‘c:\Users\Tetriser\Documents\Unity\MagneticKart\Assembly-CSharp-Editor-firstpass.csproj’.
c:\Users\Tetriser\Documents\Unity\MagneticKart\Assembly-CSharp-Editor-firstpass.csproj
[INFORMATION:OmniSharp.Startup] Configuration finished.
EdKirby
December 25, 2016, 3:36am
2
I had to install Mono and it worked for me. Redirecting…
I also installed the other Unity related extensions but it was the Mono install that fixed that issue for me.
Hope this helps.
2 Likes
@EdKirby - Not working either. Maybe I need to install the 64-bit version of Mono for my 64-bit laptop?
EdKirby
January 11, 2017, 12:08am
4
Hey @tetriser0161 - Sorry for the very late reply. Hmmm…not sure. My Mac is 64 bit and all I did was download and install Mono from the link I posted above. If there is a 64 bit version perhaps trying that would help.
EdKirby
January 11, 2017, 12:15am
5
Oh, I should mention that since the time that I got VSC working I’ve completely jumped ship and moved to Windows. I’m running Parallels on my MacBook and went with VS Community 2015 and it works very well. I can do proper debugging now. The only issue I’ve found is when creating a new class, VS Comm 2015 doesn’t (always?) make the connection that it’s in the project so I don’t have all the Unity namespaces and such until I restart VS.
If you decide to go this route let me know. There are a couple of workflow gotchas you should be aware of.
Try Download Visual Studio Code Insiders for me it fixed these issues regarding VSCode and Unity 5.x integration on macOS:
No code errors or warnings being indicated.
No reference counting, peeking, etc.
Thx, @EdKirby and @mcpunkylt .
But I develop games on Windows, not macOS. Also, my internet connection just reaches its limit, so I can’t download Mono.
However, I got the latest update for Code after I reinstalling it.
I got just one question, how can I make Unity find VSCode again after I uninstall it, without reinstalling Unity?
EdKirby
January 21, 2017, 10:54pm
8
@tetriser0161 I haven’t tried this but if you go Edit>Preferences then External tools you may be able to either find it in the drop down if Unity discovers it or browse to it manually.
1 Like
@EdKirby - Thanks, just browsed and located the Code.exe from Unity.
Good news, now OmniSharp runs and successfully validates the Unity project files as it should.
Starting OmniSharp server at 1/22/2017, 7:48:04 AM
Target: c:\Users\Tetriser\Documents\Unity\AndroidPlayground\AndroidPlayground.sln
OmniSharp server started
Path: C:\Users\Tetriser.vscode\extensions\ms-vscode.csharp-1.6.2\bin\omnisharp\OmniSharp.exe
PID: 1240
OmniSharp: -s c:\Users\Tetriser\Documents\Unity\AndroidPlayground\AndroidPlayground.sln --hostPID 11008 --stdio DotNet:enablePackageRestore=false --encoding utf-8 formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
Starting OmniSharp server at 1/22/2017, 7:48:15 AM
Target: c:\Users\Tetriser\Documents\Unity\AndroidPlayground\AndroidPlayground.sln
OmniSharp server started
Path: C:\Users\Tetriser.vscode\extensions\ms-vscode.csharp-1.6.2\bin\omnisharp\OmniSharp.exe
PID: 6212
OmniSharp: -s c:\Users\Tetriser\Documents\Unity\AndroidPlayground\AndroidPlayground.sln --hostPID 11008 --stdio DotNet:enablePackageRestore=false --encoding utf-8 formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
[INFORMATION:OmniSharp.Startup] Omnisharp server running using Stdio at location ‘c:\Users\Tetriser\Documents\Unity\AndroidPlayground’ on host 11008.
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Initializing in c:\Users\Tetriser\Documents\Unity\AndroidPlayground
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Auto package restore: False
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Update workspace context
[INFORMATION:OmniSharp.DotNet.DotNetProjectSystem] Resolving projects references
[INFORMATION:OmniSharp#MSBuild] MSBUILD_EXE_PATH environment variable set to C:\Users\Tetriser.vscode\extensions\ms-vscode.csharp-1.6.2\bin\omnisharp\msbuild\MSBuild.exe
[INFORMATION:OmniSharp#MSBuild] MSBuildExtensionsPath environment variable set to C:\Users\Tetriser.vscode\extensions\ms-vscode.csharp-1.6.2\bin\omnisharp\msbuild
[INFORMATION:OmniSharp#MSBuild] MSBuildSDKsPath environment variable set to C:\Users\Tetriser.vscode\extensions\ms-vscode.csharp-1.6.2\bin\omnisharp\msbuild\Sdks
[INFORMATION:OmniSharp#MSBuild] Detecting projects in ‘c:\Users\Tetriser\Documents\Unity\AndroidPlayground\AndroidPlayground.sln’.
[INFORMATION:OmniSharp#MSBuild] Loading project from ‘c:\Users\Tetriser\Documents\Unity\AndroidPlayground\Assembly-CSharp.csproj’.
[INFORMATION:OmniSharp#MSBuild] Add project: c:\Users\Tetriser\Documents\Unity\AndroidPlayground\Assembly-CSharp.csproj
[INFORMATION:OmniSharp#MSBuild] Update project: Assembly-CSharp
[INFORMATION:OmniSharp.Script.ScriptProjectSystem] Detecting CSX files in ‘c:\Users\Tetriser\Documents\Unity\AndroidPlayground’.
[INFORMATION:OmniSharp.Script.ScriptProjectSystem] Could not find any CSX files
[INFORMATION:OmniSharp.Startup] Configuration finished.
Code now got the Unity namespaces, but I dunno if this will persist… Thanks,
EdKirby
January 22, 2017, 1:05am
11
Kewl.
Just out of curiosity, since you are on Windows anyway, why don’t you use Virtual Studio 2015 Community Edition? It has almost all the same features as VS Pro, is free and (at least for me) it works better than Code.
@EdKirby - Well, I do use VS 2015 Community as well, but my laptop isn’t that “beefy” enough to make VS 2015 run faster. That’s why I prefer Code.
Installing mono also worked for on Linux Ubuntu 16.04 Unity Editor!
I have issue in Mac + Unity 5.5 with IntelliSense, codelenses - installing insider version fixed my issue.
2 Likes
Thanks @EdKirby , installing Mono Framework worked immediately on macOS Mojave!
1 Like
Yeah this is what helped me out. I just hit the Reset Argument (3rd from the top)
and I also hit the Regenerate Project Files. I don’t get the notification any more.
I also had this issue on my Mac & it was fixed after setting omnisharp settings to always use mono from a specific path:
{
"omnisharp.useGlobalMono": "always",
"omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current/Commands/"
}
I am not sure if there is a “.sln” specific solution for this, but at least it works & I use dotnet on my mac mainly for Unity projects anyway.
2 Likes
ShadowUser19:
I also had this issue on my Mac & it was fixed after setting omnisharp settings to always use mono from a specific path:
{
"omnisharp.useGlobalMono": "always",
"omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current/Commands/"
}
I am not sure if there is a “.sln” specific solution for this, but at least it works & I use dotnet on my mac mainly for Unity projects anyway.
This is the only thing that worked for me, thank you!
ShadowUser19:
I also had this issue on my Mac & it was fixed after setting omnisharp settings to always use mono from a specific path:
{
"omnisharp.useGlobalMono": "always",
"omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current/Commands/"
}
I am not sure if there is a “.sln” specific solution for this, but at least it works & I use dotnet on my mac mainly for Unity projects anyway.
Hi, I am still getting the same error when two projects open. Any thoughts? Thanks!
1 Like