Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
[wasm] Bump sdk version for workload testing to 6.0.100-rc.2.21467.10
.. and update the BlazorOverwrite.targets to match.
(from sdk commit: e89f3d77dbd6f41890b10eafd98505261fa63755)
  • Loading branch information
radical committed Sep 17, 2021
commit 4021d7a145014baa9740e0c2606e3daeedc5adfb
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.2.21463.12</SdkVersionForWorkloadTesting>
<SdkVersionForWorkloadTesting>6.0.100-rc.2.21467.10</SdkVersionForWorkloadTesting>
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>6.0.0-preview-20210916.1</MicrosoftPrivateIntellisenseVersion>
<!-- ILLink -->
Expand Down
120 changes: 5 additions & 115 deletions src/mono/wasm/BlazorOverwrite.targets
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ Copyright (c) .NET Foundation. All rights reserved.
<DisableAutoWasmPublishApp>true</DisableAutoWasmPublishApp>
<EnableDefaultWasmAssembliesToBundle>false</EnableDefaultWasmAssembliesToBundle>
<WasmNestedPublishAppDependsOn>ComputeFilesToPublish;_GatherWasmFilesToPublish;$(WasmNestedPublishAppDependsOn)</WasmNestedPublishAppDependsOn>
<_ScrambleDotnetJsFileNameAfterThisTarget Condition="'$(UsingBrowserRuntimeWorkload)' != 'true'">ResolveRuntimePackAssets</_ScrambleDotnetJsFileNameAfterThisTarget>
<_ScrambleDotnetJsFileNameAfterThisTarget Condition="'$(UsingBrowserRuntimeWorkload)' == 'true'">WasmBuildApp</_ScrambleDotnetJsFileNameAfterThisTarget>

<!-- Workaround https://github.com/dotnet/sdk/issues/20923 where we end up with two publish dirs - 'Publish', and 'publish' -->
<PublishDirName Condition="'$(PublishDirName)' == 'publish'">Publish</PublishDirName>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -114,115 +109,6 @@ Copyright (c) .NET Foundation. All rights reserved.

<Import Project="Microsoft.NET.Sdk.BlazorWebAssembly.ServiceWorkerAssetsManifest.targets" Condition="'$(ServiceWorkerAssetsManifest)' != ''" />

<Target Name="_ScrambleDotnetJsFileNameForPublish">
<!--
We want the dotnet.js file output to have a version to better work with caching. We'll append the runtime version to the file name as soon as file has been discovered.
-->
<PropertyGroup>
<_DotNetJsVersion>$(BundledNETCoreAppPackageVersion)</_DotNetJsVersion>
<_DotNetJsVersion Condition="'$(RuntimeFrameworkVersion)' != ''">$(RuntimeFrameworkVersion)</_DotNetJsVersion>
<_BlazorDotnetJsFileName>dotnet.$(_DotNetJsVersion).js</_BlazorDotnetJsFileName>
</PropertyGroup>

<ItemGroup Condition="@(WasmNativeAsset->Count()) != 0">
<_DotNetJsItem Remove="@(_DotNetJsItem)" />
<_DotNetJsItem Include="@(WasmNativeAsset)" Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.js'">
<RelativePath>_framework/$(_BlazorDotnetJsFileName)</RelativePath>
<AssetType>native</AssetType>
<CopyLocal>true</CopyLocal>
</_DotNetJsItem>
</ItemGroup>

<ItemGroup>
<_DotnetJsStaticWebAssetCandidate Remove="@(_DotnetJsStaticWebAssetCandidate)" />
<_DotnetJsCopyCandidates Remove="@(_DotnetJsCopyCandidates)" />
</ItemGroup>

<DefineStaticWebAssets Condition="'@(_DotNetJsItem->Count())' != '0'"
CandidateAssets="@(_DotNetJsItem)"
SourceId="$(PackageId)"
SourceType="Computed"
AssetKind="Build"
AssetRole="Primary"
AssetTraitName="BlazorWebAssemblyResource"
AssetTraitValue="native"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="Never"
ContentRoot="$(IntermediateOutputPath)\blazor"
BasePath="$(StaticWebAssetBasePath)"
>
<Output TaskParameter="Assets" ItemName="_DotnetJsStaticWebAssetCandidate" />
<Output TaskParameter="CopyCandidates" ItemName="_DotnetJsCopyCandidates" />
</DefineStaticWebAssets>

<Copy
SourceFiles="@(_DotnetJsCopyCandidates)"
DestinationFiles="@(_DotnetJsCopyCandidates->'%(TargetPath)')"
SkipUnchangedFiles="true"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" />

<ItemGroup Condition="'@(_DotNetJsItem->Count())' != '0'">
<ReferenceCopyLocalPaths Remove="@(_DotNetJsItem)" />
<_DotnetJsStaticWebAsset Include="@(_DotnetJsStaticWebAssetCandidate->'%(ContentRoot)_framework\dotnet.js')" />
<_BlazorStaticWebAsset Include="@(_DotnetJsStaticWebAsset)" />
</ItemGroup>
</Target>

<Target Name="_ScrambleDotnetJsFileName" AfterTargets="$(_ScrambleDotnetJsFileNameAfterThisTarget)">
<!--
We want the dotnet.js file output to have a version to better work with caching. We'll append the runtime version to the file name as soon as file has been discovered.
-->
<PropertyGroup>
<_DotNetJsVersion>$(BundledNETCoreAppPackageVersion)</_DotNetJsVersion>
<_DotNetJsVersion Condition="'$(RuntimeFrameworkVersion)' != ''">$(RuntimeFrameworkVersion)</_DotNetJsVersion>
<_BlazorDotnetJsFileName>dotnet.$(_DotNetJsVersion).js</_BlazorDotnetJsFileName>
</PropertyGroup>

