I use Windows XP with sqlite-netFx40-setup-bundle-x86-2010-1.0.79.0. This is my develop computer with visual studio 2010.
When I try to execute the application in other computer, in this case Windows 7 x64, when I star application I get the following error:
Could not load file or assembly 'System.Data.SQLite, Version=1.0.79.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. It has tried to load a program with an incorrect format.
However, in the develop computer, the application start correctly.
I my project of visual studio, I add the references to the two dlls, SQLite an Linq and in both cases I select local copy.
Also, in the config.xml y use the prvider configuration, which I copy from the xml of the test application that I get from the bin folder:
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.79.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
</DbProviderFactories>
</system.data>
But the problem persist.
I try the 32 bits version and the 64 bits (in this case I copy to local the two 64 bits dll). The problem it's the same.
is it neccesary to install sqlite-netFx40-setup-bundle-x86-2010-1.0.79.0 in the Windows 7 PC? I would like to have a potable application, in which it has not been needed to install extra applications.
Thanks.
<hr /><i>mistachkin added on 2012-01-28 23:21:11 UTC:</i><br />
In order to use System.Data.SQLite on 64-bit Windows, you'll need the x64 package, not the x86 one.
<hr /><i>anonymous added on 2012-01-29 07:57:03 UTC:</i><br />
In windows 7 x64, do I always need the x64 package or only if the application is compiled in 64 bits?
Because I try the two version, compile in 32 bits with the 32 bits dlls, and compile in 64 bits and use the 64 bits dlls from the bin folder of the 64 bits package. In both cases I get the same error.
Also, I use the option local copy of the dlls, so if I don't wrong, copying only the dlls in the application folder is enough.
Thanks.
<hr /><i>anonymous added on 2012-01-29 15:26:25 UTC:</i><br />
The problem is resolved.
|