您的位置:首页 > 数据库

C# 使用SQLite由于.NetFramework 的错误

2012-05-25 15:29 871 查看
In order to use a CLR 2.0 mixed
mode assembly, you need to modify your App.Config file to include:
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>


The key is the
useLegacyV2RuntimeActivationPolicy
flag.
This causes the CLR to use the latest version (4.0) to load your mixed mode assembly. Without this, it will not work.

Note that this only matters for mixed mode (C++/CLI) assemblies. You can load all managed CLR 2 assemblies without specifying this in
app.config
.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