File tree 1 file changed +3
-1
lines changed
src/Tasks/Microsoft.NET.Build.Tasks/targets 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ Copyright (c) .NET Foundation. All rights reserved.
78
78
<PropertyGroup Condition =" '$(UseCurrentRuntimeIdentifier)' == ''" >
79
79
<UseCurrentRuntimeIdentifier Condition ="
80
80
'$(RuntimeIdentifier)' == '' and
81
- '$(_IsExecutable)' == 'true' and '$(IsTestProject)' != 'true' and
81
+ ( '$(_IsExecutable)' == 'true' and '$(IsTestProject)' != 'true' or '$(PublishAot)' == 'true') and
82
82
'$(IsRidAgnostic)' != 'true' and
83
83
(
84
84
'$(SelfContained)' == 'true' or
@@ -147,6 +147,8 @@ Copyright (c) .NET Foundation. All rights reserved.
147
147
<PropertyGroup >
148
148
<!-- Detecting property presence is not harmful and can be done in an unconditioned way -->
149
149
<_SelfContainedWasSpecified Condition =" '$(SelfContained)' != ''" >true</_SelfContainedWasSpecified >
150
+ <!-- PublishAot implies SelfContained -->
151
+ <SelfContained Condition =" '$(SelfContained)' == '' and '$(PublishAot)' == 'true'" >true</SelfContained >
150
152
</PropertyGroup >
151
153
<PropertyGroup Condition =" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true'" >
152
154
<SelfContained Condition =" '$(SelfContained)' == '' and '$(RuntimeIdentifier)' != ''" >true</SelfContained >
You can’t perform that action at this time.
0 commit comments