I’ve deleted and redownloaded visual studio and Unity several times but the problem still persists. Visual Studio doesn’t recognize
Therefore nothing works
I currently have Unity version 2019.1.4f1. This problem started after Visual Studio update
for those who cannot solve this problem using above solutions, try this.
- Go to Edit → Preferences → External Tools
- In the Generate .csproj files for: tab, make sure “Local packages” is checked
- Click “Regenerate project files” button
This worked for me (unity version 2019.4)
Reinstalling the Visual Studio Editor package through Unity by “upgrading” to a previous version then upgrading again to the current version of the Visual Studio Editor package worked for me. This whole thing has happened to me on multiple computers.
Which version of Visual Studio do you have installed? Did you install the Visual Studio Tools for Unity for that version? If not, either update your installation or go to Tools > Extensions & Updates in Visual Studio, search for and install the Visual Studio Tools for Unity.
I just had the same issue. Just check for new updates from within Visual Studio – It should show a new Mono Framework (or similar). After installing this update, it should work fine again
If the issue persists after updating (or the editor is already updated beforehand) you can do the following as this worked for me after I updated my project with a new version.:
- Close visual studio
- In your project delete the following files (or copy them somewhere else for safekeeping): projectname.sln, Assembly-CSharp.csproj and .vsconfig
- Restart visual studio by opening a script via the Unity editor (and this should recreate the just deleted files).
And yes, this is a “have you tried restarting it?” solution but often those work.