Created
August 21, 2019 05:46
-
-
Save stknohg/a37f54751f2fcdb1a43c2c8456f2ef76 to your computer and use it in GitHub Desktop.
最新バージョンの.NET Core SDKをインストーラーからインストールするスクリプト (x64)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # 最新バージョンの.NET Core SDKをインストーラーからインストールするスクリプト | |
| # ※1 インストーラーのインストールは要管理者権限です | |
| # ※2 Zipファイルからの展開は公式の dotnet-install.ps1 を使いましょう | |
| # https://docs.microsoft.com/ja-jp/dotnet/core/tools/dotnet-install-script | |
| # | |
| # 現在最新の.NET Core SDKのバージョンを取得 | |
| $commitHash, $version = -split (Invoke-RestMethod -Uri https://dotnetcli.azureedge.net/dotnet/Sdk/Current/latest.version) | |
| # MSIインストーラーをダウンロードしてサイレントインストール | |
| $msiPath = Join-Path $env:TEMP "dotnet-sdk-$version-win-x64.exe" | |
| Invoke-WebRequest -Uri "https://dotnetcli.azureedge.net/dotnet/Sdk/$version/dotnet-sdk-$version-win-x64.exe" -OutFile $msiPath | |
| & $msiPath /install /passive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment