0

I have a web site that references two assemblies that are 64-bit only. 32-bit versions of these assemblies do exist, however I want to run with the x64 versions. ASP.NET, running under IIS, has no trouble compiling or running the website. However VS.NET 2010 will not compile it. It hits "Unable to load referenced library 'c:\inetpub\wwwroot\eDocEngine\Bin\ABCpdfCE7.dll': An attempt was made to load a program with an incorrect format." and then produces hundreds of other errors that are bogus, like claiming "Type 'Generic.List' is not defined."

If I replace the 64-bit DLLs with the 32-bit versions, VS.NET is suddenly happy with all of my code.

Since I debug and test with IIS, not Cassini, I want to keep the 64 bit DLLs in place. Is there any way at all to accomplish this?

While searching I found that there are app.config settings that might help if I was using a web application. But I'm not; it's a web site. Anything I can do?

Community
  • 1
  • 1
Ross Presser
  • 6,027
  • 1
  • 34
  • 66
  • The incorrect format message is related to the "bit-ness" of the dlls it is loading. What version of IIS are you using ? – Mark Broadhurst Aug 03 '12 at 13:16
  • Development under Windows 7, therefore IIS6.1 . I know all about the bitness. I have distinct DLLs for x86 and for x64. My operating system and therefore my IIS are running x64. But, and I repeat, Visual Studio refuses to compile website projects that reference x64 DLLs. So Visual Studio claims my code is full of errors when in fact it runs perfectly in IIS. In a few months we're going to be converting to web applications and the whole thing will finally go away. – Ross Presser Aug 11 '12 at 04:40
  • Open IIS Manager goto Application pools, choose the application pool you are using. Click on Advanced Settings on the right and under "(General)" you should have a setting for Enable 32-Bit Applications which I'm assuming is True ? – Mark Broadhurst Aug 13 '12 at 08:30
  • I don't want to run the site with 32 bit DLLs in IIS. I want to run the site with 64 bit DLLs in IIS. As a web application this is fine. As a web site, VS.NET refuses to compile it. – Ross Presser Aug 29 '12 at 18:39

1 Answers1

-1

There appears to be NO answer for web sites. By now we've changed it all to web applications and it's no longer a problem. So I'm answering this myself to get it closed.

Ross Presser
  • 6,027
  • 1
  • 34
  • 66
  • Blimey maybe trying stuff and reporting back rather than just saying, I'm not trying that would be more progressive and working with people here rather than deciding that you know better. Its just not how this works. – Mark Broadhurst Aug 30 '12 at 08:37
  • A few weeks later I realize that's not how SO is supposed to work. So I unaccepted my answer. – Ross Presser Sep 18 '12 at 03:15
  • Care to explain that downvote? If the answer is "retaliation because you downvoted me" then please admit it. – Ross Presser May 02 '16 at 19:04