5

I need to create a windows installer for a project built with .NET 4.7.

Visual Studio 2015 had an "Project Setup" project type, which is not present in VS 2017 anymore.

I've just found out about the official extention: Microsoft Visual Studio 2017 Installer Projects

The problem is, at the "prerequisites" section, there is no option for .NET 4.7 (see below)

enter image description here

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
Pedro Henrique
  • 680
  • 7
  • 22
  • You don't have the bootstrapper files. They are located in C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages. I don't have them either, the 4.7 release was horribly fumbled and Microsoft doesn't seem to have any employees left that still knows how this works. Maybe a VS2017 update will get them, you'd have to try. If you don't feel confident about creating them yourself I'd have to recommend you either do without the prereq or target a lesser version. Not forcing your user to update (they will have to) is the better approach. – Hans Passant Jul 26 '17 at 07:55

2 Answers2

5

This question was answered at: https://blogs.msdn.microsoft.com/dotnet/2017/04/05/announcing-the-net-framework-4-7/

You can get the .NET 4.7 in Prerequisites of VS 2015 by installing the 4.7 Dev Pack (https://www.microsoft.com/en-us/download/details.aspx?id=55168).

For VS 2017, the same option will be made available in future version of Visual Studio 2017 updates. But, as a workaround you can make the same to appear by copying the VS 2015 ‘DotNetFX47’ folder to Microsoft SDKs location, after installing the 4.7 Dev Pack.

Copy folder ‘DotNetFX47’ from “…\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\” to “…\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\”.

dat3450
  • 954
  • 3
  • 13
  • 27
  • 1
    You have to have Visual Studio 2015 installed for it work. This is pretty crappy solution. Maybe Microsoft could just release an installer for there latest framework that actually works with their latest IDE. – Ben Aug 21 '17 at 17:27
0

On a thread from VisualStudio.com, "Merrie McGaw [MSFT]" said that this will be fixed in the upcoming Visual Studio 15.5 release. Until then, there are also instructions on how to force the .NET 4.7 Dev Pack installer to install the bootstrapper files even if you don't have Visual Studio 2015 installed by creating with a registry key:

Create HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\GenericBootstrapper\14.0 (64-bit machines) or HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\GenericBootstrapper\14.0 (32-bit machines). Then you can copy the DotNetFX47 folder from C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\ to C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages\.

Shortcut: Download the DotNetFX47 files directly. It's not an official Microsoft link, but the files look ok to me. Up to you whether you trust it. Checksum info of the file as I viewed it is below if you want to verify it:

Checksum info:
Name: DotNetFX47.zip
Size: 66985 bytes
SHA256: 456F7CC34D69747CE6D6312C5435967F8F4076A0B3DE5F80CDA9CBB24CFFED30

Marcus L
  • 463
  • 4
  • 7