Last post Mar 21, 2009 01:59 PM by viswavikass
Mar 14, 2009 03:40 PM|viswavikass|LINK
I have a web service developed with Target output platform set as "x64". However I am unable to set the WDP project of the web service to have the same configuration as well.
I have referenced a custom dll built as "x64" output. If i cannot set the WDP to "x64" as well, the WDP does not get built. I get the below error:
"Could not load file or assembly 'MyAssembly' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Please explain about setting the output type of WDP project to "x64".
Setting target output configuration to x64
Mar 18, 2009 02:38 AM|Thomas Sun – MSFT|LINK
32 bit application cannot load 64 bit dll. In this case, you can either compile your website to 64 bit version or compile the dll in Any CPU.
To compile website in 64 bit version, we need to use 64 bit “aspnet_compiler.exe”, which is in "C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\" by default.
You also can use ASP.NET web application project instead of ASP.NET website project. If we do so, we can set its platform in its Properties page.
I look forward to receiving your test results.
Mar 21, 2009 01:59 PM|viswavikass|LINK
Thanks for your suggestion. But my issue is that I am trying to add a Web Deployment Project for my already successfully built web service. Since Web Deployment Projects (used to pre-compile web applications/services) is not integrated with Visual Studio,
I had to install it as a separate add-on to VS and this does not have the full build configuration options that VS has.
Hence this project instead of reading through 64 bit Framework folder uses the normal 32 bit compilation tools (ASPNET_COMPILER.EXE) and thus the build failure.
I had logged a suggestion to enhance WDP through Connect. Posting the link here. Please visit the same and Vote for it if you find the issue as genuine.
I am also posting the links to other posts in MSDN forums and ASP.NET forums on the same topic. Kindly visit them to check out on the various options we tried on this issue.
Thanks again for your time and effort.
Connect Suggestion on 64-bit pre-compiler for web deployment projects