Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

System.Net.Http.dll is missing during compilation

Discussion in 'WebGL' started by michael-v, Feb 8, 2019.

  1. michael-v

    michael-v

    Joined:
    Jun 21, 2013
    Posts:
    18
    Hello! I'm trying to compile our game to webgl. For some reason it fails with error:

    Code (CSharp):
    1. [Exception] FileNotFoundException: Could not find file "/Users/michael/projects/client/Temp/StagingArea/Data/Managed/tempStrip/System.Net.Http.dll"
    2. (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    3. System.IO.FileStream..ctor()    <ac823e2bb42b41bda67924a45a0173c3>:0
    4. System.IO.FileStream..ctor()    <ac823e2bb42b41bda67924a45a0173c3>:0
    5. ModuleDefinition.GetFileStream()    <28cdca1704d2491781795499c297b78b>:0
    6. ModuleDefinition.ReadModule()    <28cdca1704d2491781795499c297b78b>:0
    7. AssemblyDefinition.ReadAssembly()    <28cdca1704d2491781795499c297b78b>:0
    8. AssemblyReferenceChecker.CollectReferencesFromRootsRecursive()    /Users/builduser/buildslave/unity/build/Editor/Mono/Utils/AssemblyReferenceChecker.cs:51
    9. AssemblyReferenceChecker.CollectReferencesFromRootsRecursive()    /Users/builduser/buildslave/unity/build/Editor/Mono/Utils/AssemblyReferenceChecker.cs:64
    10. AssemblyReferenceChecker.CollectReferencesFromRootsRecursive()    /Users/builduser/buildslave/unity/build/Editor/Mono/Utils/AssemblyReferenceChecker.cs:64
    11. AssemblyReferenceChecker.CollectReferencesFromRoots()    /Users/builduser/buildslave/unity/build/Editor/Mono/Utils/AssemblyReferenceChecker.cs:74
    12. CodeStrippingUtils.CollectManagedTypeReferencesFromRoots()    /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/CodeStrippingUtils.cs:428
    13. CodeStrippingUtils.CollectNativeClassListFromRoots()    /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/CodeStrippingUtils.cs:411
    14. CodeStrippingUtils.GenerateNativeClassList()    /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/CodeStrippingUtils.cs:363
    15. CodeStrippingUtils.GenerateDependencies()    /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/CodeStrippingUtils.cs:109
    16. AssemblyStripper.RunAssemblyStripper()    /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:347
    17. AssemblyStripper.StripAssemblies()    /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:216
    18. IL2CPPBuilder.Run()    /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:203
    19. IL2CPPUtils.RunIl2Cpp()    /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:42
    20. WebGlBuildPostprocessor.CompileBuild()    /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:374
    21. WebGlBuildPostprocessor.PostProcess()    /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:952
    22. DefaultBuildPostprocessor.PostProcess()    /Users/builduser/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27
    23. PostprocessBuildPlayer.Postprocess()    /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:286
    24. GUIUtility.ProcessEvent()
    25.  
    I've tried to remove Library and Temp folders but error perssists. I tried to add -r:System.Net.Http.dll to mcs.rsp. I have no clue were to go next. Any ideas?


    Unity: 2018.3.4

    Note: It works great in editor with webgl platform. Compiles and works great on standalone, ios and android.
     
  2. michael-v

    michael-v

    Joined:
    Jun 21, 2013
    Posts:
    18
    Answering to my own questions. One of the libraries had WebGL specific version (main one was in Plugins, and override was in WebGL folder). This library happened to have been compiled with name that was not matched with it's filename - we had
    WebGL/SmartFox.dll
    but it actually should be
    WebGL/SmartFox_WebGl.dll
    (this is how it's provided, our mistake).

    For some convoluted reason this creates error as above.

    I'll try to create bug report.