使用 Windows Server 2012 R2 或 Windows Server 2016系统,发如今安装 .net 3.5.1 时报错,报错内容以下:html
找不到安装源文件。post
能够经过以下 PowerShell 脚本进行安装:spa
输入以下脚本后回车执行:.net
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -NameUseWUServer -Value 0
Restart-Service -Name wuauserv
Install-WindowsFeature Net-Framework-Core
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -NameUseWUServer -Value 1
Restart-Service -Name wuauserv