Search code examples
c#setup-deploymentprerequisites

C# Application - Unable to add pre-requesites files


I have developed a small database application for learning and I wanted to deploy it to run on other machine.

I try to publish application and selected Download prerequisites from the same location as my application. It gives me an error that Prerequisite file not found and it asks me to download those files

Now I have downloaded the files and I wasn't sure where to place those files and googled it.

I found that I need to add under this path:

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\DotNetFX45

Now, I have 4 different directories under this path:

C:\Program Files (x86)\Microsoft SDKs\Windows

Directories:

v7.0A
v8.1
v8.1A
v10.0A

BTW, the Bootstrapper directory is only available in v7.0A folder. So, I add NDP452-KB2901907-x86-x64-AllOS-ENU.exe under this path:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX452

But it still gives me same error. Then I tried to add Bootstrapper directory under other versions but same error.

Questions:

  1. What is the correct path and why it's unable to load that file?
  2. I need to add few other prerequisites as well so how do I know the right directories for them? (sqlncli.msi, sqllocaldb.msi, sqlcmdlnutils.msi)
  3. And it is asking for x64 and x86 setup files separately so how do I handle that?

Environment Detail:

  • Window 8 Single Language
  • Visual Studio 2015 (Enterprise)
  • SQL Server 2017

Solution

  • Instead of copying to bootstrapper under Microsoft SDKs folder,You need to copy the downloaded prerequisites to packages folder Bootstrapper under Microsoft Visual Studio 14.0. example

    32-bit system:

    C:\Program Files\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages
    

    64-bit system:

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages
    

    Check your system for relevant path:

    More details at following link: https://msdn.microsoft.com/en-us/library/hh873130.aspx

    For all of other prerequisite, make sure to copy it to \packages\{prerequisite} folder. And if it asks for x64 and x86 files separately then create sub-directory like:

    Bootstrapper\Packages\SqlLocalDB2012\x64         (for 64-bit)
    Bootstrapper\Packages\SqlLocalDB2012\x86         (for 32-bit)