Greylander
Greylander

Reputation: 1826

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

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?

Upvotes: 26

Views: 43158

Answers (12)

Roman O
Roman O

Reputation: 3520

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\

Upvotes: 17

Jaydip Kanpariya
Jaydip Kanpariya

Reputation: 31

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

Upvotes: 3

Saleh Sayeem
Saleh Sayeem

Reputation: 119

  • 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.

Upvotes: 0

Conair
Conair

Reputation: 21

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.

Upvotes: 2

NotSoBrainy
NotSoBrainy

Reputation: 63

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.

Upvotes: 1

dufi
dufi

Reputation: 21

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.

Upvotes: 2

mili
mili

Reputation: 3802

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

Upvotes: 1

michal krzych
michal krzych

Reputation: 429

Visual Studio 2017 path has changed again - go with

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

Upvotes: 15

skyvil
skyvil

Reputation: 11

Paste it in here. It worked for me.

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

Upvotes: 1

M Duarte
M Duarte

Reputation: 1

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

Upvotes: 0

Mohammad Atiour Islam
Mohammad Atiour Islam

Reputation: 5708

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

Upvotes: 12

Waqar Khan
Waqar Khan

Reputation: 81

Put it in this folder:

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

Upvotes: 8

Related Questions