3

Not able to run as web-site in visual studio 2013

Could not load file or assembly 'Aurigma.GraphicsMill' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Exception Details:

System.BadImageFormatException: Could not load file or assembly 'Aurigma.GraphicsMill' or one of its dependencies. An attempt was made to load a program with an incorrect format.

 
 Stack Trace: [BadImageFormatException: Could not load file or assembly 'Aurigma.GraphicsMill' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190  

Tried as suggested by Graphicsmill frequent asked questions forums for Web Application

How to Resolve BadImageFormatException. (http://www.graphicsmill.com/docs/gm/frequently-asked-questions.htm)

Any other suggestions to make web-site run in my local-machine through visual studio 2013 is really helpful.

  • Sorry! I forgot to make the change to relevant application pool. (http://stackoverflow.com/questions/2023766/an-attempt-was-made-to-load-a-program-with-an-incorrect-format-even-when-the-p?rq=1) – Midhun Kumar Singh Alluru Apr 27 '14 at 08:55

2 Answers2

4

I found the answer, need to change to Relevant Application Pool.

["An attempt was made to load a program with an incorrect format" even when the platforms are the same

Answered by Kalyan.

Community
  • 1
  • 1
2

There's a lot of information about this problem. Most of it is about a problem with 64-bit vs 32-bit. Well, my exact problem was I was using 64-bit Aurigma.GraphicsMill but my App pool (DefaultAppPool) had Enable 32-Bit Applications set to True which if you read the description on the bottom of the window says it makes your app run in 32-bit Mode. I was trying to run a 64-bit .dll from a 32-bit application.

enter image description here

  • 1
    For IIS Express: Go to: Tools > Options > Projects and Solutions > Web Projects > Use the 64 bit version of IIS Express – adaam Oct 19 '16 at 13:17