无法在Visual Studio 2010中加载文件或程序集

sus*_*rsy 2 .net c# visual-studio-2010 badimageformatexception

我的项目使用另一个lib项目作为参考.

尝试在"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."
Run Code Online (Sandbox Code Playgroud)

fej*_*oco 6

BadImageFormatException意味着32/64位不匹配.检查项目配置.必须在Debug和Release配置中混淆x86/x64/Any CPU设置.