Search Issue Tracker
By Design
Votes
2
Found in
2018.4
2019.4
2020.3
2020.3.2f1
2021.1
2021.2
Issue ID
1329712
Regression
No
Using a compiled C# DLL in a Unity project throws a build error
How to reproduce:
1. Open the attached "Repro.zip" project
2. Build "test" scene to Standalone
Expected result: Build succeeds when using a compiled C# DLL in a Unity project
Actual result: Build fails when using a compiled C# DLL in a Unity project
Full error:
ArgumentException: The Assembly UnityEditor.CoreModule is referenced by Magnetic3DUnityCamera ('Assets/Magnetic3D/Magnetic3DUnityCamera.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at <d6a6a4b561b9431dbfe2c61f7bf0d405>:0)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at <d6a6a4b561b9431dbfe2c61f7bf0d405>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Reproducible in: 2018.4.35f1, 2019.4.27f1, 2020.3.10f1, 2021.1.8f1, 2021.2.0a18
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “FocusController has unprocessed focus events.” warnings are thrown after adding iOS, tvOS or visionOS Build Profiles
- Holes and different colors appear on default Tree Materials after applying them to the Tree GameObject and undoing changes
- Error indicating that the Text Asset Importer hasn't been disposed properly is logged when switching Importer Type in a Focused Inspector
- Documentation installation shows "Install failed: Validation Failed" when installing Android Build Support module
- Error indicating that the Package Manifest Importer hasn't been disposed properly is logged when switching Importer Type in a Focused Inspector
Resolution Note:
The assembly Magnetic3DUnityCamera.dll references UnityEditor. You are not allowed to include this in a Standalone build as you will not have access to the editor from your player. You can exclude this assembly from your build in the assembly inspector. Click on the assembly in Unity and unselect Any Platform and only include Editor