Created
February 27, 2018 09:12
-
-
Save RichieBzzzt/c88b1a35374e9a845b37687bfdba24ff to your computer and use it in GitHub Desktop.
This file contains 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
#azfun init MyFunctionProj | |
if ((Test-Path "C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0") -eq $false) { | |
Write-Host "No Net Core 2.0 SDK installed. Installing..." | |
$NetCore = "C:\Users\richardlee\Downloads\dotnet-sdk-2.0.0-win-x64.exe" | |
$NetCoreArgs = {/install /quiet /norestart} | |
$process = Start-Process -Verb RunAs -Filepath $NetCore -ArgumentList $NetCoreArgs -Wait -PassThru | |
Write-Host "Exit code: $($process.ExitCode)" | |
if ($process.ExitCode -ne 0 ){ | |
Write-Error "Oh dear!" | |
Throw | |
} | |
} | |
else { | |
Write-Host ".Net Core 2.0 Installed..." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment