Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 801
Greylander Avatar asked Feb 25 '15 01:02

Greylander


10 Answers

Visual Studio 2017 path has changed again - go with

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

like image 86
michal krzych Avatar answered Sep 25 '22 14:09

michal krzych


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\

like image 27
Roman O Avatar answered Sep 23 '22 14:09

Roman O


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

like image 44
Mohammad Atiour Islam Avatar answered Sep 26 '22 14:09

Mohammad Atiour Islam


Put it in this folder:

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\DotNetFX45
like image 25
Waqar Khan Avatar answered Sep 25 '22 14:09

Waqar Khan


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.

like image 31
dufi Avatar answered Sep 23 '22 14:09

dufi


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.

like image 25
Conair Avatar answered Sep 26 '22 14:09

Conair


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

like image 32
Jaydip Kanpariya Avatar answered Sep 22 '22 14:09

Jaydip Kanpariya


Paste it in here. It worked for me.

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

like image 23
skyvil Avatar answered Sep 26 '22 14:09

skyvil


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://docs.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

like image 36
mili Avatar answered Sep 26 '22 14:09

mili


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.

like image 24
NotSoBrainy Avatar answered Sep 24 '22 14:09

NotSoBrainy