|
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, |
@@ -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 "..\StyleCop.Analyzers\StyleCop.Analyzers.CodeFixes\bin\$BuildConfig\StyleCop.Analyzers.dll" |
| 94 | + $assembly = Resolve-FullPath -Path "..\StyleCop.Analyzers\StyleCop.Analyzers.CodeFixes\bin\$BuildConfig\$($pair.Key)\StyleCop.Analyzers.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 "..\StyleCop.Analyzers\StyleCop.Analyzers.CodeFixes\bin\$BuildConfig\StyleCop.Analyzers.CodeFixes.dll" |
| 102 | + $assembly = Resolve-FullPath -Path "..\StyleCop.Analyzers\StyleCop.Analyzers.CodeFixes\bin\$BuildConfig\$($pair.Key)\StyleCop.Analyzers.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