How can I do a single-task merge of System.Data.SQLite?

My application includes SQLite.dll . How to make a single-task application in C # WPF without installing through the ClickOnce application or any installation of the installation file.

How can I link System.Data.SQLite to my project so that I can create a single-task application without a DLL with tags?

+4
source share
1 answer

to build System.Data.SQLite.dll you can embed it as a resource, and then use Reflection.Load from the resource before using any of your code so that it is ready to go. Or handle when AssemblyResolve is called, then you load it from the resource.

With SQLite.Interop.dll this is the difficult part, because it actually makes all the calls in the SQLLite C ++ libraries, and the method used by the System.Data.SQLite assembly calls the correct X86 or x64-based DLL. You could link the first part of this article to this article to create a load of the 2nd memory-based library, but you would need to replicate the initial one to check for x64 / x86 and .NET dll, and then load the correct one. (You just paste both and load the correct one)

+4
source

All Articles