Skip to content

Set some new Wasm properties so the Sdk can use Workloads when available #32036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": 1,
"workloads": {
"microsoft-net-sdk-blazorwebassembly-aot": {
"description": "Blazor WebAssembly AOT workload",
"description": "Browser WebAssembly runtime optimization tools",
"packs": [
"Microsoft.NET.Runtime.MonoAOTCompiler.Task",
"Microsoft.NET.Runtime.WebAssembly.Sdk",
Expand All @@ -26,10 +26,10 @@
"kind": "Sdk",
"version": "${MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion}",
"alias-to": {
"win-x86": "microsoft.netcore.app.runtime.aot.win-x86.cross.browser-wasm",
"win-x64": "microsoft.netcore.app.runtime.aot.win-x64.cross.browser-wasm",
"linux-x64": "microsoft.netcore.app.runtime.aot.linux-x64.cross.browser-wasm",
"osx-x64": "microsoft.netcore.app.runtime.aot.osx-x64.cross.browser-wasm"
"win-x86": "Microsoft.NETCore.App.Runtime.AOT.win-x86.Cross.browser-wasm",
"win-x64": "Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm",
"linux-x64": "Microsoft.NETCore.App.Runtime.AOT.linux-x64.Cross.browser-wasm",
"osx-x64": "Microsoft.NETCore.App.Runtime.AOT.osx-x64.Cross.browser-wasm"
}
},
"Microsoft.NET.Runtime.Emscripten.Node" : {
Expand Down Expand Up @@ -62,4 +62,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<Project>
<PropertyGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)'=='true' AND '$(RunAOTCompilation)' == 'true'">
<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm'">
<UsingBrowserRuntimeWorkload Condition="'$(RunAOTCompilation)' == 'true' or '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true'" >true</UsingBrowserRuntimeWorkload>
<UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''" >$(WasmNativeWorkload)</UsingBrowserRuntimeWorkload>
</PropertyGroup>
<PropertyGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true' and '$(UsingBrowserRuntimeWorkload)' == 'true'" >
<WasmGenerateAppBundle>false</WasmGenerateAppBundle>
<UsingBlazorAOTWorkloadManifest>true</UsingBlazorAOTWorkloadManifest>
</PropertyGroup>

<ImportGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)'=='true' AND '$(RunAOTCompilation)' == 'true'">
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task" />
<ImportGroup Condition="'$(UsingBrowserRuntimeWorkload)' == 'true'">
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Condition="'$(RunAOTCompilation)' == 'true'" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Runtime.WebAssembly.Sdk" />
<Import Project="Sdk.props" Sdk="Microsoft.Netcore.App.Runtime.Aot.Cross.browser-wasm" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python" Condition="!$([MSBuild]::IsOsPlatform('Linux'))" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Python" Condition="!$([MSBuild]::IsOSPlatform('linux'))" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Node" />
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.Emscripten.Sdk" />
</ImportGroup>
Expand Down