As we know SqlCE database is a collection of dlls and can be distributed along with your applications with out any additional installation.Now integrating sqlserver Compact was never easy before Nuget ( formerly NuPack ) .It is open source ,completely free and comes as a VS add in.This post we will have a look into NuGet features and will integrate SQLCE to our project with out any installation.
- Download and install Nuget from codeplex.
- Once installed click on "Add Package Reference" from reference.
- This will show you Nuget window with all package references as shown bellow.
- Search for SQLCE and click on install.
- Once installed you will find changes to the existing project.The SqlCE references will be added to the project .You can find the package at local project folder.
The folder contains the .zip file with SQLCE Binaries and files .The tools folder contains scripts to add a post build job to your project, that copies the files in the Native Binaries folder to the bin folder.Check with Erik Ejlskov Jensen's this blog post for more details .
So Nuget helps to eradicate the manual process involving installation and referring to the dlls by privately installing the components.