locked
Problem with third party .dll not loading in x64, .net 4.0 RRS feed

  • Question

  • I am responsible for development of an n-tier application used to process photo images for large scale printing on canvas and paper.  There is a third party .dll (Aurigma.GraphicsMill) that I need to call in order to set rendering intent and embed an icc profile in a bitmap image.

    The .dll works just fine in a simple console or windows forms app.  When I try and add it to my larger project it gives me the following error after attempting to build the solution.

    Error 10 An attempt was made to load an assembly with an incorrect format: C:\Users\dhoffman\Documents\Visual Studio 2012\Projects\CanvasPrinter\CGCanvasPrinter\bin\x64\Release\Aurigma.GraphicsMill.dll. C:\Users\dhoffman\Documents\Visual Studio 2012\Projects\CanvasPrinter\CGCanvasPrinter.Domain\SGEN CGCanvasPrinter.Domain

    This solution is made up of three separate projects.  Ironically I can add this reference to two of the three but not to the one that I need (the business logic tier).  The whole solution is set to compile for x64 using .net 4.0.  It must be in x64 because it uses a lot of memory to manipulate the large graphics files.

    I have the project zipped up if you would like me to submit it for testing.  Didn't see any way to attach it to this communication.

    I have tried numerous things that I've found on the web but none of them have worked.  Hopefully someone there can help.

    Thank you - Dale Hoffman

    Friday, January 11, 2013 9:42 PM

Answers

  • Hi Dale,

    Please try this tool: http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.110).aspx 

    It will provide more information about how the assembly load failed. 

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Mike Feng Tuesday, January 22, 2013 11:01 AM
    Thursday, January 17, 2013 2:29 AM
  • Finally resolved this one.  On the project properties page under build at the very bottom there is a drop down for 'generate serialization assembly'.  It was set to 'Auto'  and when I changed it to 'Off' suddenly this would compile and work.  I read this on some obscure web site or I never would have known to try it. 
    • Marked as answer by Mike Feng Friday, February 1, 2013 5:06 AM
    Thursday, January 31, 2013 5:30 PM

All replies

  • Hi Dale,

    Welcome to the MSDN Forum.

    How about this dll: Aurigma.GraphicsMill.dll? Is it also x64bit? If not, please try this 64bit version.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 14, 2013 7:36 AM
  • Mike - Thanks for the reply.  Yes the .dll is 64 bit.  It works fine in a simple Windows Forms app.  Just won't work in my n-tier app which is a solution made up of three projects. - Dale
    Wednesday, January 16, 2013 4:53 PM
  • Hi Dale,

    Please try this tool: http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.110).aspx 

    It will provide more information about how the assembly load failed. 

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Mike Feng Tuesday, January 22, 2013 11:01 AM
    Thursday, January 17, 2013 2:29 AM
  • Finally resolved this one.  On the project properties page under build at the very bottom there is a drop down for 'generate serialization assembly'.  It was set to 'Auto'  and when I changed it to 'Off' suddenly this would compile and work.  I read this on some obscure web site or I never would have known to try it. 
    • Marked as answer by Mike Feng Friday, February 1, 2013 5:06 AM
    Thursday, January 31, 2013 5:30 PM