Skip to content
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

[wasm] Don't use workload for tfm < net6.0 #56606

Merged
merged 12 commits into from
Aug 15, 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
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
<SQLitePCLRawbundle_greenVersion>2.0.4</SQLitePCLRawbundle_greenVersion>
<MoqVersion>4.12.0</MoqVersion>
<FsCheckVersion>2.14.3</FsCheckVersion>
<SdkVersionForWorkloadTesting>6.0.100-rc.1.21370.2</SdkVersionForWorkloadTesting>
<SdkVersionForWorkloadTesting>6.0.100-rc.1.21402.6</SdkVersionForWorkloadTesting>
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>5.0.0-preview-20201009.2</MicrosoftPrivateIntellisenseVersion>
<!-- ILLink -->
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ jobs:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono_WasmBuildTests
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:OnlyWasmBuildTests=true /p:TestAssemblies=false
buildArgs: -s mono+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:TestWasmBuildTests=true /p:TestAssemblies=false
timeoutInMinutes: 180
condition: >-
or(
Expand Down
4 changes: 0 additions & 4 deletions eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@

<PublishingTestsRun>true</PublishingTestsRun>
<BundleTestAppTargets>BundleTestAppleApp;BundleTestAndroidApp</BundleTestAppTargets>

<!-- this catches the case when we are running tests, but not archiving them.
In case of archiving, the workload gets installed by code elsewhere -->
<InstallWorkloadForTesting Condition="'$(TestUsingWorkloads)' == 'true' and '$(ArchiveTests)' != 'true'">true</InstallWorkloadForTesting>
</PropertyGroup>

<PropertyGroup Condition="'$(EnableAggressiveTrimming)' == 'true'">
Expand Down
13 changes: 10 additions & 3 deletions src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,17 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetsMobile)' == 'true'">
<SdkPathForWorkloadTesting Condition="'$(SdkPathForWorkloadTesting)' == ''">$(ArtifactsBinDir)dotnet-workload\</SdkPathForWorkloadTesting>
<SdkPathForWorkloadTesting>$([MSBuild]::NormalizeDirectory($(SdkPathForWorkloadTesting)))</SdkPathForWorkloadTesting>
<SdkWithNoWorkloadForTestingPath>$(ArtifactsBinDir)sdk-no-workload\</SdkWithNoWorkloadForTestingPath>
<SdkWithNoWorkloadForTestingPath>$([MSBuild]::NormalizeDirectory($(SdkWithNoWorkloadForTestingPath)))</SdkWithNoWorkloadForTestingPath>

<SdkForWorkloadTestingStampPath>$(SdkPathForWorkloadTesting)version-$(SdkVersionForWorkloadTesting).stamp</SdkForWorkloadTestingStampPath>
<SdkWithNoWorkloadStampPath>$(SdkWithNoWorkloadForTestingPath)version-$(SdkVersionForWorkloadTesting).stamp</SdkWithNoWorkloadStampPath>
<SdkWithNoWorkload_WorkloadStampPath>$(SdkWithWorkloadForTestingPath)workload.stamp</SdkWithNoWorkload_WorkloadStampPath>

<SdkWithWorkloadForTestingPath>$(ArtifactsBinDir)dotnet-workload\</SdkWithWorkloadForTestingPath>
<SdkWithWorkloadForTestingPath>$([MSBuild]::NormalizeDirectory($(SdkWithWorkloadForTestingPath)))</SdkWithWorkloadForTestingPath>

<SdkWithWorkloadStampPath>$(SdkWithWorkloadForTestingPath)version-$(SdkVersionForWorkloadTesting).stamp</SdkWithWorkloadStampPath>
<SdkWithWorkload_WorkloadStampPath>$(SdkWithWorkloadForTestingPath)workload.stamp</SdkWithWorkload_WorkloadStampPath>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)testing\tests.props" Condition="'$(EnableTestSupport)' == 'true'" />
Expand Down
2 changes: 0 additions & 2 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<PropertyGroup Condition="'$(TestUsingWorkloads)' == 'true'">
<!-- for non-ci builds, we install the sdk when tests are run -->
<InstallWorkloadForTesting Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(ArchiveTests)' == 'true'">true</InstallWorkloadForTesting>

