After upgrading to Visual Studio Code Editor 1.1.4 package (com.unity.ide.vscode@1.1.4), I’m receiving this error in my OmniSharp output:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1875,5): Error: The referenced project ‘Unity.InputSystem.csproj’ does not exist.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1875,5): Error: The referenced project ‘Unity.Addressables.csproj’ does not exist.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1875,5): Error: The referenced project ‘Unity.TextMeshPro.csproj’ does not exist.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1875,5): Error: The referenced project ‘Unity.ResourceManager.csproj’ does not exist.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1875,5): Error: The referenced project ‘Unity.Timeline.csproj’ does not exist.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1875,5): Error: The referenced project ‘UnityEditor.UI.csproj’ does not exist.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1875,5): Error: The referenced project ‘UnityEngine.UI.csproj’ does not exist.
The problem is: the Visual Studio Code Editor package v1.1.4 adds the following to the project’s .csproj file for each installed package (the below example is the Mathematics package):
I have not been able to find the named project anywhere. The error is correct - these projects do not exist. For me, downgrading to v1.1.3 of the package fixed the problems as the above sections were removed from the .csproj file.
I just had to revert back to v1.1.3 as well. It looks like v1.1.4 is trying to include a bunch of csproj’s that do not exist and causing thousands of errors.
The package manager says that v1.1.4 is a verified package too. Argh.
Bug filed: Case #1211057
Update: 24 Jan - QA @Domas_L repro’d the issue and it’s been sent to the fixing place
Another bump from me… just updated only to find out that the 1.1.4 version of VS Code Editor package is utterly broken and Google led me here. 2019.3.0f5 on Mac. 1.1.3 works.
Thanks, however, I did try that (and some other vscode package versions)… not sure why this didn’t work for me if it has for others. I had to downgrade my entire Unity version.
A slightly different but related problem is I’ve had to resort to debug log debugging for the last month or so because the debugger seems broken.
Can any of you guys use the vscode Unity debugger on Mac to set breakpoints at the moment? My debugger reports attaching ok but then the debug controls in vscode disappear and it seems to just crash/disconnect (doesn’t report disconnecting though)
To be honest, this has been my last decade with debugging Unity on a Mac. It has been terrible, never connecting, beachballing, connecting and immediately disconnecting, etc. MonoDevelop used to beachball everytime I tried to connect back in olden days Unity.
There was a tiny window a few years ago when Unity was releasing an updated debugger within the Xamarin ecosystem when debugging worked, then they stopped support when updating and then dropping MonoDevelop. VSCode debugging support has been mostly rubbish since we started using it. After it finally started connecting more reliably other problems made it useless, like not being able to set breakpoints that actually worked, or stepping in and out being completely broken.
The latest version of VSCode and the 1.1.3 package do connect and debug in the Editor better for me than earlier versions but it’s hard to break the habit of trusty old Debug.Log after all these years eg. we can’t connect VSCode debugging to iOS devices - connect and immediate disconnect. It’s never worked.
I’ve come to appreciate the uses of debug logs that’s for sure! It’s also nice to have a debugger in the toolbox too.
Anyway I fixed it!
I got a more in-depth vscode extension error log to display by following advice here.
Searching on the error I got when the debugger crashed showed up this old thread from December.
I downloaded the preview unity debugger 3.0.1.vsix file recommended in that thread from here and then followed instructions here about how to install .vsix files with vscode.