Skip to content

Commit

Permalink
Infer self-contained and RID for PublishAot
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 authored Jan 9, 2023
1 parent dbfe834 commit dc23244
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<PropertyGroup Condition="'$(UseCurrentRuntimeIdentifier)' == ''">
<UseCurrentRuntimeIdentifier Condition="
'$(RuntimeIdentifier)' == '' and
'$(_IsExecutable)' == 'true' and '$(IsTestProject)' != 'true' and
('$(_IsExecutable)' == 'true' and '$(IsTestProject)' != 'true' or '$(PublishAot)' == 'true') and
'$(IsRidAgnostic)' != 'true' and
(
'$(SelfContained)' == 'true' or
Expand Down Expand Up @@ -147,6 +147,8 @@ Copyright (c) .NET Foundation. All rights reserved.
<PropertyGroup>
<!-- Detecting property presence is not harmful and can be done in an unconditioned way -->
<_SelfContainedWasSpecified Condition="'$(SelfContained)' != ''">true</_SelfContainedWasSpecified>
<!-- PublishAot implies SelfContained -->
<SelfContained Condition="'$(SelfContained)' == '' and '$(PublishAot)' == 'true'">true</SelfContained>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true'">
<SelfContained Condition="'$(SelfContained)' == '' and '$(RuntimeIdentifier)' != ''">true</SelfContained>
Expand Down

0 comments on commit dc23244

Please sign in to comment.