Skip to content

Commit bc04d5d

Browse files
committed
Add VS2019 as an option
1 parent 43cdada commit bc04d5d

File tree

3 files changed

+28
-19
lines changed

3 files changed

+28
-19
lines changed

Code/Add-NgenPdbs.ps1

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,47 +84,55 @@ https://github.com/Wintellect/WintellectPowerShell
8484
}
8585

8686
$vsVersion = $null
87-
$symPath = $symServs["VS 2017"]
87+
$symPath = $symServs["VS 2019"]
8888
if ($null -eq $symPath)
8989
{
90-
$symPath = $symServs["VS 2015"]
90+
$symPath = $symServs["VS 2017"]
9191
if ($null -eq $symPath)
9292
{
93-
$symPath = $symServs["VS 2013"]
93+
$symPath = $symServs["VS 2015"]
9494
if ($null -eq $symPath)
9595
{
96-
# Pull it out of _NT_SYMBOL_PATH. Yes this is only looking at the
97-
# first cache directory specified.
98-
$symPath = $symServs["_NT_SYMBOL_PATH"]
96+
$symPath = $symServs["VS 2013"]
9997
if ($null -eq $symPath)
10098
{
101-
throw "No symbol server configured"
102-
}
103-
else
104-
{
105-
if ($symPath -match "SRV\*(?<SymCache>[^*]*)\*(?:.*)\;?")
99+
# Pull it out of _NT_SYMBOL_PATH. Yes this is only looking at the
100+
# first cache directory specified.
101+
$symPath = $symServs["_NT_SYMBOL_PATH"]
102+
if ($null -eq $symPath)
106103
{
107-
$symPath = $Matches["SymCache"]
104+
throw "No symbol server configured"
108105
}
109106
else
110107
{
111-
throw "_NT_SYMBOL_PATH environment variable does not specify a symbol cache"
108+
if ($symPath -match "SRV\*(?<SymCache>[^*]*)\*(?:.*)\;?")
109+
{
110+
$symPath = $Matches["SymCache"]
111+
}
112+
else
113+
{
114+
throw "_NT_SYMBOL_PATH environment variable does not specify a symbol cache"
115+
}
112116
}
113117
}
118+
else
119+
{
120+
$vsVersion = "2013"
121+
}
114122
}
115123
else
116124
{
117-
$vsVersion = "2013"
125+
$vsVersion = "2015"
118126
}
119127
}
120128
else
121129
{
122-
$vsVersion = "2015"
130+
$vsVersion = "2017"
123131
}
124132
}
125133
else
126134
{
127-
$vsVersion = "2017"
135+
$vsVersion = "2019"
128136
}
129137

130138
if ($null -ne $vsVersion)

Code/Import-VisualStudioEnvironment.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#requires -version 5.0
1+
#requires -version 5.0
22
###############################################################################
33
# WintellectPowerShell Module
44
# Copyright (c) 2010-2017 - John Robbins/Wintellect
@@ -66,7 +66,7 @@ https://github.com/Wintellect/WintellectPowerShell
6666
param
6767
(
6868
[Parameter(Position=0)]
69-
[ValidateSet("Latest", "2013", "2015", "2017")]
69+
[ValidateSet("Latest", "2013", "2015", "2017", "2019")]
7070
[string] $VSVersion = "Latest",
7171
[Parameter(Position=1)]
7272
[ValidateSet("x86", "amd64", "arm")]
@@ -109,6 +109,7 @@ https://github.com/Wintellect/WintellectPowerShell
109109
"2013" { "12.0" }
110110
"2015" { "14.0" }
111111
"2017" { "15.0" }
112+
"2019" { "16.0" }
112113
default { throw "Unknown version of Visual Studio!" }
113114
}
114115

Code/SymbolsSource.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Set-StrictMode -version Latest
1414
# Script Global Variables
1515
###############################################################################
1616
# The array that contains all the versions.
17-
$script:vsVersionArray = "2012", "2013", "2015", "2017"
17+
$script:vsVersionArray = "2012", "2013", "2015", "2017", "2019"
1818

1919
###############################################################################
2020
# Module Only Functions

0 commit comments

Comments
 (0)