Sqlite EF6 Registration

Source: Internet
Author: User
Tags sqlite

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.