Skip to content

Commit efb2b6c

Browse files
authored
Revert "Error out if SelfContained is not specified for Native AOT publish (#95496)"
This reverts commit 1aae18a.
1 parent 425cfb9 commit efb2b6c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ Copyright (c) .NET Foundation. All rights reserved.
196196
<!-- The defaults currently root non-framework assemblies, which
197197
is a no-op for portable apps. If we later support more ways
198198
to customize the behavior we can allow linking portable apps
199-
in some cases. -->
200-
<NETSdkError Condition="'$(SelfContained)' != 'true'" ResourceName="ILLinkNotSupportedError" />
199+
in some cases. If we're not running ILLink because e.g. this
200+
is a NativeAOT app, value of SelfContained doesn't matter. -->
201+
<NETSdkError Condition="'$(RunILLink)' != 'false' And '$(SelfContained)' != 'true'" ResourceName="ILLinkNotSupportedError" />
201202

202203
<Warning Condition="'$(SuppressILLinkExplicitPackageReferenceWarning)' != 'true' And
203204
'%(PackageReference.Identity)' == 'Microsoft.NET.ILLink.Tasks' And '%(PackageReference.IsImplicitlyDefined)' != 'true'"

0 commit comments

Comments
 (0)