How to Create .Net Framework Prerequisites Entry in Microsoft Visual Studio 2015

Surprisingly Microsoft’s own Visual Studio 2015 Update 1 doesn’t include by default .NET Framework 4.6.1 ClickOnce Bootstrapper package, which is required to update the prerequisite components list in Visual Studio 2015. Although there is a workaround provided at the “More Information” section so that you can include the updated list of available prerequisites to get a package of .NET framework 4.6.1 included. And the steps in this article elaborate on how you can enable Microsoft visual studio 2015 to offer .NET framework 4.6.1 entry in prerequisite.

How to Create .Net Framework Prerequisites Entry in Microsoft Visual Studio 2015

To get the .NET Framework 4.6.1 as one of the prerequisites to ClickOnce Application, you can use the existing .NET Framework 4.6 package as a baseline. For doing so, follow given below steps carefully:

  • Open the following folder using “Run” dialog:

%Program Files (x86)%\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages

  • Copy and Paste DotNetFX46 the folder in the same path and rename new folder to DotNetFX461.
  • Open Microsoft Visual Studio as an Administrator.
  • Now locate the following file and open it:

  • Make following changes in the XML file:

How to Create .Net Framework Prerequisites Entry in Microsoft Visual Studio 2015

Update following product code from:

To

Now update following given package file entry from:

To

Update the related products section from:

<RelatedProducts>
<IncludesProduct Code=".NETFramework,Version=v4.5.1" />
<IncludesProduct Code=".NETFramework,Version=v4.5.2" />
</RelatedProducts>

To

<RelatedProducts>
<IncludesProduct Code=".NETFramework,Version=v4.6" />
</RelatedProducts>

Update following changes for SameSite scenarios:

The following change will update the command, which executes during the installation of Visual studio when the .NET framework is not included as a part of the operating system. Change from:

To

Update DetectionLogic in XML by updating from:

To

Now the following step will update the command, which executes during the installation when the .NET framework is included as part of the operating system. Change from:

To

Update DetectionLogic in XML by updating from:

To

Now instruct the command to Skip the system if it’s a later version than Windows 10. Update from:

To

P.S: In case if you require SameSite scenario to be fully enabled, you’ll have to download the executable file from <Insert FWLink> and save it in the same folder which has this modified <product>.xml file.

Now, let’s make some changes to HomeSite scenarios. The following step will update the command, which executes during the installation when the .NET framework is not included as part of the operating system. Change from:

To

Update DetectionLogic in XML by updating from:

To

The following step will update the command, which executes during the installation when the .NET framework is included as part of the operating system. Change from:

To

Update DetectionLogic in XML by updating from:

To

Now instruct the command to Skip the system if it’s a later version than Windows 10. Update from:

To

  • If localization is in your requirement set, then you need to update Package.xml for every language. For example, for including support for the English language, do the following steps:

Locate file at following given path and open it in Visual Studio with administrator access:

and make the following changes:

To update the file to be downloaded for Homesite scenarios, change from:

To

Find and replace all strings in the file with the text “Microsoft .NET Framework 4.6” and replace it with “Microsoft .NET Framework 4.6.1“.

P.S: If you don’t have a localization requirement or your application doesn’t support a language, then you can delete the corresponding folder to the unsupported language. E.g., if your application doesn’t support localization to the French language, then you can delete the \fr folder from the DotNetFX461 bootstrapper package folder.

  • Now you’re ready to run the ClickOnce application project. Open it.
  • Navigate to Publish Tab and click on the Prerequisites button and then click the .NET Framework 4.6.1 entry.

You can perform above steps on  Windows 7 SP1 (x86 and x64), Windows 8 (x86 and x64), Windows 8.1 (x86 and x64), Windows 10 (x86 and x64), Windows Server 2008 R2 SP1 (x64), Windows Server 2012 (x64), Windows Server 2012 R2 (x64).

RELATED ARTICLES

4 COMMENTS

    • Because people need to know what commands they’ll be running if provided in form of a file. So, this way user has the freedom of doing his own way and gains knowledge too in detail.

LEAVE A REPLY

Please enter your comment!
Please enter your name here