11param (
22 [switch ]$Debug ,
33 [string ]$VisualStudioVersion = ' 15.0' ,
4- [switch ]$SkipKeyCheck ,
54 [string ]$Verbosity = ' minimal' ,
65 [string ]$Logger ,
76 [switch ]$Incremental
@@ -24,12 +23,6 @@ If ($Debug) {
2423 $BuildConfig = ' Release'
2524}
2625
27- If ($Version.Contains (' -' )) {
28- $KeyConfiguration = ' Dev'
29- } Else {
30- $KeyConfiguration = ' Final'
31- }
32-
3326# download nuget.exe if necessary
3427$nuget = ' ..\.nuget\nuget.exe'
3528If (-not (Test-Path $nuget )) {
@@ -75,7 +68,7 @@ If ($Incremental) {
7568 $Target = ' rebuild'
7669}
7770
78- & $msbuild ' /nologo' ' /m' ' /nr:false' " /t:$Target " $LoggerArgument " /verbosity:$Verbosity " " /p:Configuration=$BuildConfig " " /p:VisualStudioVersion=$VisualStudioVersion " " /p:KeyConfiguration= $KeyConfiguration " $SolutionPath
71+ & $msbuild ' /nologo' ' /m' ' /nr:false' " /t:$Target " $LoggerArgument " /verbosity:$Verbosity " " /p:Configuration=$BuildConfig " " /p:VisualStudioVersion=$VisualStudioVersion " $SolutionPath
7972If (-not $? ) {
8073 $host.ui.WriteErrorLine (' Build failed, aborting!' )
8174 exit $LASTEXITCODE
@@ -86,29 +79,6 @@ if ($Incremental) {
8679 exit 0
8780}
8881
89- # By default, do not create a NuGet package unless the expected strong name key files were used
90- if (-not $SkipKeyCheck ) {
91- . .\keys.ps1
92-
93- foreach ($pair in $Keys.GetEnumerator ()) {
94- $assembly = Resolve-FullPath - Path " ..\StyleCop.Analyzers\StyleCop.Analyzers.CodeFixes\bin\$BuildConfig \$ ( $pair.Key ) \StyleCop.Analyzers.dll"
95- # Run the actual check in a separate process or the current process will keep the assembly file locked
96- powershell - Command " .\check-key.ps1 -Assembly '$assembly ' -ExpectedKey '$ ( $pair.Value ) ' -Build '$ ( $pair.Key ) '"
97- If (-not $? ) {
98- $host.ui.WriteErrorLine (' Failed to verify strong name key for build, aborting!' )
99- exit $LASTEXITCODE
100- }
101-
102- $assembly = Resolve-FullPath - Path " ..\StyleCop.Analyzers\StyleCop.Analyzers.CodeFixes\bin\$BuildConfig \$ ( $pair.Key ) \StyleCop.Analyzers.CodeFixes.dll"
103- # Run the actual check in a separate process or the current process will keep the assembly file locked
104- powershell - Command " .\check-key.ps1 -Assembly '$assembly ' -ExpectedKey '$ ( $pair.Value ) ' -Build '$ ( $pair.Key ) '"
105- If (-not $? ) {
106- $host.ui.WriteErrorLine (' Failed to verify strong name key for build, aborting!' )
107- exit $LASTEXITCODE
108- }
109- }
110- }
111-
11282if (-not (Test-Path ' nuget' )) {
11383 mkdir " nuget"
11484}
0 commit comments