Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mono Upgrade mscorlib.dll could not be found

Discussion in 'Experimental Scripting Previews' started by strich, Sep 28, 2016.

  1. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    372
    Wanting to help out with the Mono upgrade so we're playing around with upgrading our game War for the Overworld, which has quite a sizable codebase with C++ plugins, etc.

    First issue we have with the Mono 4.6 upgrade is that it fails to compile with the following error:
    Code (CSharp):
    1. -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Assembly-UnityScript-firstpass.dll
    2. The assembly mscorlib.dll was not found or could not be loaded.
    3. It should have been installed in the `C:\Program Files\Unity 5.5.0b4-Mono-Upgrade\Data\Mono\lib\mono\1.0\mscorlib.dll' directory.
    4. -----CompilerOutput:-stderr----------
    5. -----EndCompilerOutput---------------
    6. - Finished compile Library/ScriptAssemblies/Assembly-UnityScript-firstpass.dll
    7. The assembly mscorlib.dll was not found or could not be loaded.
    8. It should have been installed in the `C:\Program Files\Unity 5.5.0b4-Mono-Upgrade\Data\Mono\lib\mono\1.0\mscorlib.dll' directory.
    9.  
    Was going to report it as a bug for you as well, but the Bug Reporter window won't open. :/
    I don't think there is much point uploading the editor log or project itself (Its massive) for this one? Let me know otherwise though.
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    It looks like the UnityScript toolchain is not looking for mscorlib.dll properly. Is should be looking in Unity 5.5.0b4-Mono-Upgrade\Data\Mono\lib\mono\4.6\mscorlib.dll. Can you submit a bug report with a different Unity version (where the bug reporter works)? Please let me know the bug report so that we can associate the bug properly with this issue.

    Also, we'll track down why the bug reporting isn't working! Thanks.
     
  3. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    Well that second part should be an easy one Josh, the bug reporter was never included in the downloadable ZIP (for Windows at least) :).
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Yep, we just realized that! Sorry, it was an oversight on our end. We'll see if we can ship the bug reporter in the next preview build.
     
  5. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    372
    Submitted a bug report (836115). By the way I don't have a \lib\mono\4.6\ folder:
    upload_2016-9-28_13-20-54.png
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Thanks! I apologize, it should be Unity 5.5.0b4-Mono-Upgrade\Data\MonoBleedingEdge\lib\mono\4.6\mscorlib.dll. The Data\Mono directory still has the old version of Mono.
     
  7. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    372
    Roger. There is more there, however still no \4.6\ folder:
    upload_2016-9-28_13-26-29.png
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Well, now I'm totally wrong. The 4.5 folder is the one we want. In any case, we will correct it.
     
  9. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    372
    hah. Yeah no problems. How often do you expect to update this branch? I might look into packing our project into something downloadable you guys can test with when we get around to hitting actual bugs.
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    That will depend on how quickly we can correct the bugs. I suspect we'll have a new drop of the preview build every few weeks. If you can do anything to make the process of getting bug reports with a project to us, that would be great, as we're looking for real-world tests of this version. Thanks!
     
  11. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    372
    Roger. Well let me know if you find a short-term work around to this issue and I'll continue hitting this build.
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    We will, thanks!
     
  13. Dizzy-Dalvin

    Dizzy-Dalvin

    Joined:
    Jul 4, 2013
    Posts:
    54
    Got the same issue. Will be waiting for a solution. :)
     
  14. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    I have this fixed locally and it will be available in the next preview build.
     
    Dizzy-Dalvin and Vagabond_ like this.
  15. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
  16. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
  17. Dizzy-Dalvin

    Dizzy-Dalvin

    Joined:
    Jul 4, 2013
    Posts:
    54
    I still see the same error for .js editor scripts in the new preview build:

    Code (CSharp):
    1. The assembly mscorlib.dll was not found or could not be loaded.
    2. It should have been installed in the `C:\Program Files\Unity 5.5.0b8Mono\Data\Mono\lib\mono\1.0\mscorlib.dll' directory.
     
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    @Dizzy-Dalvin

    I think that we've seen this before, but I don't see a current bug report for it. Can you submit a bug report and include a project that causes it? Thanks!
     
  19. Dizzy-Dalvin

    Dizzy-Dalvin

    Joined:
    Jul 4, 2013
    Posts:
    54
    Well, you can just create an empty project, create new Editor folder, and create a new JS file in there. That's it :)
    But if you really need it, I'll submit a report.
     
  20. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    @Dizzy-Dalvin

    Thanks, I did not realize it was that easy! I've opened a bug for this. We'll try to get it corrected for the next preview build.
     
    Vagabond_ likes this.
  21. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    If I create a new project or open a very small one (actually the one posted here), everything compiles as expected.

    Opening our main project gives this error though:

    Code (csharp):
    1. The assembly mscorlib.dll was not found or could not be loaded.
    2. It should have been installed in the `C:\Unity550xMonoRuntimeUpgradeb9\WindowsEditor\Data\Mono\lib\mono\1.0\mscorlib.dll' directory.
    This is on the b9 build.

    Since our project is 5.4-based, the automatic script upgrader did a run. That's the only difference I can think of. Well, that an the thousand extra scripts!
     
  22. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    @Baste

    Does the project use editor scripts? I think that was the problem in the original case. If so, are those scripts in C#, UnityScript, or Boo?
     
  23. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    C# and boo. Though all the boo scripts are plugins/editor. No UnityScript (we're not barbarians!)

    Since the "add boo script" feature's been gone forever, that advice won't work. Also adding a boo script manually (through explorer) did not work.

    Purging the project of all of the .boo editor scripts fixed the error. Though now our bug-tracker's gone :(

    With that fixed, World To The West seems to work perfectly! Well, all the canvases are broken (doesn't scale with screen size), but I suspect that's the 5.5 beta and not the Mono upgrade!


    Please, please, please don't break boo completely, though. It'll be a real pain to rewrite all of our legacy tools!
     
  24. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    @Baste

    This does sound like the same error we have corrected. Any Boo or UnityScript scripts in the editor failed to compile with this error. The fix should be in the next preview build.
     
    Baste likes this.
  25. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    Thanks!

    And, sorry, I'm dumb, I thought Dizzy-Dalvin was saying that creating a new script in an editor folder resolved the issue. Gotta read more carefully!
     
  26. louisgv

    louisgv

    Joined:
    Aug 7, 2013
    Posts:
    18
    I am having the same problem but on MacOSX. Here's the error:
    Unity version: 5.5.0xMono-Runtime-Upgrade-b9
     
  27. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    @louisgv

    Thanks for reporting this. We are preparing another preview build now, and this issue should be corrected when that build is released.
     
    louisgv likes this.
  28. keineleben

    keineleben

    Joined:
    Mar 13, 2017
    Posts:
    4
    I am having the same problem again, still without solution ?
    On unity 2017.1.1f1
     
  29. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    I issue in this thread has been corrected in 2017.1.1f1. Maybe you are hitting a slightly different issue though. Can you provide the full error message you see?
     
  30. schicki01

    schicki01

    Joined:
    Jun 14, 2017
    Posts:
    8
    Hello,

    sorry to dig up such an old post, but it seems I have a similar problem with Unity 2017.4.0f1 Editor.
    When I build my game for Windows it works just fine, but my Mac build seems to be missing the very same dll. If i run the executable in Contents/MacOS I get this:

    Code (CSharp):
    1.  
    2. The assembly mscorlib.dll was not found or could not be loaded.
    3. It should have been installed in the `/Users/schicki/Library/Application Support/Steam/SteamApps/common/MyGame/Mac.app/Contents/Resources/Data/Managed/mono/2.0/mscorlib.dll' directory.
    4. logout
    5.  
    Oddly enough I dont have the folder 2.0, my Mac.app/Contents/Resources/Data/Managed/mono folder looks like this:




    I create the builds on Windows 10 and run my Mac build on my MacBook with OX X El Captain 10.11.6. Any suggestions in what i did wrong?
     
  31. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    I'm not sure what is wrong. It seems like something is missing from the Unity installation on mac. If you make a build directly on the mac, does that work?
     
  32. schicki01

    schicki01

    Joined:
    Jun 14, 2017
    Posts:
    8
    I installed Unity on my Macbook and build the game there, it works in that case. A lot of files an dll's which were missing are now there and the game starts.
    However shouldn't it be possible to create a working Mac build on a Windows machine? I mean the option is available or do I miss a plugin?
     
  33. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    I think that should be possible, and I don't believe you need any special plugin. Since the build works on mac directly, this seems like it is worth a bug report. Can you submit one?
     
  34. schicki01

    schicki01

    Joined:
    Jun 14, 2017
    Posts:
    8
    With Help -> Report a Bug? Well yes can do, but I will try to reproduce it with an empty project as my own project is rather big to attach.
     
  35. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Yes, please try that. Thanks!
     
  36. schicki01

    schicki01

    Joined:
    Jun 14, 2017
    Posts:
    8
    It works with a new project so I'm not so sure anymore to report this. Creating a new project on Windows, creating a Mac build, copying it to my Macbook and it executes just fine. Most likely my own project is at fault, I messed around with it a lot during my work. If it is not reproducible with a new project it should not be worth a report I think?
     
  37. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    If you can send you project (even if it is big) it might be worth submitting a bug report. You may have hit a corner case which we don't handle well.
     
  38. schicki01

    schicki01

    Joined:
    Jun 14, 2017
    Posts:
    8
    I sent a report with an attached zip file (350 mb, still uploading right now). I really do not want to trouble the Unity Dev's with something I am at fault for. I hope you guys get something out of this problem at least.
     
    JoshPeterson likes this.