From bfa9887235b01dea2bbde85a9a24925279620ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Fri, 26 Apr 2024 14:11:27 +0200 Subject: [PATCH] Instead of disabling all workloads, disable mono toolchain --- docs/using-nativeaot/compiling.md | 5 +++-- docs/workflow/building/coreclr/nativeaot.md | 2 +- samples/HelloWorld/HelloWorld.csproj | 3 ++- samples/NativeLibrary/NativeLibrary.csproj | 3 ++- src/tests/Directory.Build.props | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/using-nativeaot/compiling.md b/docs/using-nativeaot/compiling.md index 1b50c5ae62e8..bf2ce443fbe4 100644 --- a/docs/using-nativeaot/compiling.md +++ b/docs/using-nativeaot/compiling.md @@ -46,11 +46,12 @@ from any `PropertyGroup` tags if you have it. Instead, add true true - false + false + false ``` -Note that the wasm-tools workload is identified as a dependency even though its not used, and this confuses the toolchain, hence `MSBuildEnableWorkloadResolver=false`. +Note that the wasm-tools workload is identified as a dependency even though its not used, and this confuses the toolchain, hence `UsingBrowserRuntimeWorkload=false` and `UsingWasiRuntimeWorkload=false`. ## Compile and publish your app diff --git a/docs/workflow/building/coreclr/nativeaot.md b/docs/workflow/building/coreclr/nativeaot.md index ec70d809a14e..256362b8e353 100644 --- a/docs/workflow/building/coreclr/nativeaot.md +++ b/docs/workflow/building/coreclr/nativeaot.md @@ -67,7 +67,7 @@ and the following two references to the project file itself: ``` -You should now be able to publish the project for Wasm: `dotnet publish --self-contained -r browser-wasm /p:MSBuildEnableWorkloadResolver=false`. This produces `YourApp.html` and `YourApp.js` files under `bin\\\browser-wasm\native`. The former can be opened in the browser, the latter - run via NodeJS. +You should now be able to publish the project for Wasm: `dotnet publish --self-contained -r browser-wasm /p:UsingBrowserRuntimeWorkload=false`. This produces `YourApp.html` and `YourApp.js` files under `bin\\\browser-wasm\native`. The former can be opened in the browser, the latter - run via NodeJS. ## Building diff --git a/samples/HelloWorld/HelloWorld.csproj b/samples/HelloWorld/HelloWorld.csproj index 2409593776d0..4d8c3eccc69b 100644 --- a/samples/HelloWorld/HelloWorld.csproj +++ b/samples/HelloWorld/HelloWorld.csproj @@ -6,7 +6,8 @@ true true - false + false + false diff --git a/samples/NativeLibrary/NativeLibrary.csproj b/samples/NativeLibrary/NativeLibrary.csproj index 9ef352346186..3d290721a87f 100644 --- a/samples/NativeLibrary/NativeLibrary.csproj +++ b/samples/NativeLibrary/NativeLibrary.csproj @@ -7,7 +7,8 @@ true true - false + false + false diff --git a/src/tests/Directory.Build.props b/src/tests/Directory.Build.props index 28dfc3b471f4..d27abe5d2f16 100644 --- a/src/tests/Directory.Build.props +++ b/src/tests/Directory.Build.props @@ -192,7 +192,7 @@ - /p:MSBuildEnableWorkloadResolver=false /p:Configuration=$(Configuration) + /p:UsingBrowserRuntimeWorkload=false /p:UsingWasiRuntimeWorkload=false /p:Configuration=$(Configuration)