Skip to content

Commit

Permalink
Clean up code around targets
Browse files Browse the repository at this point in the history
  • Loading branch information
nagilson committed Nov 2, 2022
1 parent 385a936 commit 8516ab6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Copyright (c) .NET Foundation. All rights reserved.
'$(PublishReadyToRun)' == 'true' or
'$(PublishSingleFile)' == 'true' or
'$(PublishAot)' == 'true' or
('$(_IsPublishing)' == 'true' and '$(PublishSelfContained)' == 'true')
('$(_CommandLineDefinedSelfContained)' != 'true' and '$(_IsPublishing)' == 'true' and '$(PublishSelfContained)' == 'true')
)">true</UseCurrentRuntimeIdentifier>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<PropertyGroup>
<_IsExecutable Condition="'$(OutputType)' == 'Exe' or '$(OutputType)'=='WinExe'">true</_IsExecutable>
</PropertyGroup>

<PropertyGroup Condition="'$(HasRuntimeOutput)' == ''">
<HasRuntimeOutput>$(_IsExecutable)</HasRuntimeOutput>
<_UsingDefaultForHasRuntimeOutput>true</_UsingDefaultForHasRuntimeOutput>
Expand All @@ -36,11 +36,10 @@ Copyright (c) .NET Foundation. All rights reserved.

<!-- 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>
<SelfContained Condition=" '$(_IsPublishing)' == 'true' and '$(PublishSelfContained)' == 'false'">false</SelfContained>
<SelfContained Condition=" '$(_IsPublishing)' == 'true' and '$(PublishSelfContained)' == 'true'">true</SelfContained>
<PropertyGroup Condition="'$(_CommandLineDefinedSelfContained)' != 'true' and '$(_IsPublishing)' == 'true'">
<SelfContained Condition="'$(PublishSelfContained)' == 'true' or '$(PublishSelfContained)' == 'false'">$(PublishSelfContained)</SelfContained>
</PropertyGroup>

<!-- Before any additional SDK targets are imported, import the publish profile.
This allows the publish profile to set properties like RuntimeIdentifier and them be
respected by the SDK. -->
Expand Down

0 comments on commit 8516ab6

Please sign in to comment.