How to "enable 'Download prerequisites from the same location as my application'"
Asked Answered
A

12

26

tl;dr Visual Studio 2013 Creating a plain installer, project template: Other Project Types > Visual Studio Installer > Setup Project

There's gotta be something simple I'm missing. I've got the installers (i.e NDP451-KB2858728-x86-x64-AllOS-ENU.exe) for my prerequisites downloaded, how hard can it be to tell Visual Studio where to find them (or to put them where it naturally will look)?

=================================================

Got everything working, except for incorporating prerequisites.

I have google this, found some other stack exchange articles, but nothing quite answers the question.

I have created a plain "Setup Project" with some prerequisites, which I want bundled with the installer (no downloading by the end user at install time). I get this error:

Error 1 To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'DotNetFX45\dotNetFx45_Full_x86_x64.exe' for item 'Microsoft .NET Framework 4.5 (x86 and x64)' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883. d:\junk\installerWalkthrough\Setup1\Setup1.vdproj Setup1

This is pretty clear.

EXCEPT: after I download it, where do I put it so Visual Studio knows where to find it to include it in the build of the setup project?

I've looked for some option/properties to specify a path to the setup files for prerequisites, no luck. If I go to the url mentioned in the error message, it goes on about "clickonce" and other types of install. Nothing about plain "Setup Project" type of install. And the instructions about where to put the downloaded file are as clear as mud, seem to be specific for win version 8.1A, but if you go down into "C:\Program Files (x86)\Microsoft SDKs\Windows\" there are many different win version listed as subfolders, some with a bootstrapper folder, others not, etc.

I tried putting NDP451-KB2858728-x86-x64-AllOS-ENU.exe in C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\DotNetFX451\en which seems to be where (url from error message) is telling me to put it, but VS does not find it on build.

There's gotta be something simple I'm missing. I've got the installers for my prerequisites downloaded, how hard can it be to tell Visual Studio where to get them?

Aland answered 25/2, 2015 at 1:12 Comment(0)
R
17

That works for VS 2017-2019 and .Net 4.7.2:

Put the file into:

C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX472\

Retrocede answered 6/11, 2018 at 16:36 Comment(3)
Had the same issue. Apparently it pays no regard to the locale and just wants the file to be in the root DotNetFX472 folder. Uhg.Georama
thanks, this folder works for vs2019 also "C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX472"Omit
Same issue here with VS2019 and .NET 4.8. Put the ndp48-x86-x64-allos-enu.exe file into "C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX48\" folder. It solved my problem.Lanky
C
15

Visual Studio 2017 path has changed again - go with

C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\vcredist_x64

Clubby answered 12/9, 2017 at 14:1 Comment(2)
A round of applause for the savior here, thanks mate I was really stuckNik
Works in 2019. Use whatever package name matches your deployment requirements.Stated
L
11

There is 2 solution: 1. Download the file which visual studio given error. in your case it is

http://www.microsoft.com/en-us/download/details.aspx?id=40779

and past the file in to this path

enter image description here

also set the prerequist

enter image description here

Step 2:

https://msdn.microsoft.com/en-us/library/hh873130%28v=vs.110%29.aspx

Legislator answered 12/8, 2015 at 12:47 Comment(1)
Note that for VS 2015 the path is different, make sure to select 2015 on the MSDN page.Carlinecarling
T
8

Put it in this folder:

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\DotNetFX45
Tessie answered 17/3, 2015 at 19:42 Comment(0)
L
3

Try this

Download file

https://download.microsoft.com/download/6/E/4/6E48E8AB-DC00-419E-9704-06DD46E5F81D/NDP472-KB4054530-x86-x64-AllOS-ENU.exe

This file move to C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX472 this loacation

Leishmaniasis answered 5/10, 2020 at 6:7 Comment(0)
I
2

In my case, I need to install a VSTO in Windows 10.

First I download the redistributable package from Microsoft to:

C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX461

Then I copy all folder included to C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\Bootstrapper\Packages\DotNetFX461.

The redistributable package for VSTO I have downloaded to C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\VSTOR40. Then I have published from VS2017 and it works.

Ingles answered 20/6, 2019 at 23:58 Comment(0)
T
2

I tried all the above answers without success using VS 2019 and Windows 7. What eventually worked for me was to put each of the prerequisite files in their specific folder in C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\*.

For eg: The DotNetFX472 package needed to be in:C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX472\NDP472-KB4054530-x86-x64-AllOS-ENU.exe

Sql LocalDB 2012 files needed some tinkering, it required both the x64 and x86 files, this is what worked for me:

  • x64: C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\SqlLocalDB2012\x64\SqlCmdLnUtils.msi,C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\SqlLocalDB2012\x64\SqlLocalDB.msi, and C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\SqlLocalDB2012\x64\sqlncli.msi.
  • And similarly for x86: C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\SqlLocalDB2012\x86\SqlCmdLnUtils.msi,C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\SqlLocalDB2012\x86\SqlLocalDB.msi, and C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\SqlLocalDB2012\x86\sqlncli.msi.

I hope this saves you some time.

Tenderhearted answered 13/6, 2020 at 13:55 Comment(0)
S
1

Paste it in here. It worked for me.

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

Savoy answered 8/5, 2017 at 19:19 Comment(0)
O
1

You can download the corresponding version from the here and put it in the correct folder for example...

I got this error To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'DotNetFX452\NDP452-KB2901907-x86-x64-AllOS-ENU.exe' for item 'Microsoft .NET Framework 4.5.2 (x86 and x64)' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=616018

Then I downloaded .NET Framework 4.5.2 for all operating systems offline installer from https://learn.microsoft.com/en-us/dotnet/framework/deployment/deployment-guide-for-developers and copied into C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\DotNetFX452. then every thing works fine

Omit answered 10/5, 2018 at 7:28 Comment(0)
S
1

Add it to "C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX45" Apparently, you have to find the folder which matches your .Net Framework in ClickOnce Bootstrapper folder. In my case, it is DotNetFX452 as I used the .Net Framework 4.5.2. In your case, it should be DotNetFX45.

Stallion answered 26/8, 2019 at 22:55 Comment(0)
I
0

Those answers are wrong. What you want to do is to include all the files necessary for your application to work within your setup package. They're telling you to go to your own computer and install those by hand. Read this from Microsoft instead:

https://msdn.microsoft.com/en-us/library/hh873130.aspx

Is answered 10/3, 2017 at 19:37 Comment(0)
N
0
  • first: go to C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX472\en open packages.xml
  • second : find out the string with LinkId copy that link paste it on browser. You will asked to download/save a file. Download it. (If it shows error, please dont mind to connect vpn).
  • Third: Copy the downloaded file to this location C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\DotNetFX472
  • Fourth You have to rename the file according to your error name . In my case: I have to rename it from NDP472-KB4054531-Web.exe to NDP472-KB4054530-x86-x64-AllOS-ENU.exe
  • Fifth Now build and publish your project. Thank you.
Nainsook answered 26/9, 2020 at 20:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.