<ItemGroup Condition="@(WasmNativeAsset->Count()) == 0">
<_DotNetJsItem Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.DestinationSubPath)' == 'dotnet.js' AND '%(ReferenceCopyLocalPaths.AssetType)' == 'native'">
<RelativePath>_framework/$(_BlazorDotnetJsFileName)</RelativePath>
</_DotNetJsItem>
</ItemGroup>

<ItemGroup Condition="@(WasmNativeAsset->Count()) != 0">
<_DotNetJsItem Remove="@(_DotNetJsItem)" />
<_DotNetJsItem Include="@(WasmNativeAsset)" Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.js'">
<RelativePath>_framework/$(_BlazorDotnetJsFileName)</RelativePath>
<AssetType>native</AssetType>
<CopyLocal>true</CopyLocal>
</_DotNetJsItem>
</ItemGroup>

<DefineStaticWebAssets Condition="'@(_DotNetJsItem->Count())' != '0'"
CandidateAssets="@(_DotNetJsItem)"
SourceId="$(PackageId)"
SourceType="Computed"
AssetKind="Build"
AssetRole="Primary"
AssetTraitName="BlazorWebAssemblyResource"
AssetTraitValue="native"
CopyToOutputDirectory="PreserveNewest"
CopyToPublishDirectory="Never"
ContentRoot="$(IntermediateOutputPath)\blazor"
BasePath="$(StaticWebAssetBasePath)"
>
<Output TaskParameter="Assets" ItemName="_DotnetJsStaticWebAssetCandidate" />
<Output TaskParameter="CopyCandidates" ItemName="_DotnetJsCopyCandidates" />
</DefineStaticWebAssets>

<Copy
SourceFiles="@(_DotnetJsCopyCandidates)"
DestinationFiles="@(_DotnetJsCopyCandidates->'%(TargetPath)')"
SkipUnchangedFiles="true"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" />

<ItemGroup Condition="'@(_DotNetJsItem->Count())' != '0'">
<ReferenceCopyLocalPaths Remove="@(_DotNetJsItem)" />
<_DotnetJsStaticWebAsset Include="@(_DotnetJsStaticWebAssetCandidate->'%(ContentRoot)_framework\dotnet.js')" />
<_BlazorStaticWebAsset Include="@(_DotnetJsStaticWebAsset)" />
</ItemGroup>
</Target>

<Target Name="_BlazorWasmNativeForBuild" DependsOnTargets="_GatherWasmFilesToBuild;WasmBuildApp" Condition="'$(UsingBrowserRuntimeWorkload)' == 'true'" />

<Target Name="_GatherWasmFilesToBuild">
Expand Down Expand Up @@ -265,6 +151,7 @@ Copyright (c) .NET Foundation. All rights reserved.

<_BlazorConfigFileCandidates Include="@(StaticWebAsset)" Condition="'%(SourceType)' == 'Discovered'" />

<!-- Remove dotnet.js/wasm from runtime pack, in favor of the relinked ones in @(WasmNativeAsset) -->
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)"
Condition="@(WasmNativeAsset->Count()) > 0 and '%(FileName)' == 'dotnet' and ('%(Extension)' == '.wasm' or '%(Extension)' == '.js')" />
</ItemGroup>
Expand All @@ -278,6 +165,7 @@ Copyright (c) .NET Foundation. All rights reserved.
TimeZoneSupport="$(_BlazorEnableTimeZoneSupport)"
InvariantGlobalization="$(_BlazorInvariantGlobalization)"
CopySymbols="$(_BlazorCopyOutputSymbolsToOutputDirectory)"
BundledNETCoreAppPackageVersion="$(BundledNETCoreAppPackageVersion)"
OutputPath="$(OutputPath)"
>
<Output TaskParameter="AssetCandidates" ItemName="_BuildAssetsCandidates" />
Expand Down Expand Up @@ -490,6 +378,7 @@ Copyright (c) .NET Foundation. All rights reserved.
</ItemGroup>
</Target>

<!-- Wasm's Nested publish is run just to build the native bits. We don't need to run blazor targets for that -->
<Target Name="ProcessPublishFilesForBlazor" DependsOnTargets="_ResolveBlazorWasmConfiguration;LoadStaticWebAssetsBuildManifest" AfterTargets="ILLink" Condition="'$(WasmBuildingForNestedPublish)' != 'true'">
<PropertyGroup>
<_BlazorAotEnabled>$(UsingBrowserRuntimeWorkload)</_BlazorAotEnabled>
Expand Down Expand Up @@ -519,6 +408,7 @@ Copyright (c) .NET Foundation. All rights reserved.
InvariantGlobalization="$(_BlazorInvariantGlobalization)"
CopySymbols="$(CopyOutputSymbolsToPublishDirectory)"
ExistingAssets="@(_BlazorPublishPrefilteredAssets)"
BundledNETCoreAppPackageVersion="$(BundledNETCoreAppPackageVersion)"
>
<Output TaskParameter="NewCandidates" ItemName="_NewBlazorPublishStaticWebAssets" />
<Output TaskParameter="FilesToRemove" ItemName="_PublishResolvedFilesToRemove" />
Expand Down Expand Up @@ -649,7 +539,7 @@ Copyright (c) .NET Foundation. All rights reserved.
</Target>

<Target Name="_BlazorWasmNative"
DependsOnTargets="_EnsureWasmRuntimeWorkload;WasmTriggerPublishApp;_ScrambleDotnetJsFileNameForPublish"
DependsOnTargets="_EnsureWasmRuntimeWorkload;WasmTriggerPublishApp"
BeforeTargets="ProcessPublishFilesForBlazor"
Condition="'$(UsingBrowserRuntimeWorkload)' == 'true'" />

Expand Down