首页 > Web开发 > 详细

微软.net installer源码解析

时间:2020-11-14 17:26:51      阅读:21      评论:0      收藏:0      [点我收藏+]

微软源码地址  dotnet/install-scripts/blob/master/src/dotnet-install.ps1

代码

   [string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet",
   [string]$UncachedFeed="https://dotnetcli.blob.core.windows.net/dotnet",
if ($NoCdn) {
    $AzureFeed = $UncachedFeed
}
 
    if ($Runtime -eq "dotnet") {
        $VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
    }
    elseif ($Runtime -eq "aspnetcore") {
        $VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version"
    }
    elseif ($Runtime -eq "windowsdesktop") {
        $VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
    }
    elseif (-not $Runtime) {
        if ($Coherent) {
            $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version"
        }
        else {
            $VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
        }
    }
获取版本号 
https://dotnetcli.azureedge.net/dotnet/Sdk/Current/latest.version
https://dotnetcli.azureedge.net/dotnet/Sdk/LTS/latest.version
 
安装包 原始地址
https://dotnetcli.azureedge.net/dotnet
cdn 地址
https://dotnetcli.blob.core.windows.net/dotnet
 
下载 https://dotnetcli.blob.core.windows.net/dotnet/Sdk/版本号/dotnet-sdk-版本号-win-x64.zip
例如
 https://dotnetcli.blob.core.windows.net/dotnet/Sdk/3.1.404/dotnet-sdk-3.1.404-win-x64.zip
 
可以获取所有版本的安装包
 
 

微软.net installer源码解析

原文:https://www.cnblogs.com/icetech/p/13973854.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!