C# 为什么在Windows应用程序安装程序中发生System.IO.FileLoadException?

C# 为什么在Windows应用程序安装程序中发生System.IO.FileLoadException?,c#,winforms,visual-studio-2010,installation,C#,Winforms,Visual Studio 2010,Installation,我使用c#.net(4.0)和SQLite数据库制作了一个windows应用程序。调试时它工作正常,然后我创建了安装程序并安装了它,然后在执行.exe时,它会出现如下错误: System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without addi

我使用c#.net(4.0)和SQLite数据库制作了一个windows应用程序。调试时它工作正常,然后我创建了安装程序并安装了它,然后在执行.exe时,它会出现如下错误:

  System.IO.FileLoadException: 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中,代码是

<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
</configuration>

数据库位于[System.Environment.CurrentDirectory]例如bin\debug目录中,其中.exe位于该目录中

我在创建设置时犯了什么错误,我是否需要在SQLite中添加更多内容

需要帮助!!非常感谢。

您需要添加

<supportedRuntime version="v2.0"/>