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?
Answer by DrDraxi · May 06, 2020 at 10:40 AM
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>");
}
}
Yep, fixed it for me too! No need for the added script, though interesting to know that trick. Thanks
@AxonGenesis @DrDraxi Agreed .13f1 has fixed it :o) - was driving me made having just transferred everything over from $$anonymous$$ac and couldn't work out why I was getting build errors and upgrading to .12f1
Answer by EmpirisoftNathan · May 06, 2020 at 04:05 AM
Tried a few things, thought I had it.
The only solution was to revert to .11f1
Answer by snowinrain · Jan 20, 2021 at 03:46 AM
In Package Manager, find "Visual Studio Code Editor" and upgrade to version 1.2.3 to fix the issue
Answer by for3st · Dec 14, 2021 at 06:33 PM
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.
Your answer
![](https://koobas.hobune.stream/wayback/20220612233358im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Visual Studio Auto complete is working strange and suggestions doesn't seem to work 1 Answer
Unity 2018.2.3f1 Failing to Work with Visual Studio 2017 or Code -1 Answers
Unity/Visual Studio not generating a .sln file 1 Answer
Visual Studio integration with Unity broken 1 Answer
Miscellaneous File On All My Scripts 1 Answer