简体   繁体   中英

WCF Service Reference Update Fails

I'm new to WCF and I want to update the service reference. However, I get the message: "Could not load file or assembly 'ManageDHCP' or one of its dependencies. An attempt was made to load a program with an incorrect format." when I try right clicking the service reference in Visual Studio 2013 > Update Service Reference.

Before I was using 32-bit ManageDHCP.dll in my service; however I found out that I needed to use the 64-bit ManageDHCP.dll so I went and replaced that then configured the build's platform target and platform of the service to x64 which by itself builds fine. Why does it still fail though?

So the answer was was that I was running Visual Studio 2013, which apparently the default when you install is set to run IIS Express (32-bit version). This has issues when you have 64-bit projects/dlls.

I fixed this by going up to the menus and checking the box for:

Tools | Options | Projects and Solutions | Web Projects | Use the 64 bit version of IIS Express…

Further reading: http://blogs.msdn.com/b/rob/archive/2013/11/14/debugging-vs2013-websites-using-64-bit-iis-express.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM