diff --git a/src/Controls/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.SingleProject.targets b/src/Controls/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.SingleProject.targets index c8183a8997d5..e0db69a5cf93 100644 --- a/src/Controls/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.SingleProject.targets +++ b/src/Controls/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.SingleProject.targets @@ -61,6 +61,63 @@ + + + + _MauiRemoveResourcesPrefixFromBundleResource; + $(CollectBundleResourcesDependsOn); + + + + + + <_MauiBundleResourceWithLogicalName + Include="@(BundleResource->HasMetadata('LogicalName'))" /> + <_MauiBundleResourceWithLink + Include="@(BundleResource->HasMetadata('Link'))" + Exclude="@(_MauiBundleResourceWithLogicalName)" /> + <_MauiBundleResourceWithoutLink + Include="@(BundleResource)" + Exclude="@(_MauiBundleResourceWithLink);@(_MauiBundleResourceWithLogicalName)" /> + + + + <_MauiBundleResourceWithRelativeLogicalName + Include="@(_MauiBundleResourceWithLink)" + LogicalName="$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)/Resources/', '$(MSBuildProjectDirectory)/%(Link)'))" /> + <_MauiBundleResourceWithRelativeLogicalName + Include="@(_MauiBundleResourceWithoutLink)" + LogicalName="$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)/Resources/', '%(FullPath)'))" /> + + + + <_MauiBundleResourceWithCorrectLogicalName + Include="@(_MauiBundleResourceWithRelativeLogicalName)" + Condition="!$([System.String]::new('%(_MauiBundleResourceWithRelativeLogicalName.LogicalName)').StartsWith('..'))" /> + + + + + + + + + <_MauiBundleResourceResult Include="@(BundleResource)" /> + <_MauiBundleResourceWithLogicalName Remove="@(_MauiBundleResourceWithLogicalName)" /> + <_MauiBundleResourceWithLink Remove="@(_MauiBundleResourceWithLink)" /> + <_MauiBundleResourceWithoutLink Remove="@(_MauiBundleResourceWithoutLink)" /> + <_MauiBundleResourceWithRelativeLogicalName Remove="@(_MauiBundleResourceWithRelativeLogicalName)" /> + <_MauiBundleResourceWithCorrectLogicalName Remove="@(_MauiBundleResourceWithCorrectLogicalName)" /> + <_MauiBundleResourceResult Remove="@(_MauiBundleResourceResult)" /> + + + $(MSBuildExtensionsPath)\Microsoft\VisualStudio\Maui\Maui.DesignTime.targets