Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Error = 126 (Unable to load mono library from...)

Discussion in 'Editor & General Support' started by JonathanBolten, Aug 15, 2013.

  1. JonathanBolten

    JonathanBolten

    Joined:
    Dec 15, 2012
    Posts:
    50
    One of my alpha testers is getting this error message when he tries to run the exe:

    Unable to load mono library from "C:/Users/hisUserName/Downloads/Client_Data/Mono/mono.dll" (error = 126).

    (I removed his account's actual username, but should be irrelevant.)

    I asked him if he had an output_log.txt in the Client_Data folder and he said there was none. So it seems like anything my code could be doing is irrelevant, because it's not even making it to that point.

    I can't reproduce this on my end, so I'm wondering what the issue might be? He says mono.dll exists in the folder the error message is complaining about.

    Thanks for any help anyone can offer!
     
  2. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Maybe his AV software has decided that mono.dll isn't to be trusted?
     
  3. JonathanBolten

    JonathanBolten

    Joined:
    Dec 15, 2012
    Posts:
    50
    Today he informed me that he is not running any kind of anti-virus software. He is on Windows 8 though if that matters.

    Edit:

    I just sent him a 32-bit build and IT WORKED! He is DEFINITELY on a 64-bit version of Windows 8 (I just had him check his system info page.).

    I have tested my 64-bit build with 4-5 other computers and they have no such problems. So there is something still weird here, why can't he use the 64-bit build? I'm using the latest version of Unity 4.2.
     
    Last edited: Aug 16, 2013
  4. JonathanBolten

    JonathanBolten

    Joined:
    Dec 15, 2012
    Posts:
    50
    Any devs out there letting players use 64-bit builds? If so, has anyone run into the error message one of my players is getting?
     
  5. Verminaard

    Verminaard

    Joined:
    Aug 21, 2013
    Posts:
    1
    Hi guys -
    I just had this issue with an x64 unity game - it worked perfectly on my main machine but produced the exact issue on my freshly formatted laptop which doesn't have any development environment installed. After some digging around, I installed the x64 Microsoft Visual C++ 2010 Redistributable Package from here and this resolved it.

    Hope it solves your issue =)
     
    shomz likes this.
  6. SNG-Brandon

    SNG-Brandon

    Joined:
    Sep 5, 2013
    Posts:
    1
    That worked like a charm for me! Thanks!
     
  7. ocimpean

    ocimpean

    Joined:
    Aug 10, 2013
    Posts:
    128
    It helped me today
    Thanks a lot
    ocimpean
     
  8. VMDiv

    VMDiv

    Joined:
    Oct 5, 2013
    Posts:
    1
    Also fixed my issue with a newly rebuilt PC.

    Thanks!
     
  9. SpreadEagles

    SpreadEagles

    Joined:
    Aug 9, 2013
    Posts:
    1
    Fixed it for me! (Running x64 Windows 7)

    Thank you!
     
  10. gtaylor1899

    gtaylor1899

    Joined:
    Feb 15, 2016
    Posts:
    1
    Hi,

    OK. This is an old thread. And I had same issue today using Unity 5.3.2f1 Personal on x64 Win7 sp1.

    My solution: Building to a shorter file path did it for me, specifically a shorter file name and/or folder name(s).

    All the best!!!
     
    Last edited: Feb 15, 2016
  11. Vorrin

    Vorrin

    Joined:
    Jan 14, 2013
    Posts:
    10
    Sorry for exhuming this, but all of a sudden, after installing 5.3.3f1 I was faced with a similar problem, the launcher would appear for a split second and disappear. Editor log reported:

    ```Unable to load mono library from "C:/Program Files/Unity/Editor/Data/Mono/EmbedRuntime/mono.dll" (error = 126).```

    And Verminaard's fix worked a treat, even tho the C++ Redistributable was already previously installed (just set it to 'repair').
    So thanks a lot Verminaard, and I'm writing this comment in case someone else runs into the same problem(took me a bit of googling and careful reading).
     
  12. geraldsmallbear

    geraldsmallbear

    Joined:
    Jul 30, 2015
    Posts:
    19
    Could you please explain 'set it to repair...'

    I'm having the same issue when I build a game it won't run and reports this error. I have all the Visual C's you can get and I don't see any options to repair them. About to try manual uninstall and see....

    [SOLVED]

    I shortened the filename, saved it to the project folder and changed the build to x64....
     
    Last edited: Aug 21, 2017