When using SQLite in EF6. SQLite needs to install Sqlite-netfx40-setup-bundle-x64-2010-1.0.97.0.exe. I do not want to launch the project when the implementation of the program, and then see the packaging process, the SQLite installer is actually performing the registration, and then analyzed the execution of the command prompt interface. found that only three DLLs were registered with C:\Windows\Microsoft.NET\Framework\v4.0.30319\Ngen.exe.
You can then use a C # program to perform registration.
Console.WriteLine ("Adding Registry entries ...");
RegistryKey key = Registry.localmachine;
RegistryKey software = key. CreateSubKey (@ "software\microsoft\. Netframework\v4.0.30319\assemblyfoldersex ");
//Register EF stringExecutefile =@"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Ngen.exe"; string[] Dllnames =New string[]{ @"System.Data.SQLite.Linq.dll",//1 @"System.Data.SQLite.EF6.dll",//2 @"System.Data.SQLite.dll" }; //Perform registration for(inti =0; i < dllnames.length; i++) { //Building a registration statement stringInstallcommand =string. Format ("{0} {1}{2}{3}","Install", (Char) the, Dllnames[i], (Char) the); Process installprocess=Process.Start (Executefile, Installcommand); Console.WriteLine ("registering {0}, please wait ...", Dllnames[i]); Installprocess.waitforexit (); }
Sqlite EF6 Registration