Skip to content

Commit 451187a

Browse files
authored
Don't infer UseMonoRuntime based on the RID (#16909)
It is problematic when the RID is set in the .csproj, or when using RuntimeIdentifier_s_. We will require workloads to explicitly opt-in to the Mono runtime packs.
1 parent d16227e commit 451187a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.Current.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Copyright (c) .NET Foundation. All rights reserved.
1313
<PropertyGroup>
1414
<!-- Blazor WASM projects are always browser-wasm -->
1515
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
16+
<UseMonoRuntime>true</UseMonoRuntime>
1617

1718
<!-- Avoid having the rid show up in output paths -->
1819
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ Copyright (c) .NET Foundation. All rights reserved.
115115
<SelfContained Condition="'$(SelfContained)' == '' and '$(RuntimeIdentifier)' != ''">true</SelfContained>
116116
<SelfContained Condition="'$(SelfContained)' == ''">false</SelfContained>
117117
<_OnOsx>$(NETCoreSdkRuntimeIdentifier.StartsWith('osx'))</_OnOsx>
118-
<_RuntimeIdentifierUsesMonoRuntimeByDefault Condition="$(RuntimeIdentifier.StartsWith('ios')) or $(RuntimeIdentifier.StartsWith('tvos')) or $(RuntimeIdentifier.StartsWith('maccatalyst')) or $(RuntimeIdentifier.StartsWith('android')) or $(RuntimeIdentifier.StartsWith('browser'))">true</_RuntimeIdentifierUsesMonoRuntimeByDefault>
119118
<_RuntimeIdentifierUsesAppHost Condition="$(RuntimeIdentifier.StartsWith('ios')) or $(RuntimeIdentifier.StartsWith('tvos')) or $(RuntimeIdentifier.StartsWith('maccatalyst')) or $(RuntimeIdentifier.StartsWith('android')) or $(RuntimeIdentifier.StartsWith('browser'))">false</_RuntimeIdentifierUsesAppHost>
120119
<_RuntimeIdentifierUsesAppHost Condition="'$(_RuntimeIdentifierUsesAppHost)' == ''">true</_RuntimeIdentifierUsesAppHost>
121120
<UseAppHost Condition="'$(UseAppHost)' == '' and
@@ -124,7 +123,6 @@ Copyright (c) .NET Foundation. All rights reserved.
124123
('$(RuntimeIdentifier)' != '' and '$(_TargetFrameworkVersionWithoutV)' >= '2.1') or
125124
('$(_TargetFrameworkVersionWithoutV)' >= '3.0' and $(_OnOsx) != 'true'))">true</UseAppHost>
126125
<UseAppHost Condition="'$(UseAppHost)' == ''">false</UseAppHost>
127-
<UseMonoRuntime Condition="'$(UseMonoRuntime)' == '' and '$(_RuntimeIdentifierUsesMonoRuntimeByDefault)' == 'true'">true</UseMonoRuntime>
128126
</PropertyGroup>
129127

130128
<!-- Only use the default apphost if building without a RID and without a deps file path (used by GenerateDeps.proj for CLI tools). -->

0 commit comments

Comments
 (0)