2014-01-22 85 views
2

我的项目使用另一个lib项目作为参考。无法在Visual Studio 2010中加载文件或程序集

我试图在“Relase”模式下运行项目时出现此错误,在“调试”模式下工作正常。

它说,因为它不能加载的lib项目:

"An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll 

Additional information: Could not load file or assembly 'UserManagementProviders,  
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 
An attempt was made to load a program with an incorrect format." 
+0

http://stackoverflow.com/questions/5229310/system-badimageformatexception-could-not-load-file-or-assembly –

回答

5

BadImageFormatException意味着32/64位不匹配。检查你的项目配置。 Debug/Release配置中x86/x64/Any CPU设置必须混乱。

+0

你是curir sir,ty – susparsy

0

我认为这与64bit and 32bitDLL构建和进程的区别有关。

尝试编译为32位通过更改project properties/Build/Platform Target

相关问题