2013-04-09 67 views
0

我用c#.net(4.0)和SQLite數據庫創建了一個Windows應用程序。它運作良好,同時調試,然後我創建的安裝和安裝它,然後,當我執行的.exe它給出這樣的錯誤:應用程序 -爲什麼在Windows應用程序設置中發生System.IO.FileLoadException?

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的情況下添加更多內容?

需要幫助!非常感謝。

回答

2

您需要添加

<supportedRuntime version="v2.0"/> 
相關問題