Is Visual Studio 2019 Intellisense broken with Unity 2019.3.12f1?

Intellisense is not working properly and I haven’t figured out how to fix it. The issue is that definitions are not being recognized across assemblies. For example, editor scripts show errors on class names defined in Assembly-CSharp.

As a test, I created a new default URP project with Unity 2019.3.12. When I open the solution and navigate to an editor script there are a bunch of errors where there shouldn’t be any.

I’m using Microsoft Visual Studio Community 2019 Version 16.5.4

  • Visual Studio is updated to the latest
  • Visual Studio is selected as the editor in the Unity preferences window
  • Tried removing and reinstalling Unity support in VS (no difference)
  • Tested on 2 computers with same results

As another test, I created a new empty project in 2019.2.10 and Intellisense works correctly. After closing and reoping the Unity project, upgrading it to 2019.3.12f1, intellisense is broken again.

Is there something I’m missing?

Try this code. It’s a workaround.

using UnityEditor;
public class FIX : AssetPostprocessor
    private static string OnGeneratedCSProject(string path, string content)
        return content.Replace("<ReferenceOutputAssembly>false</ReferenceOutputAssembly>", "<ReferenceOutputAssembly>true</ReferenceOutputAssembly>");

Tried a few things, thought I had it.

The only solution was to revert to .11f1

Agreed .13f1 has fixed it :o) - was driving me made having just transferred everything over from Mac and couldn’t work out why I was getting build errors

In Package Manager, find “Visual Studio Code Editor” and upgrade to version 1.2.3 to fix the issue

Guys! Before proceeding to more complex fixes like trying to pick proper versions, regeneration of project files etc., make sure that BASIC things are set up properly:

In VS code settings json:

omnisharp.monoPath - make sure this points to really existing folder with mono develop /bin folder inside

omnisharp.useGlobalMono - just set to “always”

So in my local set up it looks like:

 "omnisharp.monoPath": "/Library/Frameworks/Mono.framework/Versions/Current", 
 "omnisharp.useGlobalMono": "always",   

That’s THE ONLY fix that works for me throughout the years.