Reputation: 1088
I installed Unity 2020.3.1f1 and upgraded one of my Unity projects to this version from 2019.2.12f1. In the Unity Editor the upgraded project built and ran and everything seemed fine.
However, when the project was opened Visual Studio 2019 hundreds of errors were flagged - the majority being CS0518 errors with messages like "Predefined type 'System.String' is not defined or imported".
Editing the Project code in Visual Studio is now impossible!
How do fix this problem?
Upvotes: 0
Views: 358
Reputation: 1088
I was able to correct this problem as follows:
Close Visual Studio
In Unity Editor 2020.3.1f1 : Edit->Preferences->External Tools
Button under Generate .csproj files Regenerate Project Files
After running Regenerate Project Files I opened Visual Studio 2019 again and the floods of CS0518 errors were gone. The VS projects behaved normally.
Upvotes: 2