How to create the .NET Framework 4.6.1 prerequisites entry in Microsoft Visual Studio 2015

This article describes how to add the prerequisite entry for the Microsoft .NET Framework 4.6.1 in Microsoft Visual Studio 2015 for your ClickOnce application for the .NET Framework 4.6.1.

Microsoft Visual Studio 2015 Update 1 doesn't include .NET Framework 4.6.1 ClickOnce bootstrapper package that can update the prerequisite components list in Visual Studio 2015. You can use the workaround in the "More Information section to update the list of available prerequisites to include the .NET Framework 4.6.1. These steps add the required files that enable Visual Studio 2015 to offer the .NET Framework 4.6.1 entry in the prerequisites.
More information
If you have to add the .NET Framework 4.6.1 prerequisite to your ClickOnce application, you can use the existing .NET Framework 4.6 package as a baseline. To add the entry, follow these steps:

  1. Locate the following folder:

    %Program Files (x86)%\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages
  2. Create a copy of the DotNetFX46 folder and all its contents. Name the new folder DotNetFX461.
  3. Start Visual Studio as an administrator.
  4. Open the following file:

    %Program Files (x86)%\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\DotNetFX461\Product.xml
  5. Make the following replacements in the XML:

    1. Update the Product Code:

      From
      <Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode=".NETFramework,Version=v4.6">
      To
      <Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode=".NETFramework,Version=v4.6.1">
    2. Update the Package File Entries:

      From
      <!-- Defines list of files to be copied on build --><PackageFiles CopyAllPackageFiles="false"><PackageFile Name="NDP46-KB3045557-x86-x64-AllOS-ENU.exe" HomeSite="DotNetFX46FullWebBootstrapper" PublicKey="3082010A028201010096715DED0646FA84CB9D5BB746C7B0E1B4113903ADB11573609CEBA7B66E1A3C3FFF65E334F1A6A5215E56996C58E492A10A5CC2D3DC522F0C659A20614053319C6C8F217DBAF9FE13505260953A5BB958A5746141A994E0AD264E4CA1977049275E7C67CA4F1E718446BC1D4BB6E20FC5C627C907E67A0AA51700194C7045382D81B450AAC567D1FA79BCC5CCA1729BF4253498F854DF123938122FA46BA59A7EC762D1DCCFED3D34F8B9DF3530BAEC7932A9E1A9AC554D4C7F4C56C3130B76F107F9CC47ACFB88D552A51E28FA3D2DCFCF849886716511CF85C9094486E16FE7B1FCAC4044A5A98B233F82499DD596595013591873FF430CAD2BD47F3040670203010001"/><PackageFile Name="NDP46-KB3045560-Web.exe" HomeSite="DotNetFX46FullWebBootstrapper" CopyOnBuild="False" PublicKey="3082010A028201010096715DED0646FA84CB9D5BB746C7B0E1B4113903ADB11573609CEBA7B66E1A3C3FFF65E334F1A6A5215E56996C58E492A10A5CC2D3DC522F0C659A20614053319C6C8F217DBAF9FE13505260953A5BB958A5746141A994E0AD264E4CA1977049275E7C67CA4F1E718446BC1D4BB6E20FC5C627C907E67A0AA51700194C7045382D81B450AAC567D1FA79BCC5CCA1729BF4253498F854DF123938122FA46BA59A7EC762D1DCCFED3D34F8B9DF3530BAEC7932A9E1A9AC554D4C7F4C56C3130B76F107F9CC47ACFB88D552A51E28FA3D2DCFCF849886716511CF85C9094486E16FE7B1FCAC4044A5A98B233F82499DD596595013591873FF430CAD2BD47F3040670203010001"/></PackageFiles>
      To
      <!-- Defines list of files to be copied on build --><PackageFiles CopyAllPackageFiles="false"><PackageFile Name="NDP461-KB3102436-x86-x64-AllOS-ENU.exe" HomeSite="DotNetFX461FullWebBootstrapper" PublicKey="3082010A028201010096715DED0646FA84CB9D5BB746C7B0E1B4113903ADB11573609CEBA7B66E1A3C3FFF65E334F1A6A5215E56996C58E492A10A5CC2D3DC522F0C659A20614053319C6C8F217DBAF9FE13505260953A5BB958A5746141A994E0AD264E4CA1977049275E7C67CA4F1E718446BC1D4BB6E20FC5C627C907E67A0AA51700194C7045382D81B450AAC567D1FA79BCC5CCA1729BF4253498F854DF123938122FA46BA59A7EC762D1DCCFED3D34F8B9DF3530BAEC7932A9E1A9AC554D4C7F4C56C3130B76F107F9CC47ACFB88D552A51E28FA3D2DCFCF849886716511CF85C9094486E16FE7B1FCAC4044A5A98B233F82499DD596595013591873FF430CAD2BD47F3040670203010001"/><PackageFile Name="NDP461-KB3102438-Web.exe" HomeSite="DotNetFX461FullWebBootstrapper" CopyOnBuild="False" PublicKey="3082010A028201010096715DED0646FA84CB9D5BB746C7B0E1B4113903ADB11573609CEBA7B66E1A3C3FFF65E334F1A6A5215E56996C58E492A10A5CC2D3DC522F0C659A20614053319C6C8F217DBAF9FE13505260953A5BB958A5746141A994E0AD264E4CA1977049275E7C67CA4F1E718446BC1D4BB6E20FC5C627C907E67A0AA51700194C7045382D81B450AAC567D1FA79BCC5CCA1729BF4253498F854DF123938122FA46BA59A7EC762D1DCCFED3D34F8B9DF3530BAEC7932A9E1A9AC554D4C7F4C56C3130B76F107F9CC47ACFB88D552A51E28FA3D2DCFCF849886716511CF85C9094486E16FE7B1FCAC4044A5A98B233F82499DD596595013591873FF430CAD2BD47F3040670203010001"/></PackageFiles>
    3. 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>
    4. Update the XML for SameSite scenarios:

      • Update the command that is run during the installation when the version of the .NET Framework is not included as part of the operating system:

        Commands:

        From
        <!--Command for downlevel and future Operating Systems where netfx is not integrated within OS.--><Command PackageFile="NDP46-KB3045557-x86-x64-AllOS-ENU.exe" Arguments=" /q /norestart /ChainingPackage FullX64Bootstrapper" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="2095870765">
        To
        <!--Command for downlevel and future Operating Systems where netfx is not integrated within OS.--><Command PackageFile="NDP461-KB3102436-x86-x64-AllOS-ENU.exe" Arguments=" /q /norestart /ChainingPackage FullX64Bootstrapper" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="2095870765">
        DetectionLogic:

        From
        <!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="393297" />
        To
        <!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="394271" />
      • Update the command that is run during the installation when the version of the .NET Framework is included as part of the operating system:

        Commands:

        From
        <!--Command for Operating Systems where netfx is integrated within OS.--><Command PackageFile="NDP46-KB3045557-x86-x64-AllOS-ENU.exe" Arguments=" /q /norestart /ChainingPackage FullX64Bootstrapper" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="2095870765">
        To
        <!--Command for downlevel and future Operating Systems where netfx is not integrated within OS.--><Command PackageFile="NDP461-KB3102436-x86-x64-AllOS-ENU.exe" Arguments=" /q /norestart /ChainingPackage FullX64Bootstrapper" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="2095870765">
        Detection Logic:

        From
        <!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="393297" />
        To
        <!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="394271" />
        Skip the system that is a later version than Windows 10

        From
        <!-- Skip install if OS is Win10 or above --><BypassIf Property="VersionNT" Compare=" ValueGreaterThanOrEqualTo " Value="10.0.0" />
        To
        <!-- Skip install if OS is above Win10--><BypassIf Property="VersionNT" Compare="VersionGreaterThan" Value="10.0.0" />
        Note If you want to fully enable the SameSite scenario, you have to download the executable from <Insert FWLink> and save it to the same folder in which you saved this <product>.xml file.
    5. Make the same updates for HomeSite scenarios:

      • Update the command that is run during the installation when the version of the .NET Framework is not included as part of the operating system:

        Commands:

        From
        <!-- Defines how to invoke the setup for the .NET Framework redist --><Commands Reboot="Immediate"><!--Command for downlevel and future Operating Systems where netfx is not integrated within OS.--><Command PackageFile="NDP46-KB3045560-Web.exe" Arguments=" /q /norestart /ChainingPackage FullX64Bootstrapper /lcid 1033" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="468232836">
        To
        <!--Command for downlevel and future Operating Systems where netfx is not integrated within OS.--><Command PackageFile=" NDP461-KB3102438-Web.exe" Arguments=" /q /norestart /ChainingPackage FullX64Bootstrapper /lcid 1033" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="468232836">
        DetectionLogic:

        From
        <!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="393297" />
        To
        <!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="394271" />
      • Update the command that is run during the installation when the version of the .NET Framework is included as part of the operating system:

        Commands:

        From
        <Commands Reboot="Immediate"><!--Command for Operating Systems where netfx is integrated within OS.--><Command PackageFile=" NDP46-KB3045560-Web.exe" Arguments=" /q /norestart /ChainingPackage FullX64Bootstrapper" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="2095870765">
        To
        <!--Command for downlevel and future Operating Systems where netfx is not integrated within OS.--><Command PackageFile=" NDP461-KB3102438-Web.exe" Arguments=" /q /norestart /ChainingPackage FullX64Bootstrapper" EstimatedInstalledBytes="437362964" EstimatedInstallSeconds="600" EstimatedTempBytes="2095870765">
        Detection Logic:

        From
        <!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="393297" />
        To
        <!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="394271" />
        Skip the systems that is a later version than Windows 10:

        From
        <!-- Skip install if OS is Win10 or above --><BypassIf Property="VersionNT" Compare=" ValueGreaterThanOrEqualTo " Value="10.0.0" />
        To
        <!-- Skip install if OS is above Win10--><BypassIf Property="VersionNT" Compare="VersionGreaterThan" Value="10.0.0" />
  6. Update the Package.XML for every language that you want to localize. This step uses English as an example. Repeat this step for each language that you want to support.

    1. Open the following file (as an administrator in Visual Studio):

      %Program Files (x86)%\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\DotNetFX451\en\Package.xml
    2. Make the following updates:

      • Update the file to be downloaded in Homesite scenarios
        From
        <String Name="DotNetFX46FullWebBootstrapper">http://go.microsoft.com/fwlink/?linkid=528222&amp;clcid=0x409</String>
        To
        <String Name="DotNetFX461FullWebBootstrapper">http://go.microsoft.com/fwlink/?linkid=671728&amp;clcid=0x409</String>
      • Use Find/Replace to update all strings all occurrences of "Microsoft .NET Framework 4.6" to "Microsoft .NET Framework 4.6.1".
    Note If your application doesn't support a language, delete the corresponding folder to the unsupported language. For example, if your application should not be localized to the French language, you can delete the \fr folder under your DotNetFX461 bootstrapper package folder.
The .NET Framework 4.6.1 prerequisite is now ready to be used. To do this, follow these steps:

  1. Open your ClickOnce application project.
  2. On the Publish tab, click the Prerequisites button, and then click the .NET Framework 4.6.1 entry.

Prerequisites

To apply this workaround, you must have Microsoft Visual Studio 2015 installed.

Applies to

This article applies to the following products:
  • Microsoft Visual Studio 2015
Supported operating systems:

  • 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)
Properties

Article ID: 3119510 - Last Review: 11/30/2015 19:03:00 - Revision: 1.0

Microsoft .NET Framework 4.6.1

  • kbqfe kbsurveynew kbfix kbexpertiseadvanced KB3119510
Feedback