Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonas Eriksson 930 posts 1825 karma points
    Aug 23, 2010 @ 15:52
    Jonas Eriksson
    0

    Could not load file or assembly

    Hi Matt!

    I'm using 4.51 but I get this error when I add my newly autoexported dll to bin:

    Exception message: Could not load file or assembly 'MyUmbraco.MyUmbraco' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    I need to do something else?

    Regards

    /Jonas

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Aug 23, 2010 @ 16:05
    Matt Brailsford
    0

    Hi Jonas,

    Did you write some code that used a previous version of the DLL? You might need to recompile your solution using the current version.

    The general process I recommend to use is have autoexport2dotnet export the DLL to a lib folder, then in visual studio add a reference to that dll, then when you compile your solution, it should copy the dll over, and it also ensures your other code is compiled against the same version.

    Matt

  • Jonas Eriksson 930 posts 1825 karma points
    Aug 24, 2010 @ 10:50
    Jonas Eriksson
    0

    Hi Matt, thank you for your quick response.

    Strange it is - I just created the dll with AutoExport and put it in the Bin. Made no dll of my own. Wanted to test it from Python *smile*. However I made cs-files instead ->  app_code and that works for me.

    Jonas

  • Marc 21 posts 40 karma points
    Aug 22, 2011 @ 22:55
    Marc
    0

    This happen to me also as soon as I copy the dll file to bin and I dont create auto compile to bin, I just copy it. Is there any solutions for this?

  • Marc 21 posts 40 karma points
    Aug 22, 2011 @ 22:58
    Marc
    0

    Can you reference the dll without using VS?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Aug 23, 2011 @ 09:31
    Matt Brailsford
    0

    Hi Marc,

    It's not advised, as if you compile to dll and drop into the bin directly, any issues will likely completley bring your site down. The main idea is to make available the .NET object for your code, so you should really be exporting to a lib folder and then referencing it in your code. 

    Cheers

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft