1

I have a web application deployment project setup for an ASP.NET application with Visual Studio 2008. I'm compiling on an x64 system, and the ASP.NET application includes several Managed C++ assemblies that are compiled for x64.

When the deployment project is compiled, the following error occurs:

ASPNETCOMPILER : error ASPCONFIG: Could not load file or assembly 'ClearCanvas.Dicom.Codec.Jpeg, Version=1.0.3827.17909, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

If I exclude the x64 assemblies from the build, everything runs fine. Is it possible to use a web deployment project with assemblies compiled for x64?

Note that I also noticed a potential reference to this issue on this page. The suggested fix on the page does not resolve the issue and doesn't seem related.

1
  • Are you using a x64 App Pool? Commented Feb 16, 2011 at 0:05

1 Answer 1

1

The problem ended up being caused by building the software via msbuild from a standard Visual Studio Command prompt instead of the x64 Win64 Command Prompt. Once I switched to this alternate build environment, the compile got past this specific error.

I also had subsequent errors with a native DLL not being loaded by the Web Deployment project. This question also helped me determine the DLL that was causing the issues, and how to solve the issue (placing the native DLL in the Path).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.