Search code examples
visual-studio-2010sql-server-cesetup-deployment

Setup project, SQL compact 4 prerequisites


I have created a setup project in my application in order to include SQL compact 4 in the installation, as a prerequisite downloadable at the vendor's site (microsoft). I did everything thourg Visual Studio 2010 console (with SP1). Now, when I try to install the package, the setup doesn't realize that SQL compact is installed. Why? I don't want to use any other form of private deployment like copying the dlls and including them into my project. Thanks!


Solution

  • Most likely the prerequisite is not configured correctly. Try creating your own custom prerequisite.

    Visual Studio setup projects do not support custom prerequisite creation. However, it can be done by manually generating the required manifests.

    These manifests can be generated automatically with the Bootstrapper Manifest Generator tool.

    After generating the package manifests, you can add all these files (including the package) in a separate folder in the Visual Studio prerequisites folder, for example:

    C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages
    

    This way you can see your custom prerequisite when clicking Prerequisites button in your setup project properties page.

    To detect SQL Server Compact 4 you can search for this registry entry:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v4.0\ENU\DesktopRuntimeVersion