Search Unity

Loading Assembly Failed, Even Though It Shouldn't Be Loaded

Discussion in 'Editor & General Support' started by AcademyOfFetishes, Apr 12, 2019.

  1. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    219

    As you can see here, I've got a dll that's set to only be used in the Editor, but when I start the game, I get an error that it can't load that assembly. Here's the full stack trace:

    Code (CSharp):
    1. Loading assembly failed: "Assets/System.IO.Compression.FileSystem.dll"
    2. 0x00000001414141B8 (Unity) StackWalker::GetCurrentCallstack
    3. 0x000000014141A666 (Unity) StackWalker::ShowCallstack
    4. 0x00000001412FDE5B (Unity) GetStacktrace
    5. 0x000000014014301E (Unity) DebugStringToFile
    6. 0x0000000140BD9DB1 (Unity) MonoManager::LoadAssembly
    7. 0x0000000140BD99F3 (Unity) MonoManager::LoadAssemblies
    8. 0x0000000140BD3BCC (Unity) MonoManager::EndReloadAssembly
    9. 0x0000000140BDD4E4 (Unity) MonoManager::ReloadAssembly
    10. 0x0000000140E8088B (Unity) ReloadAllUsedAssemblies
    11. 0x0000000140E7AA6F (Unity) HandleCompileStatus
    12. 0x0000000140E76CCA (Unity) CompileScriptsWait
    13. 0x0000000140E763E3 (Unity) CompileDirtyScriptsForEditorSyncInternal
    14. 0x0000000140E76233 (Unity) CompileDirtyScriptsForEditorSync
    15. 0x0000000140E768B5 (Unity) CompileScriptsForEditorSync
    16. 0x0000000140E7E707 (Unity) LoadMonoAssembliesAndRecompileIfNecessary
    17. 0x0000000141331741 (Unity) Application::InitializeProject
    18. 0x0000000141498AD5 (Unity) WinMain
    19. 0x00000001424831BA (Unity) __scrt_common_main_seh
    20. 0x00007FFB90463DC4 (KERNEL32) BaseThreadInitThunk
    21. 0x00007FFB92233691 (ntdll) RtlUserThreadStart
    But since that dll is marked for Editor only, why am I getting this error when I hit the play button? Also, how do I fix this error? It seems to be harmless. I can clear the log and it goes away. I can play the game fine. It's just annoying that it keeps popping up.

    Here's how I got myself into this situation: https://forum.unity.com/threads/c-compression-zip-missing.577492/#post-4419412
     
    Last edited: Apr 12, 2019
    nehcuy likes this.