<WorkloadStampFile>$(SdkPathForWorkloadTesting)workload.stamp</WorkloadStampFile>
</PropertyGroup>

<!-- resources.targets need to be imported before the Arcade SDK. -->
Expand Down
41 changes: 24 additions & 17 deletions src/libraries/sendtohelixhelp.proj
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@
<TestRunNamePrefix Condition="'$(Scenario)' != ''">$(TestRunNamePrefix)$(Scenario)-</TestRunNamePrefix>

<FailOnTestFailure Condition="'$(WaitForWorkItemCompletion)' != ''">$(WaitForWorkItemCompletion)</FailOnTestFailure>
<NeedsToBuildWasmAppsOnHelix Condition="'$(TargetOS)' == 'Browser' and '$(NeedsToBuildWasmAppsOnHelix)' == '' and '$(Scenario)' == 'BuildWasmApps'">true</NeedsToBuildWasmAppsOnHelix>
<EMSDK_PATH Condition="$([MSBuild]::IsOSPlatform('WINDOWS')) and '$(EMSDK_PATH)' == ''">$(RepoRoot)src\mono\wasm\emsdk\</EMSDK_PATH>

<NeedsWorkload Condition="'$(TestUsingWorkloads)' == 'true'">true</NeedsWorkload>
<NeedsEMSDK Condition="'$(NeedsToBuildWasmAppsOnHelix)' == 'true' and '$(NeedsWorkload)' != 'true'">true</NeedsEMSDK>
<NeedsWorkload Condition="'$(Scenario)' == 'BuildWasmApps'">true</NeedsWorkload>
<NeedsEMSDK Condition="'$(NeedsToBuildWasmAppsOnHelix)' == 'true' or ('$(Scenario)' == 'BuildWasmApps' and '$(TestUsingWorkloads)' != 'true')">true</NeedsEMSDK>
<NeedsToRunOnBrowser Condition="'$(TargetOS)' == 'Browser' and ('$(Scenario)' == 'WasmTestOnBrowser' or '$(Scenario)' == 'BuildWasmApps')">true</NeedsToRunOnBrowser>

<SdkForWorkloadTestingDirName Condition="'$(NeedsWorkload)' == 'true' and '$(TestUsingWorkloads)' == 'true'">dotnet-workload</SdkForWorkloadTestingDirName>
<SdkForWorkloadTestingDirName Condition="'$(NeedsWorkload)' == 'true' and '$(TestUsingWorkloads)' != 'true'">sdk-no-workload</SdkForWorkloadTestingDirName>
</PropertyGroup>

<PropertyGroup Condition="'$(HelixType)' == ''">
Expand Down Expand Up @@ -161,21 +163,21 @@
<HelixPreCommand Include="printenv | grep COMPlus" />
</ItemGroup>

<ItemGroup Condition="'$(TestUsingWorkloads)' == 'true'">
<HelixCommandPrefixItem Condition="'$(WindowsShell)' != 'true'" Include="PATH=$HELIX_CORRELATION_PAYLOAD/dotnet-workload:$PATH" />
<HelixCommandPrefixItem Condition="'$(WindowsShell)' == 'true'" Include="PATH=%HELIX_CORRELATION_PAYLOAD%\dotnet-workload%3B%PATH%" />
<ItemGroup Condition="'$(NeedsWorkload)' == 'true'">
<HelixCommandPrefixItem Condition="'$(WindowsShell)' != 'true'" Include="PATH=$HELIX_CORRELATION_PAYLOAD/$(SdkForWorkloadTestingDirName):$PATH" />
<HelixCommandPrefixItem Condition="'$(WindowsShell)' == 'true'" Include="PATH=%HELIX_CORRELATION_PAYLOAD%\$(SdkForWorkloadTestingDirName)%3B%PATH%" />

