Skip to content

Commit a7d5576

Browse files
ViktorHofercaptainsafia
authored andcommitted
Pass -sign and -publish switch to dotnet build only (#59068)
1 parent 42be0e4 commit a7d5576

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

eng/build.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,6 @@ $MSBuildArguments += "/p:Build=$RunBuild"
266266
if (-not $RunBuild) { $MSBuildArguments += "/p:NoBuild=true" }
267267
$MSBuildArguments += "/p:Pack=$Pack"
268268
$MSBuildArguments += "/p:Test=$Test"
269-
$MSBuildArguments += "/p:Sign=$Sign"
270-
$MSBuildArguments += "/p:Publish=$Publish"
271269

272270
$MSBuildArguments += "/p:TargetArchitecture=$Architecture"
273271
$MSBuildArguments += "/p:TargetOsName=win"
@@ -289,6 +287,11 @@ if ($RuntimeSourceFeed -or $RuntimeSourceFeedKey) {
289287

290288
# Split build categories between dotnet msbuild and desktop msbuild. Use desktop msbuild as little as possible.
291289
[string[]]$dotnetBuildArguments = $MSBuildArguments
290+
291+
# Don't pass Sign and Publish to desktop msbuild as that would result in double signing and publishing
292+
$dotnetBuildArguments += "/p:Sign=$Sign"
293+
$dotnetBuildArguments += "/p:Publish=$Publish"
294+
292295
if ($All) { $dotnetBuildArguments += '/p:BuildAllProjects=true' }
293296
if ($Projects) {
294297
if ($BuildNative) {

0 commit comments

Comments
 (0)