简体   繁体   English

为什么我的 WinForm 应用程序无法在发布模式下运行?

[英]Why my WinForm app not work in release mode?

I have problem with my WinForm app.我的 WinForm 应用程序有问题。 Debug mode works fine, but when I try to run my application into release mode I have an error:调试模式工作正常,但是当我尝试将应用程序运行到发布模式时出现错误:

System.BadImageFormatException HResult=0x8007000B Message = Unable to create file or assembly key 'SystemData.SQLite, Version = 1.0.76.0, Culture = neutral, PublicToken = db937bc2d44139' or one of its versions. System.BadImageFormatException HResult=0x8007000B 消息 = 无法创建文件或程序集密钥“SystemData.SQLite,版本 = 1.0.76.0,文化 = 中性,PublicToken = db937bc2d44139”或其版本之一。 An attempt was made for a program in an invalid format.对格式无效的程序进行了尝试。

Assuming you are using Visual Studio my first guess would be a x86/x64 mismatch between debug and release builds.假设您使用的是 Visual Studio,我的第一个猜测是调试和发布版本之间的 x86/x64 不匹配。

Are you using Nuget to get SQLLite?您是否使用 Nuget 来获取 SQLLite?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM