Skip to content

Commit 1624c6a

Browse files
committed
Move error check to Publish.targets.
1 parent 3444feb commit 1624c6a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ Copyright (c) .NET Foundation. All rights reserved.
111111
'$(EnableCompressionInSingleFile)' == 'true' And
112112
'$(SelfContained)' != 'true'"
113113
ResourceName="CompressionInSingleFileRequiresSelfContained" />
114+
<NETSdkError Condition="'$(PublishAot)' == 'true' and '$(PublishAotSupported)' != 'true'"
115+
ResourceName="AotNotSupported" />
114116

115117
<!-- Enable warning for trying to use PublishRelease or PackRelease with a solution if env-var is not set.-->
116118
<NETSdkWarning Condition="'$(PublishRelease)' != '' and '$(SolutionExt)' == '.sln' and '$(DOTNET_CLI_ENABLE_PUBLISH_RELEASE_FOR_SOLUTIONS)' == ''"

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@ Copyright (c) .NET Foundation. All rights reserved.
178178
ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed"
179179
FormatArguments="PublishAot"/>
180180

181-
<NETSdkError Condition="'$(PublishAot)' == 'true' and '$(PublishAotSupported)' != 'true'"
182-
ResourceName="AotNotSupported" />
183-
184181
<!-- End of implicit RID resolver checks.-->
185182
<NETSdkError Condition="'$(SelfContained)' == 'true' and '$(UseAppHost)' != 'true' and '$(_RuntimeIdentifierUsesAppHost)' == 'true'"
186183
ResourceName="CannotUseSelfContainedWithoutAppHost" />

0 commit comments

Comments
 (0)