1
1
param (
2
2
[switch ]$Debug ,
3
- [string ]$VisualStudioVersion = ' 14 .0' ,
3
+ [string ]$VisualStudioVersion = ' 15 .0' ,
4
4
[switch ]$SkipKeyCheck ,
5
5
[string ]$Verbosity = ' minimal' ,
6
6
[string ]$Logger ,
@@ -37,7 +37,7 @@ If (-not (Test-Path $nuget)) {
37
37
mkdir ' ..\.nuget'
38
38
}
39
39
40
- $nugetSource = ' http ://nuget.org/nuget.exe'
40
+ $nugetSource = ' https ://dist. nuget.org/win-x86-commandline/latest /nuget.exe'
41
41
Invoke-WebRequest $nugetSource - OutFile $nuget
42
42
If (-not $? ) {
43
43
$host.ui.WriteErrorLine (' Unable to download NuGet executable, aborting!' )
@@ -46,7 +46,8 @@ If (-not (Test-Path $nuget)) {
46
46
}
47
47
48
48
# build the main project
49
- $msbuild = " ${env: ProgramFiles(x86)} \MSBuild\$VisualStudioVersion \Bin\MSBuild.exe"
49
+ $visualStudio = (Get-ItemProperty ' HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7' )." $VisualStudioVersion "
50
+ $msbuild = " $visualStudio \MSBuild\$VisualStudioVersion \Bin\MSBuild.exe"
50
51
If (-not (Test-Path $msbuild )) {
51
52
$host.UI.WriteErrorLine (" Couldn't find MSBuild.exe" )
52
53
exit 1
@@ -90,15 +91,15 @@ if (-not $SkipKeyCheck) {
90
91
. .\keys.ps1
91
92
92
93
foreach ($pair in $Keys.GetEnumerator ()) {
93
- $assembly = Resolve-FullPath - Path " ..\PublicApiAnalyzer\PublicApiAnalyzer.CodeFixes\bin\$BuildConfig \PublicApiAnalyzer.dll"
94
+ $assembly = Resolve-FullPath - Path " ..\PublicApiAnalyzer\PublicApiAnalyzer.CodeFixes\bin\$BuildConfig \$ ( $pair .Key ) \ PublicApiAnalyzer.dll"
94
95
# Run the actual check in a separate process or the current process will keep the assembly file locked
95
96
powershell - Command " .\check-key.ps1 -Assembly '$assembly ' -ExpectedKey '$ ( $pair.Value ) ' -Build '$ ( $pair.Key ) '"
96
97
If (-not $? ) {
97
98
$host.ui.WriteErrorLine (' Failed to verify strong name key for build, aborting!' )
98
99
exit $LASTEXITCODE
99
100
}
100
101
101
- $assembly = Resolve-FullPath - Path " ..\PublicApiAnalyzer\PublicApiAnalyzer.CodeFixes\bin\$BuildConfig \PublicApiAnalyzer.CodeFixes.dll"
102
+ $assembly = Resolve-FullPath - Path " ..\PublicApiAnalyzer\PublicApiAnalyzer.CodeFixes\bin\$BuildConfig \$ ( $pair .Key ) \ PublicApiAnalyzer.CodeFixes.dll"
102
103
# Run the actual check in a separate process or the current process will keep the assembly file locked
103
104
powershell - Command " .\check-key.ps1 -Assembly '$assembly ' -ExpectedKey '$ ( $pair.Value ) ' -Build '$ ( $pair.Key ) '"
104
105
If (-not $? ) {
0 commit comments