C# winfrom 打包安装后,报错Mixed mode assembly is built against version 'v2.0.50727' of

wirner wirner 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
请教下: 我在工程中,引入了System.Data.SQLite.dll,也会提示“ Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.”
后来配置了App.config 后,运行正常。

现在我要打包(我只把System.Data.SQLite.dll打包)安装后,提示“示“ Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.””

请问,打包工程中怎么添加配置信息?

Alternatively, as of version 1.0.91.0, all configuration settings can be specified via an optional XML configuration file. Using the XML configuration file when the primary System.Data.SQLite assembly ("System.Data.SQLite.dll") is being executed from the Global Assembly Cache is unsupported.

For each configuration setting, the associated environment variable value, if present, will override the value specified via the XML configuration file.

For the full .NET Framework, the XML configuration file must be named "System.Data.SQLite.dll.config" and it must be present in the base directory for the application domain or the directory containing the primary System.Data.SQLite assembly as reported by its location property; otherwise, it will be ignored.

For the .NET Compact Framework, the XML configuration file must be named "System.Data.SQLite.dll.config" and it must be present in the directory containing the primary System.Data.SQLite assembly; otherwise, it will be ignored.
Deployment Guidelines


这个官网上的。
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
wirner
C# 111,129 成员 642,540 内容