【问题标题】:Powershell Command for downloading .Net Core 5.0.4 Hosting Bundle Installer用于下载 .Net Core 5.0.4 Hosting Bundle Installer 的 Powershell 命令
【发布时间】: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。

【问题讨论】:

标签: powershell asp.net-core .net-core iis-8 powershell-4.0


【解决方案1】:

官方的做法是,

  1. 使用the full index JSON 确定您可能需要的主要版本。
  2. 使用特定于版本的 JSON 来了解您应该检查的实际补丁版本和相关下载链接,例如 this .NET 5 specific file

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-09
    • 2021-06-16
    • 2016-10-30
    相关资源
    最近更新 更多