Permalink
Browse files

Update scripts to VS2017 environment

  • Loading branch information...
tomasr committed Mar 9, 2017
1 parent 44bb8ef commit b6fbb3eeffe3a4d9b4c6a07ddc81a4bf18f40c32
Showing with 9 additions and 4 deletions.
  1. +1 −1 .profile.ps1
  2. +8 −3 scripts/DevEnvironment/DevEnvironment.psm1
View
@@ -46,7 +46,7 @@ append-path "$($env:WINDIR)\system32\inetsrv"
# using https://github.com/Iristyle/Posh-VsVars
#Set-VsVars -Version '12.0'
Import-Module ~/scripts/DevEnvironment
Set-DevEnvironment 12
Set-DevEnvironment 15
& "$SCRIPTS\javaenv.ps1"
#
@@ -43,8 +43,13 @@ function Import-Environment() {
function Set-DevEnvironment() {
param ( [string]$version = $(throw "Need a VS version"))
$vsPath = "Microsoft Visual Studio $version.0\VC\vcvarsall.bat"
$target = join-path (Get-ProgramFiles32) $vsPath
. Import-Environment $target
if ( $version -eq 15 ) {
$vsPath = Join-Path (Get-ProgramFiles32) "Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"
. Import-Environment $vsPath
} else {
$vsPath = "Microsoft Visual Studio $version.0\VC\vcvarsall.bat"
$target = join-path (Get-ProgramFiles32) $vsPath
. Import-Environment $target
}
}

0 comments on commit b6fbb3e

Please sign in to comment.