Trying to use assembly definition files here and got to this case that I can’t seem to find my way around it.
If I have a parent class that belongs to a specific assembly but still remains public and then I create a child of that class outside of that assembly unity doesn’t complain and works as expected (?) but visual studio can no longer reference that parent class and shows an error. This a direct byproduct of using the asmdef file.
Also, I do know I can create a an asmdef reference file that will make the child class belong to the same assembly and VS works correctly in that case, however this is not what I’m looking for. And in theory and in practice I’m able to have the child class outside of the main assembly in unity. But visual studio still throws an error.
How can I solve this?
Unity 2019.3.12f, Visual Studio 2019 with all latest updates and with unity tools addon
I have the same problem. Happens with 2019.3, 2020.1 and 2020.2.
Doesn’t really matter which setup I use. Some, but for an unknown reason not all, definitions aren’t recognized in VS.
I already tried deleting all .csproj, .sln, as well as the Library, .vs and obj folders.
I ran into this again today with Unity’s assemblies in version 2020.3.34.f1 in Visual Studio Community 2022.
I have resolved the issue in VS by right clicking the solution in the solution explorer and clicking Load All Solutions.
I have generated csproj. files for Embedded-, Local- and Registry packages, if that has anything to do with it.