1

I encountered a problem.

Now, I'm using Visual Studio 2010 to create a web site project (It's not web app.), I need to add a .dll file built under 64 bit platform by visual studio to this project, when I tried to build this project, I occurred an error says:

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

I tried many methods to solve this error, but they all don't work ?

p.s.w.g
  • 146,324
  • 30
  • 291
  • 331
  • What OS are you running on? – Richard Brown Mar 25 '13 at 04:04
  • Have the same issue here. When I update the Configuration Manager by adding x64, there isn't an x64 mode for the web site just for other Class Library projects, and if I uncheck the 'build' checkbox for the web site and just run it, it complains that my .DLL is not a 32-bit application. I also set the AppPool to not run 32-bit apps. not sure why IIS wants to run as 32-bit. Try unchecking the build for your website and run the web site and see if you get the same error I get. Seems the run-time give a little more detail for this error. – Moe Howard Apr 03 '13 at 19:54
  • Possible duplicate of [IIS 7.5 Fixing An attempt was made to load a program with an incorrect format problem?](https://stackoverflow.com/questions/6728339/iis-7-5-fixing-an-attempt-was-made-to-load-a-program-with-an-incorrect-format-pr) – T.S. Jul 26 '19 at 17:31
  • Lets close this. This is IIS config issue – T.S. Jul 26 '19 at 17:31

1 Answers1

0

I'm working with this dll at the moment on local host with VS 2008, to get the dll to work I had to place it in C:\Windows\system and it runs fine. But I am worried about transferring it to my web server, though I'll cross that bridge once I've got the app working. Hope this helps