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

Surprisingly Microsoft own Visual Studio 2015 Update 1 doesn’t includes 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 are workaround provided at the “More Information” section, so that you can include the updates list of available prerequisite to get package of .NET framework 4.6.1 included. And the steps in this article elaborate 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 prerequisite to ClickOnce Application, you can use the exisiting .NET Framework 4.6 package as a baseline. For doing so, follow given below steps carefully:

  • Open following folder using “Run” dialog:

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

  • Copy and Paste DotNetFX46 folder in same path and rename new folder to DotNetFX461.
  • Open Microsoft Visual Studio as an Administrator.
  • Now locate 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:

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

To

Update DetectionLogic in XML by updating from:

To

Now following step will update the command which executes during the installation when .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. Following step will update the command which executes during the installation when .Net framework is not included as part of the operating system. Change from:

To

Update DetectionLogic in XML by updating from:

To

Following step will update the command which executes during the installation when .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 English language, do following steps:

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

and make following changes:

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

To

Find and replace all strings in the file with 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 French language, then you can delete the \fr folder from the DotNetFX461 bootstrapper package folder.

  • Now you’re ready to run ClickOnce application project. Open it.
  • Navigate to Publish Tab and click on 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).

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