<HelixCommandPrefixItem Condition="'$(WindowsShell)' != 'true'" Include="DOTNET_CLI_HOME=$HELIX_CORRELATION_PAYLOAD/dotnet-workload" />
<!--<HelixCommandPrefixItem Condition="'$(WindowsShell)' == 'true'" Include="DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\dotnet-workload" />-->
<HelixCommandPrefixItem Condition="'$(WindowsShell)' != 'true'" Include="DOTNET_CLI_HOME=$HELIX_CORRELATION_PAYLOAD/$(SdkForWorkloadTestingDirName)" />
<!--<HelixCommandPrefixItem Condition="'$(WindowsShell)' == 'true'" Include="DOTNET_CLI_HOME=%HELIX_CORRELATION_PAYLOAD%\$(SdkForWorkloadTestingDirName)" />-->

<HelixCommandPrefixItem Condition="'$(WindowsShell)' != 'true'" Include="DOTNET_ROOT=$HELIX_CORRELATION_PAYLOAD/dotnet-workload" />
<!--<HelixCommandPrefixItem Condition="'$(WindowsShell)' == 'true'" Include="DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\dotnet-workload" />-->
<HelixCommandPrefixItem Condition="'$(WindowsShell)' != 'true'" Include="DOTNET_ROOT=$HELIX_CORRELATION_PAYLOAD/$(SdkForWorkloadTestingDirName)" />
<!--<HelixCommandPrefixItem Condition="'$(WindowsShell)' == 'true'" Include="DOTNET_ROOT=%HELIX_CORRELATION_PAYLOAD%\$(SdkForWorkloadTestingDirName)" />-->

<HelixCommandPrefixItem Condition="'$(WindowsShell)' != 'true'" Include="SDK_FOR_WORKLOAD_TESTING_PATH=%24{HELIX_CORRELATION_PAYLOAD}/dotnet-workload" />
<HelixCommandPrefixItem Condition="'$(WindowsShell)' == 'true'" Include="SDK_FOR_WORKLOAD_TESTING_PATH=%HELIX_CORRELATION_PAYLOAD%\dotnet-workload" />
<HelixCommandPrefixItem Condition="'$(WindowsShell)' != 'true'" Include="SDK_FOR_WORKLOAD_TESTING_PATH=%24{HELIX_CORRELATION_PAYLOAD}/$(SdkForWorkloadTestingDirName)" />
<HelixCommandPrefixItem Condition="'$(WindowsShell)' == 'true'" Include="SDK_FOR_WORKLOAD_TESTING_PATH=%HELIX_CORRELATION_PAYLOAD%\$(SdkForWorkloadTestingDirName)" />

<HelixCommandPrefixItem Include="DOTNET_CLI_TELEMETRY_OPTOUT=1" />
<HelixCommandPrefixItem Include="TEST_USING_WORKLOADS=true" />
<HelixCommandPrefixItem Condition="'$(TestUsingWorkloads)' == 'true'" Include="TEST_USING_WORKLOADS=true" />
</ItemGroup>

<PropertyGroup Condition="'$(NeedsDotNetSdk)' == 'true'">
Expand Down Expand Up @@ -354,12 +356,17 @@
</HelixPostCommands>
</PropertyGroup>

<Error Condition="'$(TestUsingWorkloads)' == 'true' and ('$(SdkPathForWorkloadTesting)' == '' or !Exists($(SdkPathForWorkloadTesting)))"
Text="Could not find workload at %24(SdkPathForWorkloadTesting)=$(SdkPathForWorkloadTesting)" />
<Error Condition="'$(NeedsWorkload)' == 'true' and '$(TestUsingWorkloads)' == 'true' and ('$(SdkWithWorkloadForTestingPath)' == '' or !Exists($(SdkWithWorkloadForTestingPath)))"
Text="Could not find workload at %24(SdkWithWorkloadForTestingPath)=$(SdkWithWorkloadForTestingPath)" />

<Error Condition="'$(NeedsWorkload)' == 'true' and '$(TestUsingWorkloads)' != 'true' and ('$(SdkWithNoWorkloadForTestingPath)' == '' or !Exists($(SdkWithNoWorkloadForTestingPath)))"
Text="Could not find workload at %24(SdkWithNoWorkloadForTestingPath)=$(SdkWithNoWorkloadForTestingPath)" />

