Fix build not detecting dotnet version

This commit is contained in:
Alex Barney 2018-12-09 14:44:16 -06:00
parent bb14125542
commit da9ecaec98
2 changed files with 4 additions and 1 deletions

3
.gitignore vendored
View File

@ -260,3 +260,6 @@ paket-files/
__pycache__/
*.pyc
**/launchSettings.json
global.json

View File

@ -45,7 +45,7 @@ try {
}
# If dotnet is installed locally, and expected version is not set or installation matches the expected version
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
(!(Test-Path variable:DotNetVersion) -or $(& cmd /c 'dotnet --version 2>&1') -eq $DotNetVersion)) {
(!(Test-Path variable:DotNetVersion) -or $(& cmd.exe /c 'dotnet --version 2>&1') -eq $DotNetVersion)) {
$env:DOTNET_EXE = (Get-Command "dotnet").Path
}
else {