Windows-Server-2012-R2

無法在 Windows Server 2012 R2 Core 上安裝 .NET Framework 4.6

  • February 9, 2016

使用離線安裝程序 ( https://www.microsoft.com/en-us/download/details.aspx?id=48137 ) 在 Windows Server 2012 R2 Core 機器上安裝 .NET 4.6 時,返回以下錯誤:

Problem signature:
Problem Event Name: VSSetup
Problem Signature 01:   Microsoft .NET Framework 4.6 Setup
Problem Signature 02:   4.6.00081
Problem Signature 03:   14.0.81.0
Problem Signature 04:   1
Problem Signature 05:   unknown
Problem Signature 06:   None_UI_Interactive_Crash
Problem Signature 07:   0xc000008c
Problem Signature 08:   0
Problem Signature 09:   unknown
OS Version: 6.3.9600.2.0.0.272.7
Locale ID:  1033

我還嘗試使用巧克力安裝 .NET 4.6。以下錯誤輸出到生成的日誌:

[11/3/2015, 10:26:0]Launching Download and Install operations simultaneously.
[11/3/2015, 10:26:0] Action: Downloading and/or Verifying Items
[11/3/2015, 10:26:0]All buttons hidden in passive mode
[11/3/2015, 10:26:0]Verifying Digital Signatures: C:\9cc6764dbba6d31323a799ae35\SetupUtility.exe
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 1
[11/3/2015, 10:26:0] C:\9cc6764dbba6d31323a799ae35\SetupUtility.exe: Verifying signature for SetupUtility.exe
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 2
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 3
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 4
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 5
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 6
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 7
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 8
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 9
[11/3/2015, 10:26:0]LoadImage failed for rotation icon 10

我可以在 Windows Server 2012 R2 的完整(gui)版本上成功安裝 .NET 4.6。

更新:從 Full Win Server 2012 R2 實例中刪除 windows 功能使用者界面基礎設施後,會產生與核心實例上發生的相同的錯誤。

這兩個伺服器都作為 AWS 實例執行,並使用 Amazon 自己的 AMI。

.NET 4.6 和 4.6.1 安裝程序都嘗試使用 Server Core 上不可用的 GUI 功能並崩潰。即使在被動模式下也會發生這種情況。幸運的是,完全安靜的安裝工作:

NDP46-KB3045557-x86-x64-AllOS-ENU.exe /q

或者

NDP461-KB3102436-x86-x64-AllOS-ENU.exe /q

/norestart如果您不希望伺服器自動重新啟動,請添加)

我的解決方案如下:

  1. 手動提取 [離線安裝程序| 中的所有文件] https://www.microsoft.com/en-us/download/details.aspx?id=48137]使用7zip.
  2. 執行dism.exe為 Win Server 2012 Core 64-Bit 添加相應的包。

這是我使用的腳本。注意該腳本會為 Windows Server 2012 64 位安裝適當的軟體包,並且尚未在 Win RT 或 32 位系統上進行測試:

# Installs the .Net 4.6 onto Windows Server 2012 Core instances.
# Running the exe causes an error due to the User-Interfaces-Infra feature not being installed
$ErrorAction = "Stop"

# Download URL has been pulled from the Chocolatey DotNet4.6 install script
$downloadUrl = "http://download.microsoft.com/download/C/3/A/C3A5200B-D33C-47E9-9D70-2F7C65DAAD94/NDP46-KB3045557-x86-x64-AllOS-ENU.exe"
$fileDestination = "c:\dotnet46.exe"
$extractDir = "c:\dotnet46"

(New-Object net.webclient).DownloadFile($downloadUrl, $fileDestination)

& 7z.exe e -y -o"$extractDir" "$fileDestination"

dism.exe /online /norestart /add-package /PackagePath:$extractDir\x64-Windows8.1-KB3045563-x64.cab

引用自:https://serverfault.com/questions/733596