Skip to content

Commit 8e15d9f

Browse files
authored
Change RunningPublish property name to _IsPublishing (#79483)
The crossgen publish capability currently uses a RunningPublish property to signal that certain settings should be enabled. The SDK now provides a property that serves the same purpose called '_IsPublishing'. By using the SDK property, the right publish behavior will automatically happen if a user runs 'dotnet publish' on the crossgen2 project.
1 parent 1529058 commit 8e15d9f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/coreclr/tools/aot/crossgen2/crossgen2.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported>
99
<!-- Trimming is not currently working, but set the appropriate feature flags for NativeAOT -->
1010
<PublishTrimmed Condition="'$(NativeAotSupported)' == 'true'">true</PublishTrimmed>
11-
<RuntimeIdentifiers Condition="'$(RunningPublish)' != 'true' and '$(DotNetBuildFromSource)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm</RuntimeIdentifiers>
11+
<RuntimeIdentifiers Condition="'$(_IsPublishing)' != 'true' and '$(DotNetBuildFromSource)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm</RuntimeIdentifiers>
1212
<RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(PackageRID)</RuntimeIdentifiers>
1313
<SelfContained>false</SelfContained>
14-
<SelfContained Condition="'$(RunningPublish)' == 'true'">true</SelfContained>
14+
<SelfContained Condition="'$(_IsPublishing)' == 'true'">true</SelfContained>
1515
</PropertyGroup>
1616

1717
<Import Project="crossgen2.props" />
@@ -43,10 +43,10 @@
4343

4444
<Import Project="$(R2ROverridePath)" Condition="'$(R2ROverridePath)' != ''" />
4545
<Import Project="$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.SingleEntry.targets"
46-
Condition="'$(NativeAotSupported)' == 'true' and '$(RunningPublish)' == 'true'" />
46+
Condition="'$(NativeAotSupported)' == 'true' and '$(_IsPublishing)' == 'true'" />
4747

4848
<Target Name="RewriteRuntimePackDir"
49-
Condition="'$(RunningPublish)' == 'true'"
49+
Condition="'$(_IsPublishing)' == 'true'"
5050
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild"
5151
BeforeTargets="ResolveRuntimePackAssets">
5252
<ItemGroup>

src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.sfxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
<MSBuild Projects="$(RepoRoot)src/coreclr/tools/aot/crossgen2/crossgen2.csproj"
3333
Targets="Restore"
3434
Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid())
35-
;RunningPublish=true
35+
;_IsPublishing=true
3636
;RuntimeIdentifier=$(PackageRID)
3737
;CoreCLRArtifactsPath=$(CoreCLRArtifactsPath)
3838
;R2ROverridePath=$(MSBuildThisFileDirectory)ReadyToRun.targets" />
3939

4040
<MSBuild Projects="$(RepoRoot)src/coreclr/tools/aot/crossgen2/crossgen2.csproj"
4141
Targets="Publish;PublishItemsOutputGroup"
42-
Properties="RunningPublish=true
42+
Properties="_IsPublishing=true
4343
;RuntimeIdentifier=$(PackageRID)
4444
;CoreCLRArtifactsPath=$(CoreCLRArtifactsPath)
4545
;R2ROverridePath=$(MSBuildThisFileDirectory)ReadyToRun.targets">

0 commit comments

Comments
 (0)