- Home /
assembly reference to third-party assembly not preserved
I'm trying to use a third-party assembly. I downloaded its code from GitHub. I've opened it separately in MonoDevelop, updated Assembly References to make UnityEngine available and successfully built it to a dll. Then, I copied that dll into the Assets directory of my main project and updated Assembly References to point to that dll. Then, I built my project successfully. However, when I switch back to Unit3d, I see the following error:
error CS0246: The type or namespace name ... could not be found. Are you missing an assembly reference?
Then, I go back to MonoDevelop and I see that the using-directive I added for the namespace of the third-party code I'm trying to use is causing an error, and, when I go back into .Net Assemblies tab in Assembly References, the reference is still there but the checkbox next to it is no longer checked.
If I check that checkbox again and re-build, the error is fixed, but switching back to Unity3d shows the error again.
I understand Unity3d re-writes one or more of the project-related files each time one saves in the editor. I presume that's over-writing the Assembly Reference I've created.
How best to solve this problem?