I'm trying to deploy a desktop application written on WPF 4.0 that uses SQLite through Entity Framework. So i've changed .config file (absolute path to db -> relative) and copied database file itself to app's directory. It seems to be working fine, but on other PC it's throwing an error during runtime. Supplying System.Data.SQLite.dll and System.Data.SQLite.Linq.dll and/or installing ADO.NET 2.0 Provider for SQLite via exe (http://sourceforge.net/projects/sqlite-dotnet2/files/) didn't help. No additional controls/providers etc. used during development. Am i missing something? p.s. FW 4.0 is present on client machine because VS2010 was installed there and C:\Windows\Microsoft.NET\Framework\v4.0.30319 exists and is ~400mb.
-
1Plain xcopy? I was hoping that there is no need for installer... You think i've missed some needed files? I've provided application exe, exe.config, database + sqlite dll's/installer.Alcz– Alcz2010-06-29 12:24:55 +00:00Commented Jun 29, 2010 at 12:24
-
1Error is : <<<Problem signature: Problem event name: CLR20r3 Problem signature 01: dbapp.exe Problem signature 02: 1.0.0.0 Problem signature 03: 4c29da08 Problem signature 04: System.Data Problem signature 05: 4.0.0.0 Problem signature 06: 4ba1e064 Problem signature 07: 14f5 Problem signature 08: 2b Problem signature 09: System.Windows.Markup.XamlParse OS Version: 6.1.7600.2.0.0.256.1>>> SQLite EF 4.0 hack "useLegacyV2RuntimeActivationPolicy="true"" exists in .config, without it the app doesn't compile.Alcz– Alcz2010-06-29 12:37:51 +00:00Commented Jun 29, 2010 at 12:37
-
1Well try a version with an installer -- clickonce, perhaps -- to see if it is the lack of an installer that is causing the issue. Could also be the fact that SQLite has different DLLs for 32 and 64-bit architectures.Jay– Jay2010-06-30 03:51:05 +00:00Commented Jun 30, 2010 at 3:51
-
1Published the project via ClickOnce, still no luck. SQLite dll's might be different (yes development machine is 64bit and clients are 32, but the project is x86 and i think SQLite Provider installer must take care of it). Also i rebuilt the project as 3.5 FW application (threw away huge percent of performance, but let it be) - same result is observed.Alcz– Alcz2010-06-30 13:06:12 +00:00Commented Jun 30, 2010 at 13:06
Add a comment
|
1 Answer
I had the same problem with SQLite and ADO.NET in WPF Application. I solved it in this way:
- I added System.Data.SQLite.dll, System.Data.SQLite.Linq.dll and Sqlite.Designer.dll as reffences in my project.
- I did right - click on them -> properties -> Copy Local -> true
I added in App.config this code:
<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" /> </DbProviderFactories> </system.data>
This was all I did, and it's working. Good Luck !
1 Comment
white.zaz
Actually, you don't need
Sqlite.Designer.dll