本文說明如何新增您的 ClickOnce 應用程式的.NET Framework 4.6.1 的 Microsoft.NET Framework 4.6.1,以在 Microsoft Visual Studio 的 2015年必備的項目。
Microsoft Visual Studio 2015年更新 1 並不包含可以更新必要條件元件清單,在 Visual Studio 的 2015年中的.NET Framework 4.6.1 ClickOnce 啟動載入器套件。您可以使用因應措施中 < 其他資訊="" 」="" 一節來更新以包含.net="" framework="" 4.6.1="" 可用的必要條件清單。下列步驟新增所需的檔案,可讓="" visual="" studio="" 提供.net="" framework="" 4.6.1="" 中的項目必要條件的="">
更多的資訊
如果您有新增至您的 ClickOnce 應用程式的.NET Framework 4.6.1 必要條件,您可以使用現有的.NET Framework 4.6 封裝,做為基準。若要新增的項目,請依照下列步驟執行︰
-
找出下列資料夾︰
%程式檔案 (x86)%\Microsoft Visual Studio 的 14.0\SDK\Bootstrapper\Packages
-
建立一份 [DotNetFX46] 資料夾和其所有內容。將資料夾命名為新DotNetFX461。
-
系統管理員身份啟動 Visual Studio。
-
開啟下列檔案︰
%程式檔案 (x86)%\Microsoft Visual Studio 的 14.0\SDK\Bootstrapper\Packages\DotNetFX461\Product.xml
-
XML 中進行以下的取代項目︰
-
更新的產品代碼︰
從<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode=".NETFramework,Version=v4.6">
若要
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode=".NETFramework,Version=v4.6.1">
-
更新套件檔案項目︰
從<!-- 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>若要
<!-- 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> -
更新相關的產品資料 」 區段︰
從<RelatedProducts> <IncludesProduct Code=".NETFramework,Version=v4.5.1" />
<IncludesProduct Code=".NETFramework,Version=v4.5.2" />
</RelatedProducts>若要
<RelatedProducts> <IncludesProduct Code=".NETFramework,Version=v4.6" />
</RelatedProducts> -
更新的 XML SameSite 案例︰
-
更新在安裝期間執行的命令時的版本的.NET Framework不包含作業系統的一部分︰
Commands:
從<!--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">
若要
<!--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">
偵測邏輯︰
從<!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="393297" />
若要
<!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="394271" />
-
更新在安裝期間執行的命令時的版本的.NET Framework會包含作業系統的一部分︰
命令︰
從<!--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">
若要
<!--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">
偵測邏輯︰
從<!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="393297" />
若要
<!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="394271" />
略過 Windows 10 較新版本的系統
從<!-- Skip install if OS is Win10 or above --><BypassIf Property="VersionNT" Compare=" ValueGreaterThanOrEqualTo " Value="10.0.0" />
若要
<!-- Skip install if OS is above Win10--><BypassIf Property="VersionNT" Compare="VersionGreaterThan" Value="10.0.0" />
注意如果您想要完整啟用 SameSite 案例,您必須下載 < 插入 FWLink > 從可執行檔,並將它儲存到相同的資料夾,您可以在其中儲存此 <產品>.xml 檔案。
-
-
請 HomeSite 案例相同的更新︰
-
更新在安裝期間執行的命令時的版本的.NET Framework不包含作業系統的一部分︰
命令︰
從<!-- 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">若要
<!--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">
偵測邏輯︰
從<!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="393297" />
若要
<!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="394271" />
-
更新在安裝期間執行的命令時的版本的.NET Framework會包含作業系統的一部分︰
命令︰
從<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">若要
<!--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">
偵測邏輯︰
從<!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="393297" />
若要
<!-- This indicates .NET Framework Full is already installed --><BypassIf Property="DotNet46Full_Release" Compare="ValueGreaterThanOrEqualTo" Value="394271" />
略過的系統,這是較新版本比Windows 10:
從<!-- Skip install if OS is Win10 or above --><BypassIf Property="VersionNT" Compare=" ValueGreaterThanOrEqualTo " Value="10.0.0" />
若要
<!-- Skip install if OS is above Win10--><BypassIf Property="VersionNT" Compare="VersionGreaterThan" Value="10.0.0" />
-
-
-
更新每個想要當地語系化的語言 Package.XML。這個步驟會使用英文做為範例。重複此步驟,為每個您想要支援的語言。
-
(為系統管理員可以在 Visual Studio) 中開啟下列檔案︰
%程式檔案 (x86)%\Microsoft Visual Studio 的 14.0\SDK\Bootstrapper\Packages\DotNetFX451\en\Package.xml
-
請進行下列更新︰
-
更新在 Homesite 的情況下下載檔案
從<String Name="DotNetFX46FullWebBootstrapper">http://go.microsoft.com/fwlink/?linkid=528222&clcid=0x409</String>
若要
<String Name="DotNetFX461FullWebBootstrapper">http://go.microsoft.com/fwlink/?linkid=671728&clcid=0x409</String>
-
使用 [尋找/取代"Microsoft.NET Framework 4.6"到"Microsoft.NET Framework 4.6.1"的所有項目更新所有的字串。
-
注意如果您的應用程式不支援的語言,請刪除對應的資料夾,以不支援的語言。例如,如果您的應用程式不應該以法文當地語系化,您可以將 [\fr] 資料夾刪除您 DotNetFX461 啟動載入器套件資料夾下。
-
.NET Framework 4.6.1 前提之一就是現在準備好可供。若要執行這項操作,請參考下列步驟:
-
開啟您的 ClickOnce 應用程式專案。
-
在 [發行] 索引標籤上按一下 [必要條件] 按鈕,然後按一下.NET Framework 4.6.1 項目。
先決條件
若要套用此因應措施,您必須使用 Microsoft 安裝 Visual Studio 2015年。
適用於
本文適用於下列產品︰
-
Microsoft Visual Studio 2015
支援的作業系統︰
-
Windows 7 SP1 (x 86 和 x64)
-
Windows 8 (x86 和 x64)
-
Windows 8.1 (x86 和 x64)
-
Windows 10 (x86 和 x64)
-
Windows Server 2008 R2 SP1 (x64)
-
Windows Server 2012 (x64)
-
Windows Server 2012 R2 (x64)