Skip to content

Commit

Permalink
Add VS2019 as an option
Browse files Browse the repository at this point in the history
  • Loading branch information
tats-u committed Dec 8, 2019
1 parent 43cdada commit bc04d5d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 19 deletions.
40 changes: 24 additions & 16 deletions Code/Add-NgenPdbs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,47 +84,55 @@ https://github.com/Wintellect/WintellectPowerShell
}

$vsVersion = $null
$symPath = $symServs["VS 2017"]
$symPath = $symServs["VS 2019"]
if ($null -eq $symPath)
{
$symPath = $symServs["VS 2015"]
$symPath = $symServs["VS 2017"]
if ($null -eq $symPath)
{
$symPath = $symServs["VS 2013"]
$symPath = $symServs["VS 2015"]
if ($null -eq $symPath)
{
# Pull it out of _NT_SYMBOL_PATH. Yes this is only looking at the
# first cache directory specified.
$symPath = $symServs["_NT_SYMBOL_PATH"]
$symPath = $symServs["VS 2013"]
if ($null -eq $symPath)
{
throw "No symbol server configured"
}
else
{
if ($symPath -match "SRV\*(?<SymCache>[^*]*)\*(?:.*)\;?")
# Pull it out of _NT_SYMBOL_PATH. Yes this is only looking at the
# first cache directory specified.
$symPath = $symServs["_NT_SYMBOL_PATH"]
if ($null -eq $symPath)
{
$symPath = $Matches["SymCache"]
throw "No symbol server configured"
}
else
{
throw "_NT_SYMBOL_PATH environment variable does not specify a symbol cache"
if ($symPath -match "SRV\*(?<SymCache>[^*]*)\*(?:.*)\;?")
{
$symPath = $Matches["SymCache"]
}
else
{
throw "_NT_SYMBOL_PATH environment variable does not specify a symbol cache"
}
}
}
else
{
$vsVersion = "2013"
}
}
else
{
$vsVersion = "2013"
$vsVersion = "2015"
}
}
else
{
$vsVersion = "2015"
$vsVersion = "2017"
}
}
else
{
$vsVersion = "2017"
$vsVersion = "2019"
}

if ($null -ne $vsVersion)
Expand Down
5 changes: 3 additions & 2 deletions Code/Import-VisualStudioEnvironment.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#requires -version 5.0
#requires -version 5.0
###############################################################################
# WintellectPowerShell Module
# Copyright (c) 2010-2017 - John Robbins/Wintellect
Expand Down Expand Up @@ -66,7 +66,7 @@ https://github.com/Wintellect/WintellectPowerShell
param
(
[Parameter(Position=0)]
[ValidateSet("Latest", "2013", "2015", "2017")]
[ValidateSet("Latest", "2013", "2015", "2017", "2019")]
[string] $VSVersion = "Latest",
[Parameter(Position=1)]
[ValidateSet("x86", "amd64", "arm")]
Expand Down Expand Up @@ -109,6 +109,7 @@ https://github.com/Wintellect/WintellectPowerShell
"2013" { "12.0" }
"2015" { "14.0" }
"2017" { "15.0" }
"2019" { "16.0" }
default { throw "Unknown version of Visual Studio!" }
}

Expand Down
2 changes: 1 addition & 1 deletion Code/SymbolsSource.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Set-StrictMode -version Latest
# Script Global Variables
###############################################################################
# The array that contains all the versions.
$script:vsVersionArray = "2012", "2013", "2015", "2017"
$script:vsVersionArray = "2012", "2013", "2015", "2017", "2019"

###############################################################################
# Module Only Functions
Expand Down

0 comments on commit bc04d5d

Please sign in to comment.