2

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
Alena
  • 1,134
  • 6
  • 19
  • 45
  • Are you using clickonce? – Alex Aug 23 '17 at 06:48
  • yes, I am using clickonce – Alena Aug 23 '17 at 06:57
  • Can you use nuget packets instead for the sql client and local db ,it saves a lot of work – Shemeer BK Aug 23 '17 at 06:58
  • @ShemeerBK I am not sure about nuget packets. What I want is to create a database application which works on any system without installing sql server separately. I did some search and found that express db fits my needs and it just require some prerequisites and I was trying that in test application. Please give me some guideline about local db OR maybe any internet resource so i can follow and learn. – Alena Aug 23 '17 at 07:02
  • Is your database in a server? or is it just a local instance of express db? – Shemeer BK Aug 23 '17 at 07:05
  • currently it's on server – Alena Aug 23 '17 at 07:09
  • @Alena ,Go to Manage nuget packets in the VS 2017 and search for System.Data.SqlClient, install this package to your solution and you would not need to either reference or install it separately in the destination computer. – Shemeer BK Aug 23 '17 at 07:13
  • I don't understand the connection between nuget packet with prerequisites. But I installed that package and try to publish and stuck on same errors. FYI, I am using VS 2015; NOT 2017 – Alena Aug 23 '17 at 07:33
  • Not a duplicate as it is for installer projects not ClickOnce, but maybe the suggested answer might point you in the right direction: https://stackoverflow.com/questions/43558607/how-to-add-net-framework-prerequisite-to-setup-install – Toby Aug 23 '17 at 08:45

1 Answers1

2

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)
Atlas_Gondal
  • 2,512
  • 2
  • 15
  • 25
Munawar
  • 2,588
  • 2
  • 26
  • 29
  • Awesome, it works. I would be more than happy, if you share additional detail like mostly people mentioned under `Microsoft SDKs` folder but that doesn't work. One more question, how can I make it one click installation like there's one setup file and it installs everything required automatically. – Alena Aug 23 '17 at 10:46