<ItemGroup Condition="'$(NeedsWorkload)' == 'true'">
<HelixCorrelationPayload Include="$(SdkPathForWorkloadTesting)" Destination="dotnet-workload" />
<HelixCorrelationPayload Include="$(MicrosoftNetCoreAppRefPackDir)" Destination="microsoft.netcore.app.ref" />
<HelixCorrelationPayload Include="$(SdkWithWorkloadForTestingPath)" Destination="$(SdkForWorkloadTestingDirName)" Condition="'$(TestUsingWorkloads)' == 'true'" />
<HelixCorrelationPayload Include="$(SdkWithNoWorkloadForTestingPath)" Destination="$(SdkForWorkloadTestingDirName)" Condition="'$(TestUsingWorkloads)' != 'true'" />

<HelixCorrelationPayload Include="$(MicrosoftNetCoreAppRefPackDir)" Destination="microsoft.netcore.app.ref" />
</ItemGroup>

<ItemGroup Condition="'$(NeedsEMSDK)' == 'true'">
Expand Down
6 changes: 3 additions & 3 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,11 @@
AdditionalProperties="%(AdditionalProperties);SkipTrimmingProjectsRestore=true" />
<ProjectReference Include="@(TrimmingTestProjects)" />

<!-- wasm.build.tests are run on non-aot regular run -->
<!-- wasm.build.tests are run on _WasmBuildTests job on CI, and with library tests locally. -->
<ProjectReference Include="$(RepoRoot)\src\tests\BuildWasmApps\**\*.Tests.csproj"
Exclude="@(ProjectExclusions)"
Condition="'$(TargetOS)' == 'Browser' and
(('$(ContinuousIntegrationBuild)' == 'true' and '$(OnlyWasmBuildTests)' == 'true') or
(('$(ContinuousIntegrationBuild)' == 'true' and '$(TestWasmBuildTests)' == 'true') or
('$(ContinuousIntegrationBuild)' != 'true' and '$(TestAssemblies)' == 'true'))"
BuildInParallel="false" />
</ItemGroup>
Expand Down Expand Up @@ -342,7 +342,7 @@
</ItemGroup>

<!-- Don't build samples, and functional tests on EAT, AOT, and WBT lanes -->
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(TargetOS)' == 'Browser' and '$(BuildAOTTestsOnHelix)' != 'true' and '$(OnlyWasmBuildTests)' != 'true'">
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(TargetOS)' == 'Browser' and '$(BuildAOTTestsOnHelix)' != 'true' and '$(TestWasmBuildTests)' != 'true'">
<ProjectReference Include="$(MonoProjectRoot)sample\wasm\**\*.Sample.csproj"
Exclude="@(ProjectExclusions)"
BuildInParallel="true" />
Expand Down
62 changes: 49 additions & 13 deletions src/libraries/workloads-testing.targets
Original file line number Diff line number Diff line change
@@ -1,25 +1,45 @@
<Project>
<Target Name="ProvisionSdkForWorkloadTesting" Condition="!Exists($(SdkForWorkloadTestingStampPath)) and '$(InstallWorkloadForTesting)' == 'true'">
<Error Text="%24(SdkPathForWorkloadTesting) is not set" Condition="'$(SdkPathForWorkloadTesting)' == ''" />
<Target Name="ProvisionSdkForWorkloadTesting"
DependsOnTargets="_ProvisionSdkWithNoWorkload"
Condition="!Exists($(SdkWithNoWorkloadStampPath)) or !Exists($(SdkWithWorkloadStampPath))">

<Error Text="%24(SdkWithWorkloadForTestingPath) is not set" Condition="'$(SdkWithWorkloadForTestingPath)' == ''" />
<Error Text="%24(SdkVersionForWorkloadTesting) is not set" Condition="'$(SdkVersionForWorkloadTesting)' == ''" />

<Message Text="** Installing sdk $(SdkWithWorkloadForTestingPath) for workload based tests into $(SdkWithWorkloadForTestingPath)" Importance="High" />

<RemoveDir Directories="$(SdkWithWorkloadForTestingPath)" />
<MakeDir Directories="$(SdkWithWorkloadForTestingPath)" />

<ItemGroup>
<_SourceFiles Include="$(SdkWithNoWorkloadForTestingPath)\**" />
</ItemGroup>

<Copy SourceFiles="@(_SourceFiles)" DestinationFolder="$(SdkWithWorkloadForTestingPath)\%(_SourceFiles.RecursiveDir)" />
<WriteLinesToFile File="$(SdkWithWorkloadStampPath)" Lines="" Overwrite="true" />
</Target>

<Target Name="_ProvisionSdkWithNoWorkload" Condition="!Exists($(SdkWithNoWorkloadStampPath))">
<Error Text="%24(SdkWithNoWorkloadForTestingPath) is not set" Condition="'$(SdkWithNoWorkloadForTestingPath)' == ''" />
<Error Text="%24(SdkVersionForWorkloadTesting) is not set" Condition="'$(SdkVersionForWorkloadTesting)' == ''" />

<Message Text="** Installing sdk $(SdkVersionForWorkloadTesting) for workload based tests" Importance="High" />
<Message Text="** Installing sdk $(SdkWithNoWorkloadForTestingPath) for workload based tests into $(SdkWithNoWorkloadForTestingPath)" Importance="High" />

<RemoveDir Directories="$(SdkPathForWorkloadTesting)" />
<MakeDir Directories="$(SdkPathForWorkloadTesting)" />
<RemoveDir Directories="$(SdkWithNoWorkloadForTestingPath)" />
<MakeDir Directories="$(SdkWithNoWorkloadForTestingPath)" />

<PropertyGroup>
<_DotNetInstallScriptPath Condition="!$([MSBuild]::IsOSPlatform('windows'))">$(DOTNET_INSTALL_DIR)/dotnet-install.sh</_DotNetInstallScriptPath>
<_DotNetInstallScriptPath Condition=" $([MSBuild]::IsOSPlatform('windows'))">$(RepoRoot).dotnet\dotnet-install.ps1</_DotNetInstallScriptPath>
</PropertyGroup>

<Exec Condition="!$([MSBuild]::IsOSPlatform('windows'))"
Command="chmod +x $(_DotNetInstallScriptPath); $(_DotNetInstallScriptPath) -i $(SdkPathForWorkloadTesting) -v $(SdkVersionForWorkloadTesting)" />
Command="chmod +x $(_DotNetInstallScriptPath); $(_DotNetInstallScriptPath) -i $(SdkWithNoWorkloadForTestingPath) -v $(SdkVersionForWorkloadTesting)" />

<Exec Condition="$([MSBuild]::IsOSPlatform('windows'))"
Command='powershell -ExecutionPolicy ByPass -NoProfile -command "&amp; $(_DotNetInstallScriptPath) -InstallDir $(SdkPathForWorkloadTesting) -Version $(SdkVersionForWorkloadTesting)"' />
Command='powershell -ExecutionPolicy ByPass -NoProfile -command "&amp; $(_DotNetInstallScriptPath) -InstallDir $(SdkWithNoWorkloadForTestingPath) -Version $(SdkVersionForWorkloadTesting)"' />

<WriteLinesToFile File="$(SdkForWorkloadTestingStampPath)" Lines="" Overwrite="true" />
<WriteLinesToFile File="$(SdkWithNoWorkloadStampPath)" Lines="" Overwrite="true" />
</Target>

<Target Name="GetWorkloadInputs">
Expand All @@ -40,10 +60,12 @@

<Target Name="InstallWorkloadUsingArtifacts"
AfterTargets="ArchiveTests"
DependsOnTargets="ProvisionSdkForWorkloadTesting;GetWorkloadInputs"
DependsOnTargets="ProvisionSdkForWorkloadTesting;GetWorkloadInputs;_InstallWorkload;_UpdateManifestsForSdkWithNoWorkload"
Condition="'$(InstallWorkloadForTesting)' == 'true'" />

<Target Name="_InstallWorkload"
Inputs="@(AvailableNuGetsInArtifacts)"
Outputs="$(WorkloadStampFile)"
Condition="'$(InstallWorkloadForTesting)' == 'true'">
Outputs="$(SdkWithWorkload_WorkloadStampPath)">

<ItemGroup>
<_PropsForAOTCrossBuild Include="TestingWorkloads=true" />
Expand Down Expand Up @@ -79,8 +101,22 @@
VersionBand="$(SdkBandVersion)"
LocalNuGetsPath="$(LibrariesShippingPackagesDir)"
ExtraNuGetSources="@(_NuGetSourceForWorkloads)"
SdkDir="$(SdkPathForWorkloadTesting)" />
SdkDir="$(SdkWithWorkloadForTestingPath)" />
<WriteLinesToFile File="$(SdkWithWorkload_WorkloadStampPath)" Lines="" Overwrite="true" />
</Target>

<Target Name="_UpdateManifestsForSdkWithNoWorkload"
Inputs="@(AvailableNuGetsInArtifacts)"
Outputs="$(SdkWithNoWorkload_WorkloadStampPath)">

<InstallWorkloadFromArtifacts
WorkloadId="@(WorkloadIdForTesting)"
VersionBand="$(SdkBandVersion)"
LocalNuGetsPath="$(LibrariesShippingPackagesDir)"
ExtraNuGetSources="@(_NuGetSourceForWorkloads)"
SdkDir="$(SdkWithNoWorkloadForTestingPath)"
OnlyUpdateManifests="true"/>

<WriteLinesToFile File="$(WorkloadStampFile)" Lines="" Overwrite="true" />
<WriteLinesToFile File="$(SdkWithNoWorkload_WorkloadStampPath)" Lines="" Overwrite="true" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
<Project>
<Project TreatAsLocalProperty="UsingBrowserRuntimeWorkload;WasmNativeWorkload">
<PropertyGroup>
<RuntimePackInWorkloadVersion>${PackageVersion}</RuntimePackInWorkloadVersion>
<BrowserWorkloadDisabled Condition="'$(BrowserWorkloadDisabled)' == '' and
'$(RuntimeIdentifier)' == 'browser-wasm' and
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
!$([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '6.0'))">true</BrowserWorkloadDisabled>
</PropertyGroup>

<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' and '$(BrowserWorkloadDisabled)' == 'true'">
<_NativeBuildNeeded Condition="'$(RunAOTCompilation)' == 'true'">true</_NativeBuildNeeded>
<WorkloadDisabledWithReason Condition="'$(_NativeBuildNeeded)' == 'true'">WebAssembly workloads (required for AOT) are only supported for projects targeting net6.0+</WorkloadDisabledWithReason>
</PropertyGroup>

<PropertyGroup Condition="'$(RuntimeIdentifier)' == 'browser-wasm' AND '$(UsingBrowserRuntimeWorkload)' == ''">
<UsingBrowserRuntimeWorkload Condition="'$(RunAOTCompilation)' == 'true' or '$(UsingMicrosoftNETSdkBlazorWebAssembly)' != 'true'" >true</UsingBrowserRuntimeWorkload>
<UsingBrowserRuntimeWorkload Condition="'$(UsingBrowserRuntimeWorkload)' == ''" >$(WasmNativeWorkload)</UsingBrowserRuntimeWorkload>
</PropertyGroup>

<PropertyGroup Condition="'$(BrowserWorkloadDisabled)' == 'true'">
<UsingBrowserRuntimeWorkload>false</UsingBrowserRuntimeWorkload>
<WasmNativeWorkload>false</WasmNativeWorkload>
</PropertyGroup>

<PropertyGroup Condition="'$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true' and '$(UsingBrowserRuntimeWorkload)' == 'true'">
<WasmGenerateAppBundle>false</WasmGenerateAppBundle>
<UsingBlazorAOTWorkloadManifest>true</UsingBlazorAOTWorkloadManifest>
</PropertyGroup>

<Import Condition="'$(RunAOTCompilation)' == 'true'" Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task" />
<Import Condition="'$(RunAOTCompilation)' == 'true' and '$(BrowserWorkloadDisabled)' != 'true'" Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoAOTCompiler.Task" />

<ImportGroup Condition="'$(TargetPlatformIdentifier)' == 'android'">
<Import Project="Sdk.props" Sdk="Microsoft.NET.Runtime.MonoTargets.Sdk" />
Expand Down Expand Up @@ -112,4 +128,7 @@
/>
</ItemGroup>

<Target Name="ErrorDisabledWorkload" Condition="'$(WorkloadDisabledWithReason)' != ''" BeforeTargets="Publish">
<Error Text="$(WorkloadDisabledWithReason)" />
</Target>
</Project>
Loading