Skip to content

Commit d4f48a3

Browse files
committed
Move error check to Publish.targets.
1 parent b1d8509 commit d4f48a3

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
@@ -182,9 +182,6 @@ Copyright (c) .NET Foundation. All rights reserved.
182182
ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed"
183183
FormatArguments="PublishAot"/>
184184

185-
<NETSdkError Condition="'$(PublishAot)' == 'true' and '$(PublishAotSupported)' != 'true'"
186-
ResourceName="AotNotSupported" />
187-
188185
<!-- End of implicit RID resolver checks.-->
189186
<NETSdkError Condition="'$(SelfContained)' == 'true' and '$(UseAppHost)' != 'true' and '$(_RuntimeIdentifierUsesAppHost)' == 'true'"
190187
ResourceName="CannotUseSelfContainedWithoutAppHost" />

0 commit comments

Comments
 (0)