Skip to content

Commit 43f51a1

Browse files
committed
Also check runtime identifiers in asserts
1 parent b1816f5 commit 43f51a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,19 @@ Copyright (c) .NET Foundation. All rights reserved.
162162
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true'">
163163

164164
<!-- The following RID errors are asserts, and we don't expect them to ever occur. The error message is added as a safeguard.-->
165-
<NETSdkError Condition="'$(SelfContained)' == 'true' and '$(RuntimeIdentifier)' == ''"
165+
<NETSdkError Condition="'$(SelfContained)' == 'true' and '$(RuntimeIdentifier)' == '' and '$(RuntimeIdentifiers)' == ''"
166166
ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed"
167167
FormatArguments="SelfContained"/>
168168

169-
<NETSdkError Condition="'$(PublishReadyToRun)' == 'true' and '$(RuntimeIdentifier)' == ''"
169+
<NETSdkError Condition="'$(PublishReadyToRun)' == 'true' and '$(RuntimeIdentifier)' == '' and '$(RuntimeIdentifiers)' == ''"
170170
ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed"
171171
FormatArguments="PublishReadyToRun"/>
172172

173-
<NETSdkError Condition="'$(PublishSingleFile)' == 'true' and '$(RuntimeIdentifier)' == ''"
173+
<NETSdkError Condition="'$(PublishSingleFile)' == 'true' and '$(RuntimeIdentifier)' == '' and '$(RuntimeIdentifiers)' == ''"
174174
ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed"
175175
FormatArguments="PublishSingleFile"/>
176176

177-
<NETSdkError Condition="'$(PublishAot)' == 'true' and '$(RuntimeIdentifier)' == ''"
177+
<NETSdkError Condition="'$(PublishAot)' == 'true' and '$(RuntimeIdentifier)' == '' and '$(RuntimeIdentifiers)' == ''"
178178
ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed"
179179
FormatArguments="PublishAot"/>
180180

0 commit comments

Comments
 (0)