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

标签 c# .net visual-studio-2010 badimageformatexception

我的项目使用另一个lib项目作为引用。

尝试在“发布”模式下运行项目时出现此错误,在“调试”模式下运行正常。

它说它无法加载 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."

最佳答案

BadImageFormatException 表示 32/64 位不匹配。检查您的项目配置。调试和发布配置中的 x86/x64/Any CPU 设置必须困惑。

关于c# - 无法在 Visual Studio 2010 中加载文件或程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21278104/

相关文章:

c# - 如何从字典中删除所有元素?

.net - T4:在 Visual Studio 和 MSBuild 中使用属性

.net - vb net update UI控件来自单独的线程事件

c++ - 使用 Visual C++ 2010 构建 Qt 4.5

c# - 摆脱 Outlook 插件 Microsoft.Office.Interop.Outlook 上的警告

c# - 如何用 winapi 获取监视器的友好名称?

c# - Azure BlobWriteStream 客户端无法在指定超时内完成操作

c - 头文件 (.h)、库文件 (.lib) 和 DLL (.dll) 文件如何关联

c# - 数据库更新的词典/列表速度

.net - 什么是适合我们需求的轻量级 ORM?