@@ -239,7 +239,10 @@ function Start-ScriptAnalyzerBuild
239
239
}
240
240
}
241
241
242
- $config = " PSV${PSVersion}${Configuration} "
242
+ $buildConfiguration = $Configuration
243
+ if ((3 , 4 ) -contains $PSVersion ) {
244
+ $buildConfiguration = " PSV${PSVersion}${Configuration} "
245
+ }
243
246
244
247
# Build ScriptAnalyzer
245
248
# The Rules project has a dependency on the Engine therefore just building the Rules project is enough
@@ -249,7 +252,7 @@ function Start-ScriptAnalyzerBuild
249
252
if ( -not $script :DotnetExe ) {
250
253
$script :DotnetExe = Get-DotnetExe
251
254
}
252
- $buildOutput = & $script :DotnetExe build -- framework $framework -- configuration " $config " 2>&1
255
+ $buildOutput = & $script :DotnetExe build -- framework $framework -- configuration " $buildConfiguration " 2>&1
253
256
if ( $LASTEXITCODE -ne 0 ) { throw " $buildOutput " }
254
257
}
255
258
catch {
@@ -264,17 +267,17 @@ function Start-ScriptAnalyzerBuild
264
267
Publish-File $itemsToCopyCommon $script :destinationDir
265
268
266
269
$itemsToCopyBinaries = @ (
267
- " $projectRoot \Engine\bin\${config } \${Framework} \Microsoft.Windows.PowerShell.ScriptAnalyzer.dll" ,
268
- " $projectRoot \Rules\bin\${config } \${Framework} \Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.dll"
269
- " $projectRoot \Rules\bin\${config } \${framework} \Microsoft.PowerShell.CrossCompatibility.dll"
270
+ " $projectRoot \Engine\bin\${buildConfiguration } \${Framework} \Microsoft.Windows.PowerShell.ScriptAnalyzer.dll" ,
271
+ " $projectRoot \Rules\bin\${buildConfiguration } \${Framework} \Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.dll"
272
+ " $projectRoot \Rules\bin\${buildConfiguration } \${framework} \Microsoft.PowerShell.CrossCompatibility.dll"
270
273
)
271
274
Publish-File $itemsToCopyBinaries $destinationDirBinaries
272
275
273
276
$settingsFiles = Get-Childitem " $projectRoot \Engine\Settings" | ForEach-Object - MemberName FullName
274
277
Publish-File $settingsFiles (Join-Path - Path $script :destinationDir - ChildPath Settings)
275
278
276
279
if ($framework -eq ' net452' ) {
277
- Copy-Item - path " $projectRoot \Rules\bin\${config } \${framework} \Newtonsoft.Json.dll" - Destination $destinationDirBinaries
280
+ Copy-Item - path " $projectRoot \Rules\bin\${buildConfiguration } \${framework} \Newtonsoft.Json.dll" - Destination $destinationDirBinaries
278
281
}
279
282
280
283
Pop-Location
0 commit comments