我的项目使用另一个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/