# Visual Studio can't find assembly while Unity doesn't complain when using assembly definition

**URL:** https://discussions.unity.com/t/visual-studio-cant-find-assembly-while-unity-doesnt-complain-when-using-assembly-definition/790422
**Category:** Collaboration & Jobs
**Created:** [May 12, 2020, 2:08pm UTC](https://discussions.unity.com/t/visual-studio-cant-find-assembly-while-unity-doesnt-complain-when-using-assembly-definition/790422 "2020-05-12T14:08:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Amplify\_Paulo](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/amplify_paulo/32/332418_2.png) [@Amplify\_Paulo](https://discussions.unity.com/u/Amplify_Paulo)
#### Post date: [May 12, 2020, 2:08pm UTC](https://discussions.unity.com/t/visual-studio-cant-find-assembly-while-unity-doesnt-complain-when-using-assembly-definition/790422/1 "2020-05-12T14:08:57Z")

</div>

Hi all!

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

![5837407--619360--Unity_vgrs7srnYG.png](https://europe1.discourse-cdn.com/unity/original/3X/5/f/5fa41cb1a1b265abba9ee7e6874feabc63d9f479.png)

 ![5837407--619390--devenv_NQLmcNf6NH.png](https://europe1.discourse-cdn.com/unity/original/4X/f/7/2/f725518976546276799717bc36771a3689ac5e96.png)  
 ![5837407--619393--Unity_wXbWo6t6ZE.png](https://europe1.discourse-cdn.com/unity/original/4X/f/7/0/f704442278105a3ff6914c67e320123a3c2612fd.png)

---

<div class="post-metadata">

### Author: ![drallcom3](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@drallcom3](https://discussions.unity.com/u/drallcom3)
#### Post date: [May 12, 2020, 2:34pm UTC](https://discussions.unity.com/t/visual-studio-cant-find-assembly-while-unity-doesnt-complain-when-using-assembly-definition/790422/2 "2020-05-12T14:34:55Z")

</div>

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.

There’s already a thread [Assembly definitions broken with Visual Studio in 2019.3.12f1](https://discussions.unity.com/t/789083) and it does have some solutions.  
Terrible fix that actually works: [2019.3.12f1 Build Errors](https://discussions.unity.com/t/788478/11)

---

<div class="post-metadata">

### Author: ![Amplify\_Paulo](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/amplify_paulo/32/332418_2.png) [@Amplify\_Paulo](https://discussions.unity.com/u/Amplify_Paulo)
#### Post date: [May 12, 2020, 4:07pm UTC](https://discussions.unity.com/t/visual-studio-cant-find-assembly-while-unity-doesnt-complain-when-using-assembly-definition/790422/3 "2020-05-12T16:07:46Z")

</div>

> [@drallcom3](#):
>
> 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.
> 
> There’s already a thread [https://discussions.unity.com/t/789083](https://discussions.unity.com/t/789083) and it does have some solutions.  
> Terrible fix that actually works: [https://discussions.unity.com/t/788478/11](https://discussions.unity.com/t/788478/11)

oh uau, I didn’t found those threads in my search, thank you

---

<div class="post-metadata">

### Author: ![StickyKevin](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@StickyKevin](https://discussions.unity.com/u/StickyKevin)
#### Post date: [November 11, 2022, 8:46am UTC](https://discussions.unity.com/t/visual-studio-cant-find-assembly-while-unity-doesnt-complain-when-using-assembly-definition/790422/4 "2022-11-11T08:46:53Z")

</div>

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.
