Skip to content

Commit

Permalink
fix(net9): Adjust transitive asset inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban authored Nov 22, 2024
1 parent 78e0121 commit a06dc46
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,26 @@
ContentRoot="$(MSBuildProjectDirectory)\wwwroot\"
BasePath="$(StaticWebAssetBasePath)"
AssetMergeSource="$(StaticWebAssetMergeTarget)">
<Output TaskParameter="Assets" ItemName="StaticWebAsset" />
<Output TaskParameter="Assets" ItemName="_UnoTransitiveItems_StaticWebAsset" />
</DefineStaticWebAssets>

<RemoveDuplicates Inputs="@(StaticWebAsset);@(_UnoTransitiveItems_StaticWebAsset)">
<Output TaskParameter="Filtered" ItemName="_UnoTransitiveItems_Unique_StaticWebAsset"/>
</RemoveDuplicates>

<ItemGroup>
<StaticWebAsset Remove="@(StaticWebAsset)" />
<StaticWebAsset Include="@(_UnoTransitiveItems_Unique_StaticWebAsset)" />

<_UnoTransitiveItems_Unique_StaticWebAsset Remove="@(_UnoTransitiveItems_Unique_StaticWebAsset)" />
<_UnoTransitiveItems_Unique_StaticWebAsset Remove="@(_UnoTransitiveItems_StaticWebAsset)" />
</ItemGroup>

<DefineStaticWebAssetEndpoints
CandidateAssets="@(StaticWebAsset)"
ExistingEndpoints="@(StaticWebAssetEndpoint)"
ContentTypeMappings="@(StaticWebAssetContentTypeMapping)"
>
>
<Output TaskParameter="Endpoints" ItemName="StaticWebAssetEndpoint" />
</DefineStaticWebAssetEndpoints>

Expand Down
9 changes: 9 additions & 0 deletions src/Uno.Sdk/targets/Uno.DefaultItems.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,39 @@
<!-- Include all images by default - matches the __WindowsAppSdkDefaultImageIncludes property in the WindowsAppSDK -->
<Content Include="$(AssetsFolder)**"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);**\*.svg;**\*.cs;@(Content)"
CopyToOutputDirectory="true"
IsDefaultItem="true" />
<Content Include="$(AssetsFolder)\**\Svg\**\*.svg"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);**\*.cs;@(Content)"
CopyToOutputDirectory="true"
IsDefaultItem="true" />
<Content Include="**\*.png"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(Content)"
CopyToOutputDirectory="true"
IsDefaultItem="true" />
<Content Include="**\*.bmp"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(Content)"
CopyToOutputDirectory="true"
IsDefaultItem="true" />
<Content Include="**\*.jpg"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(Content)"
CopyToOutputDirectory="true"
IsDefaultItem="true" />
<Content Include="**\*.dds"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(Content)"
CopyToOutputDirectory="true"
IsDefaultItem="true" />
<Content Include="**\*.tif"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(Content)"
CopyToOutputDirectory="true"
IsDefaultItem="true" />
<Content Include="**\*.tga"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(Content)"
CopyToOutputDirectory="true"
IsDefaultItem="true" />
<Content Include="**\*.gif"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(Content)"
CopyToOutputDirectory="true"
IsDefaultItem="true" />
<Page Include="**\*.xaml"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(Page);App.xaml"
Expand Down

0 comments on commit a06dc46

Please sign in to comment.