Discussion:
System.Data.SQLite v1.0.89 Breaks My App (SQLite.interop.dll)
Denis Burke
2013-10-29 19:58:14 UTC
Permalink
Apps works fine on 1.0.85, but with v1.0.89 I get the error noted at the
bottom. Switching back to 1.0.85 works fine again. Further investigation
finds that v1.0.85 does not have a separate SQLite.Interop.dll. These
functions were apparently separated from the main DLL in a release after
1.0.85.

I have a .NET 3.5SP1 app which is an Excel add-in, and I develop in VS
2010. I deploy the app as a ClickOnce deployment. If I try to add
SQLite.Interop.dll as a reference (in addition to System.Data.SQLite) so
that it will copy this file as part of the deployment, I get an error that
it could not added and to check if it is a valid assembly or COM component.

If I manually copy the SQLite.Interop.dll file to my run-time directory,
the app works fine, but I need to find a way to add to the ClickOnce
deployment package. Changing the deployment process is of course possible,
but it will be painful due to the impact to the existing user base who
obtain quarterly updates. (they get automatic updates now, and would
require a series of manual steps if the process is changed)

So:
1) Is anyone aware of a way to include the Interop file with a ClickOnce
deployment?
2) Why was the functionality broken into two DLLs (thus creating the
SQLite.Interop.dll file)
3) <fyi> I don't see in the release notes, what release broke this into two
files. It might be good simply to alerts users this is potentially an
incompatible change.

Thanks,
Denis



Error details below:



Customization could not be loaded because the application domain could not
be created.
************** Exception Text **************
Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException:
Customization could not be loaded because the application domain could not
be created. ---> System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. --->
System.TypeInitializationException: The type initializer for
'Dashboard.ThisWorkbook' threw an exception. --->
System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The
specified module could not be found. (Exception from HRESULT: 0x8007007E)
at
System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum
op)
at System.Data.SQLite.SQLite3.StaticIsInitialized() in
c:\dev\sqlite\dotnet\System.Data.SQLite\SQLite3.cs:line 2380
at System.Data.SQLite.SQLiteLog.Initialize() in
c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteLog.cs:line 140
at System.Data.SQLite.SQLiteConnection..ctor(String connectionString,
Boolean parseViaFramework) in
c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteConnection.cs:line 571
at System.Data.SQLite.SQLiteConnection..ctor() in
c:\dev\sqlite\dotnet\System.Data.SQLite\SQLiteConnection.cs:line 509
at Dashboard.ThisWorkbook..cctor() in
T:\Dashboard\Dashboard\ThisWorkbook.vb:line 24
--- End of inner exception stack trace ---
Joe Mistachkin
2013-10-29 20:07:30 UTC
Permalink
Post by Denis Burke
Apps works fine on 1.0.85, but with v1.0.89 I get the error noted at the
bottom. Switching back to 1.0.85 works fine again. Further investigation
finds that v1.0.85 does not have a separate SQLite.Interop.dll. These
functions were apparently separated from the main DLL in a release after
1.0.85.
Actually, System.Data.SQLite has two different primary build types:

1. A managed-only assembly (System.Data.SQLite.dll) that loads and uses a
native SQLite interop library (SQLite.Interop.dll). This is the type
of package that you apparently downloaded.

2. A mixed-mode assembly (System.Data.SQLite.dll) that contains all the
managed and native code required to use SQLite for the target processor
architecture (e.g. x86 or x64). This is the type of package that you
need to download in this case.

Please refer to the details on the System.Data.SQLite download page:

https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki

In your case, please avoid any download package which has either "bundle"
or "setup" in the name, while making sure to select the package that
matches your target processor architecture and .NET Framework version.

--
Joe Mistachkin

Loading...