Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had this same problem when using SQLite in a WPF project whose platform target was <code>Any CPU</code>. I fixed it by following the following steps:</p> <ol> <li>Open the project designer in Visual Studio. Details on how to do it can be found <a href="http://msdn.microsoft.com/en-us/library/z15yzzew.aspx">here</a>.</li> <li>Click on the Build tab.</li> <li>Disable the <code>prefer 32-bit</code> option.</li> </ol> <p>Alternatively, you could just set the platform target to <code>x86</code> or <code>x64</code>. I think this problem is caused by the <code>System.Data.SQLite</code> library using the platform target to get the location of the 'SQLite.Interop.dll' file.</p> <p>UPDATE:</p> <p>In case the project designer cannot be reached, just open the project (<code>*.csproj</code>) file from a text editor and add the value <code>&lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt;</code> into the <code>&lt;PropertyGroup&gt;...&lt;/PropertyGroup&gt;</code> tag.</p> <p>Example code</p> <pre><code>&lt;PropertyGroup&gt; &lt;Configuration Condition=" '$(Configuration)' == '' "&gt;Debug&lt;/Configuration&gt; &lt;Platform Condition=" '$(Platform)' == '' "&gt;AnyCPU&lt;/Platform&gt; &lt;ProjectGuid&gt;[Set by Visual Studio]&lt;/ProjectGuid&gt; &lt;OutputType&gt;Exe&lt;/OutputType&gt; &lt;AppDesignerFolder&gt;Properties&lt;/AppDesignerFolder&gt; &lt;RootNamespace&gt;[Set by Visual Studio]&lt;/RootNamespace&gt; &lt;AssemblyName&gt;[Set by Visual Studio]&lt;/AssemblyName&gt; &lt;TargetFrameworkVersion&gt;v4.5&lt;/TargetFrameworkVersion&gt; &lt;FileAlignment&gt;[Set by Visual Studio]&lt;/FileAlignment&gt; &lt;!--Add the line below to your project file. Leave everything else untouched--&gt; &lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt; &lt;/PropertyGroup&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload