Skip to content

Commit

Permalink
Imply SC for some publish properties as we decided to in the partner …
Browse files Browse the repository at this point in the history
…sync
  • Loading branch information
nagilson committed Apr 24, 2023
1 parent 19323d9 commit 9d71845
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ Copyright (c) .NET Foundation. All rights reserved.
<RuntimeIdentifier Condition="'$(PlatformTarget)' == 'x86' or '$(PlatformTarget)' == ''">win7-x86</RuntimeIdentifier>
</PropertyGroup>

<!-- Breaking change in .NET 8: Some publish properties used to imply SelfContained or require it at the time of this PR to work. We decided to infer SelfContained still in these situations. -->
<PublishSelfContained Condition="'$(SelfContained)' == '' and
'$(PublishSelfContained)' == '' and
'$(_TargetFrameworkVersionWithoutV)' &gt; '7.0' and
(
'$(PublishTrimmed)' == 'true' or
'$(PublishSingleFile)' == 'true' or
'$(PublishAot)' == 'true'
)">true</PublishSelfContained>

<!-- Edit SelfContained to match the value of PublishSelfContained if we are publishing.
This Won't affect t:/Publish (because of _IsPublishing), and also won't override a global SelfContained property.-->
<PropertyGroup Condition="'$(_IsPublishing)' == 'true' and ('$(PublishSelfContained)' == 'true' or '$(PublishSelfContained)' == 'false')">
Expand Down Expand Up @@ -149,7 +159,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<_SelfContainedWasSpecified Condition="'$(SelfContained)' != ''">true</_SelfContainedWasSpecified>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true'">
<!-- Breaking change below! Projects with 8.0+ TFMS will no longer have RuntimeIdentifier imply SelfContained. -->
<!-- Breaking change in .NET 8: Projects with 8.0+ TFMS will no longer have RuntimeIdentifier imply SelfContained. Note that PublishReadyToRun will imply SelfContained in these versions. -->
<SelfContained Condition="'$(SelfContained)' == '' and '$(RuntimeIdentifier)' != '' and
'$(_TargetFrameworkVersionWithoutV)' &lt; '8.0'">true</SelfContained>
<SelfContained Condition="'$(SelfContained)' == ''">false</SelfContained>
Expand Down

0 comments on commit 9d71845

Please sign in to comment.