作業系統 Windows 7(x64) + Visual Studio 2010 C#

特徵:使用SQLite 出現=>

FileLoadExcepttion 未處理

混合模式組件是針對版本 'v2.0.50727' 的執行階段建置的,無法在沒有其他組態資訊的情況下載入 4.0 執行階段中。

解決方法:

在程式中加入(按下 ctrl+shift+A)應用程式組態檔 app.config

(注意檔名可為app.config或App.config 但是app1.config會錯誤)

打開後加上紅色的部份

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

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

</configuration>

[引用] [C#] 解決SQLite不能在.Net Framework 4下執行的問題

 




文章標籤
全站熱搜
創作者介紹
創作者 newworldmaking 的頭像
newworldmaking

新世界making

newworldmaking 發表在 痞客邦 留言(0) 人氣(1,462)