无法加载文件或程序集“XXX”或它的一个依赖。试图加载程序格式不正确 [英] Could not load file or assembly 'xxx' or one of its dependencies. An attempt was made to load a program with an incorrect format
问题描述
我刚刚签出从Subversion修订到一个新的文件夹。打开解决方案,我得到这个运行时:
I just checked out a revision from Subversion to a new folder. Opened the solution and I get this when run:
无法加载文件或程序集XXXX或它的一个依赖。试图加载格式不正确的程序。
这是相同code我已经有一段时间了检查。为什么现在就这样做呢?我现在也看到了调试的x86,而不是仅仅调试在XXX项目的bin文件夹。什么是调试x86和为什么不让我只是调试只喜欢我在bin文件夹用?
This is the same code I had checked in a while ago. Why now is it doing this? I now also see a Debug x86 instead of just Debug in that xxx project's bin folder. What is Debug x86 and why don't I just have Debug only like I used to in the bin folder?
推荐答案
听起来就像是项目的一部分正在建设的86只,其余正在建立任何CPU / 64。这咬了我,太。你运行在x64(或呃... IA64)?
Sounds like one part of the project is being built for x86-only while the rest is being built for any CPU/x64. This bit me, too. Are you running an x64 (or uh... IA64)?
检查项目属性,并确保一切都被建为任何CPU。 f您在Visual Studio中的时候,你可以通过在屏幕和点击顶部将工具栏上的86或任何CPU菜单(旁边的调试/释放菜单)检查一切配置管理器...
Check the project properties and make sure everything is being built for "Any CPU". f you're in Visual Studio, you can check for everything by going to the "x86" or "Any CPU" menu (next to the "Debug"/"Release" menu) on the toolbar at the top of the screen and clicking "Configuration Manager..."
这篇关于无法加载文件或程序集“XXX”或它的一个依赖。试图加载程序格式不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!