Jump to content

Error compiling to Any CPU on 64bit machine

  • Please log in to reply
1 reply to this topic

#1 Guest_derek_*

  • Guests

Posted 10 September 2007 - 10:27 PM

I am running Windows 2003 64bit edition on an Intel EM64T platform. Target Platform for my projects are set to 'Any CPU'. I use the web deployment project type to create web site output. I am getting an error on the web deployment project as follows:

File 'Alachisoft.NCache.Cache.dll' of project output 'Precompiled Web Outputs from myApplication (Active)' targeting 'AMD64' is not compatible with the project's target platform 'x86'

It seems the AMD64 version of the DLL is selected on compile, yet the assumption is x86 for the target platform 'Any CPU'. How do I either force the correct DLL to be picked up, or fix the target platform? I could select x64 as target, but we run on a mix of 32bit and 64bit.

I noticed the assemblies in the GAC are of 2 flavours x86, and AMD64. Is this correct for an Intel EM64T based platform? I installed using the x64 setup.

#2 Guest_Paul_*

  • Guests

Posted 30 November 2007 - 05:07 AM

You need to install 64-bit build environment (Micorosoft Platform SDK for windows server 2003 R2) and then run Visual Studio in 64-bit retail/debug mode. This way you don't have to specify the CPU type and the environment will automatically pick the x64-bit assemblies. And, IIS also needs to be running as 64-bit if you have ASP.NET

In regard to your other question, x86 assemblies are required for NCache Manager because it runs as 32-bit under WOW64. And, these are also required if your application is running as x32-bit but the caching is running on 64-bit (same machine).

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users