Skip to content

Commit 598f1e7

Browse files
authored
Add escape hatch for publishing with SelfContained=true, but no RuntimeIdentifier. (#36047)
2 parents 77f232c + d21e6bf commit 598f1e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Copyright (c) .NET Foundation. All rights reserved.
209209
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(HasRuntimeOutput)' == 'true'">
210210

211211
<!-- The following RID errors are asserts, and we don't expect them to ever occur. The error message is added as a safeguard.-->
212-
<NETSdkError Condition="'$(SelfContained)' == 'true' and '$(RuntimeIdentifier)' == ''"
212+
<NETSdkError Condition="'$(SelfContained)' == 'true' and '$(RuntimeIdentifier)' == '' and '$(AllowSelfContainedWithoutRuntimeIdentifier)' != 'true'"
213213
ResourceName="ImplicitRuntimeIdentifierResolutionForPublishPropertyFailed"
214214
FormatArguments="SelfContained"/>
215215

0 commit comments

Comments
 (0)