【发布时间】:2021-06-14 19:14:30
【问题描述】:
问这个问题真是令人沮丧。我正在尝试下载“runtime-aspnetcore-5.0.4-windows-hosting-bundle-installer”。为此,我正在使用这些简单的 PowerShell 命令 -
$temp_path = "C:\temp1"
$wh_installer_url = "https://dotnet.microsoft.com/permalink/dotnetcore-current-windows-runtime-bundle-installer"
$wh_installer_file = $temp_path + [System.IO.Path]::GetFileName( $wh_installer_url )
Invoke-WebRequest -Uri $wh_installer_url -OutFile $wh_installer_file
主要问题是“$wh_installer_url”。我找不到下载文件的正确链接。我查看了“https://dotnet.microsoft.com/download/dotnet/5.0”。似乎有一个托管捆绑包的链接。但是在检查它时,我发现它指向“谢谢”页面。然后我查看了 Microsoft 文档并找到了这个链接。显然,它还下载了一个页面,该页面不是安装程序,但很可能是“谢谢”页面。 我需要一个 PowerShell 命令或一堆命令来下载 .Net Core 5.0.4 Hosting Bundle Installer。
【问题讨论】:
-
在感谢页面上有一个带有“直接链接”的框 (download.visualstudio.microsoft.com/download/pr/…) 您可以将其用作 $wh_installer_url。
标签: powershell asp.net-core .net-core iis-8 powershell-4.0