After upgrading to 2020.2.0f1 and 2020.2.1f1 references to the assemblies in our project doesn’t work when compiled in VS2019. For instance, we’re using NavMeshComponents and the NavMeshComponents assembly compiles fine but the NavMeshComponentsEditor assembly, which references NavMeshComponents doesn’t due to the classes in the NavMeshComponents assembly not being visible to the classes in the NavMeshComponentsEditor assembly. The NavMeshComponentsEditor assembly does contain a reference to the NavMeshComponents assembly and when I look at the NavMeshComponents assembly in ObjectBrowser the namespace and corresponding classes shows up as expected. 2019.4.18f1 doesn’t exhibit this problem. Is there a fix to this issue?
Thanks for your reply. I should have mentioned that I’ve upgraded to NavMeshComponents-2020.2 and to the latest version of all the packages I’m using. Also, the problem is that the compiler isn’t able to see/locate the namespace and classes in the referenced assemblies. Hence, I get compile errors, so this issue isn’t really about the VS editor/intellisense not being able to see/locate the referenced assemblies (even though they don’t either), but about something more severe as the compiler isn’t able to see the referenced assemblies.
By regenerate my project files, do you mean to reimport my assets (Assets/Reimport or Assets/Reimport All)? I’ve tried that several times as well as manually deleting the generated cs project-files and letting Unity re-generate them to no avail. I’ve tried this with both 2020.2.0f1 and 2020.2.1f1 btw.
Thanks for the info. I found the setting. Unfortunately, it didn’t help. It seems I have no other choice than reverting to 2019.4 and hope this issue will be fixed in an upcoming release.
Sorry, sounds frustrating. That’s super odd. Are you sure they didn’t change namespaces on something? (they’ve been known to do that from time to time). I’m out of ideas. Hope you are able to fix it.
Assembly References in my project could not be resolved in VisualStudio (Unity 2020.3.8, VS Studio for Mac 17.3.7).
btw - I had no compile errors in Unity.
that solution worked for me:
I have closed Visual Studio and then manually deleted all *.csproj and *.sln files in my project root directory. after launching VS again, all csproj and sln files where created again - and it worked. all references could be resolved in VS again
Thanks for the solution! In my case, after I deleted the *.csproj and *.sln files, Visual Studio showed “This project needs to be migrated” in the solution explorer. When I restored the deleted files to replace the newly created ones (this time without first closing VS), then said yes to VS’s reload prompt, everything somehow worked.