Skip to content

Commit c39af78

Browse files
committed
feat(assets): Adds support for content assets in NuGet and transive project refs
1 parent 460cd32 commit c39af78

33 files changed

+483
-57
lines changed

build/Uno.UI.Build.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
<ItemGroup>
202202
<_Sha1Replace Include="..\src\SourceGenerators\Uno.UI.Tasks\**\*.cs" />
203203
<_Sha1Replace Include="..\src\SourceGenerators\Uno.UI.Tasks\Uno.UI.Tasks.csproj" />
204-
<_Sha1Replace Include="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" />
204+
<_Sha1Replace Include="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*.*" />
205205
</ItemGroup>
206206

207207
<WriteLinesToFile

build/Uno.WinUI.nuspec

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -719,16 +719,16 @@
719719
<file src="uno.winui.runtime-replace.targets" target="buildTransitive\net6.0-macos" />
720720
<file src="uno.winui.runtime-replace.targets" target="buildTransitive\net5.0-windows" />
721721

722-
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" target="buildTransitive\MonoAndroid" />
723-
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" target="buildTransitive\xamarinios10" />
724-
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" target="buildTransitive\xamarinmac20" />
725-
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" target="buildTransitive\netstandard2.0" />
726-
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" target="buildTransitive\net7.0" />
727-
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" target="buildTransitive\net6.0-android30.0" />
728-
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" target="buildTransitive\net6.0-ios" />
729-
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" target="buildTransitive\net6.0-maccatalyst" />
730-
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" target="buildTransitive\net6.0-macos" />
731-
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" target="buildTransitive\net5.0-windows" />
722+
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*" target="buildTransitive\MonoAndroid" />
723+
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*" target="buildTransitive\xamarinios10" />
724+
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*" target="buildTransitive\xamarinmac20" />
725+
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*" target="buildTransitive\netstandard2.0" />
726+
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*" target="buildTransitive\net7.0" />
727+
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*" target="buildTransitive\net6.0-android30.0" />
728+
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*" target="buildTransitive\net6.0-ios" />
729+
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*" target="buildTransitive\net6.0-maccatalyst" />
730+
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*" target="buildTransitive\net6.0-macos" />
731+
<file src="..\src\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks*" target="buildTransitive\net5.0-windows" />
732732

733733
<!-- Force UAP to ignore netstandard 2.0 -->
734734
<file src="uno.winui.win.targets" target="buildTransitive\uap10.0.16299\uno.winui.targets" />

build/test-scripts/run-net6-mobile-template-tests.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,27 @@ Assert-ExitCodeIsZero
9696

9797
& dotnet build -c Debug MyAppXamlTrim\MyAppXamlTrim.Wasm\MyAppXamlTrim.Wasm.csproj /p:UnoXamlResourcesTrimming=true
9898
Assert-ExitCodeIsZero
99+
100+
# Uno Library
101+
dotnet new unolib -n MyUnoLib
102+
& $msbuild $debug /t:pack MyUnoLib\MyUnoLib.csproj
103+
Assert-ExitCodeIsZero
104+
105+
#
106+
# Uno Library with assets, Validate assets count
107+
#
108+
dotnet new unolib -n MyUnoLib2
109+
mkdir MyUnoLib2\Assets
110+
echo "Test file" > MyUnoLib2\Assets\MyTestAsset01.txt
111+
& $msbuild $debug /t:pack /p:IncludeContentInPack=false MyUnoLib2\MyUnoLib2.csproj -bl
112+
Assert-ExitCodeIsZero
113+
114+
mv MyUnoLib2\Bin\Debug\MyUnoLib2.1.0.0.nupkg MyUnoLib2\Bin\Debug\MyUnoLib2.1.0.0.zip
115+
Expand-Archive -LiteralPath MyUnoLib2\Bin\Debug\MyUnoLib2.1.0.0.zip -DestinationPath MyUnoLib2Extract
116+
117+
$assetsCount = Get-ChildItem MyUnoLib2Extract\ -Filter MyTestAsset01.txt -Recurse -File | Measure-Object | %{$_.Count}
118+
119+
if ($assetsCount -ne 6)
120+
{
121+
throw "Not enough assets in the package."
122+
}

build/test-scripts/run-template-tests.ps1

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ dotnet new unoapp-uwp -n MyApp.Android (Get-TemplateConfiguration -android 1)
103103
& $msbuild $debug MyApp.Android\MyApp.Android.sln
104104
Assert-ExitCodeIsZero
105105

106-
# Uno Library
107-
dotnet new unolib -n MyUnoLib
108-
& $msbuild $debug /t:Pack MyUnoLib\MyUnoLib.csproj
109-
Assert-ExitCodeIsZero
110-
111106
# Uno Cross-Runtime Library
112107
dotnet new unolib-crossruntime -n MyCrossRuntimeLib
113108
& $msbuild $debug /t:Pack MyCrossRuntimeLib\MyCrossRuntimeLib.sln

doc/articles/features/file-management.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Note that you can view the content of the **IndexedDB** in the Application tab o
4949

5050
## Support for `StorageFile.GetFileFromApplicationUriAsync`
5151

52-
Uno supports the ability to get package files using the [`StorageFile.GetFileFromApplicationUriAsync`](https://docs.microsoft.com/en-us/uwp/api/windows.storage.storagefile.getfilefromapplicationuriasync).
52+
Uno Platform supports the ability to get package files using the [`StorageFile.GetFileFromApplicationUriAsync`](https://docs.microsoft.com/en-us/uwp/api/windows.storage.storagefile.getfilefromapplicationuriasync).
5353

5454
Support per platform may vary:
5555
- On non-WebAssembly targets, the file is available directly as it is a part of the installed package.
@@ -68,6 +68,15 @@ Given than in the project there's the following declaration:
6868
</ItemGroup>
6969
```
7070

71+
### Support for Library provided assets
72+
Since Uno Platform 4.6, the `GetFileFromApplicationUriAsync` method supports reading assets provided by `ProjectReference` or `PackageReference` libraries, using the following syntax:
73+
74+
Given a library or package named `MyLibray01`, the following can be used to read assets:
75+
```csharp
76+
var file = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx://MyLibray01/MyPackageFile.xml"));
77+
var content = await FileIO.ReadTextAsync(file);
78+
```
79+
7180
## Support for `RandomAccessStreamReference.CreateFromUri`
7281

7382
Uno Platform supports the creation of a `RandomAccessStreamReference` from an `Uri` (`RandomAccessStreamReference.CreateFromUri`), but note that on WASM downloading a file from a server often causes issues with [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).

doc/articles/get-started-vs-2022.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ To create an Uno Platform app:
6666
1. To run the **WebAssembly** (Wasm) head:
6767
- Right click on the `MyApp.Wasm` project, select **Set as startup project**
6868
- Press the `MyApp.Wasm` button to deploy the app
69+
1. To run the ASP.NET Hosted **WebAssembly** (Server) head:
70+
- Right click on the `MyApp.Server` project, select **Set as startup project**
71+
- Press the `MyApp.Server` button to deploy the app
6972
1. To debug for **iOS**:
7073
- Right click on the `MyApp.Mobile` project, select **Set as startup project**
7174
- In the "Debug toolbar" drop down, select framework `net6.0-ios`:

doc/articles/guides/how-to-create-control-libraries.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,24 @@ You can find the [full sample code](https://github.com/unoplatform/Uno.Samples/b
5454
```xml
5555
<myControlLib:MyTemplatedControl />
5656
```
57+
58+
## Library assets
59+
60+
WinUI 3 and Uno Platform (4.6 and later) Libraries support the inclusion of content assets to be used with [`StorageFile.GetFileFromApplicationUriAsync`](../features/file-management.md#support-for-storagefilegetfilefromapplicationuriasync), as well as with the `ms-appx://[libraryname]/[assetname_file_name]` format.
61+
62+
Library assets can be of any type.
63+
64+
Library assets are supported in two configurations:
65+
- `ProjectReference`, where the library project is included in the solution with the application that uses it
66+
- `PackageReference`, where the library project is being packaged as a NuGet package, and used in a separate solution, from a NuGet feed.
67+
68+
In both cases, for the build system to include the assets files, the following property must be set in the library's `.csproj`:
69+
70+
```xml
71+
<PropertyGroup>
72+
<GenerateLibraryLayout>true</GenerateLibraryLayout>
73+
</PropertyGroup>
74+
```
75+
76+
> [!IMPORTANT]
77+
> WinAppSDK [does not support assets](https://github.com/microsoft/microsoft-ui-xaml/issues/6429) if the application is using the MSIX package mode. To use the unpackaged mode, [see this article](../features/winapp-sdk-specifics.md#unpackaged-application-support).

src/SamplesApp/SamplesApp.Skia.Gtk/SamplesApp.Skia.Gtk.csproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,21 @@
5252
<Compile Update="Program.cs" />
5353
</ItemGroup>
5454

55+
<PropertyGroup>
56+
<UnoUIMSBuildTasksPath>$(MSBuildThisFileDirectory)..\..\SourceGenerators\Uno.UI.Tasks\bin\$(Configuration)_Shadow</UnoUIMSBuildTasksPath>
57+
</PropertyGroup>
58+
59+
<Import Project="..\..\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" Condition="'$(SkipUnoResourceGeneration)' == '' " />
60+
5561
<Import Project="..\..\..\build\*.Skia.Gtk.props" />
5662
<Import Project="..\..\..\build\*.Skia.Gtk.targets" />
5763
<Import Project="..\..\..\build\uno.winui.runtime-replace.targets" />
5864

65+
<Target Name="ValidateTransientLocalAssets"
66+
AfterTargets="Build"
67+
Condition="'$(TargetFramework)'!=''">
68+
<Message Text="Validating local assets" Importance="high" />
69+
<Error Condition="!Exists('$(OutputPath)Uno.UI.RuntimeTests\Assets\TransientAsset01.txt')" Text="$(OutputPath)Uno.UI.RuntimeTests\Assets\TransientAsset01.txt" />
70+
</Target>
71+
5972
</Project>

src/SamplesApp/SamplesApp.iOS/SamplesApp.iOS.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@
105105
</PropertyGroup>
106106
<ItemGroup>
107107
<Compile Include="Main.cs" />
108-
<Content Include="LinkerExclusions.xml" />
108+
<None Include="LinkerExclusions.xml" />
109109
<BundleResource Include="Resources\sound.mp3" />
110110
<None Include="Resources\Default-568h%402x.png" />
111111
<None Include="Info.plist" />
112112
<Compile Include="Properties\AssemblyInfo.cs" />
113-
<Content Include="Entitlements.plist" />
113+
<None Include="Entitlements.plist" />
114114
<BundleResource Include="Resources\Fonts\uno-fluentui-assets.ttf">
115115
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
116116
</BundleResource>

src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@
124124
</ItemGroup>
125125

126126
<ItemGroup>
127-
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\*.vstemplate" />
128-
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\**\__*.png" />
129-
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\obj\**" />
130-
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\bin\**" />
131-
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\Properties\**" />
132-
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate\UnoLibraryTemplate.csproj" />
133-
134-
<_UnoLibTemplateFiles Include="..\UnoLibraryTemplate\**" Exclude="@(_UnoLibTemplateFilesExclude)" />
127+
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate.net6\*.vstemplate" />
128+
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate.net6\**\__*.png" />
129+
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate.net6\obj\**" />
130+
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate.net6\bin\**" />
131+
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate.net6\Properties\**" />
132+
<_UnoLibTemplateFilesExclude Include="..\UnoLibraryTemplate.net6\UnoLibraryTemplate.net6.csproj" />
133+
134+
<_UnoLibTemplateFiles Include="..\UnoLibraryTemplate.net6\**" Exclude="@(_UnoLibTemplateFilesExclude)" />
135135
</ItemGroup>
136136

137137
<ItemGroup>

src/SolutionTemplate/UnoLibraryTemplate.net6/CrossTargetedLibrary.csproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@
66
<GenerateLibraryLayout>true</GenerateLibraryLayout>
77
</PropertyGroup>
88

9-
<ItemGroup>
10-
<PackageReference Include="Uno.WinUI" Version="4.2.6" />
11-
</ItemGroup>
12-
13-
<ItemGroup Condition="'$(TargetFramework)'=='net6.0-windows10.0.18362'">
9+
<ItemGroup Condition="'$(TargetPlatformIdentifier)'=='Windows'">
1410
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.3" />
1511

1612
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22000.24" />
1713
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22000.24" />
1814
</ItemGroup>
1915

20-
<ItemGroup Condition="'$(TargetFramework)'!='net6.0-windows10.0.18362'">
16+
<ItemGroup Condition="'$(TargetPlatformIdentifier)'!='Windows'">
17+
<PackageReference Include="Uno.WinUI" Version="4.2.6" />
18+
</ItemGroup>
19+
20+
<ItemGroup Condition="'$(TargetPlatformIdentifier)'!='Windows'">
21+
<Content Include="Assets\**" />
2122
<Page Include="**\*.xaml" Exclude="bin\**\*.xaml;obj\**\*.xaml" />
2223
<Compile Update="**\*.xaml.cs">
2324
<DependentUpon>%(Filename)</DependentUpon>

src/SolutionTemplate/UnoSolutionTemplate.Wizard.2022/UnoSolutionTemplate.Wizard.2022.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
<Compile Include="Forms\UnoOptions.Designer.cs">
5757
<DependentUpon>UnoOptions.cs</DependentUpon>
5858
</Compile>
59-
<Compile Include="Forms\UnoOptionsBaseForm.cs" />
59+
<Compile Include="Forms\UnoOptionsBaseForm.cs">
60+
<SubType>Form</SubType>
61+
</Compile>
6062
<Compile Include="Forms\UnoWasmOptions.cs">
6163
<SubType>Form</SubType>
6264
</Compile>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#nullable enable
2+
3+
using System;
4+
using System.Collections.Generic;
5+
using System.IO;
6+
using Microsoft.Build.Framework;
7+
using Microsoft.Build.Utilities;
8+
9+
namespace Uno.UI.Tasks.Assets
10+
{
11+
/// <summary>
12+
/// Expands content assets from folders containing an uprimarker file
13+
/// </summary>
14+
public class ExpandPackageAssets_v0 : Task
15+
{
16+
[Required]
17+
public ITaskItem[]? MarkerFiles { get; set; }
18+
19+
[Output]
20+
public ITaskItem[]? Assets { get; set; }
21+
= Array.Empty<ITaskItem>();
22+
23+
public override bool Execute()
24+
{
25+
Log.LogMessage($"Expanding package assets");
26+
27+
if (MarkerFiles != null)
28+
{
29+
List<ITaskItem> assets = new();
30+
31+
foreach (var markerFile in MarkerFiles)
32+
{
33+
var markerFileFullPath = markerFile.GetMetadata("FullPath");
34+
var markerFileDirectory = Path.GetDirectoryName(markerFileFullPath);
35+
var basePath = Path.Combine(markerFileDirectory, Path.GetFileNameWithoutExtension(markerFileFullPath));
36+
37+
if (Directory.Exists(basePath))
38+
{
39+
Log.LogMessage(MessageImportance.Low, $"Scanning directory ({basePath})");
40+
41+
var markerFileDirectoryForReplace = markerFileDirectory + Path.DirectorySeparatorChar;
42+
43+
foreach (var asset in Directory.EnumerateFiles(basePath, "*.*", SearchOption.AllDirectories))
44+
{
45+
var newItem = new TaskItem(
46+
asset,
47+
new Dictionary<string, string>
48+
{
49+
["TargetPath"] = asset.Replace(markerFileDirectoryForReplace, "")
50+
});
51+
52+
assets.Add(newItem);
53+
}
54+
}
55+
else
56+
{
57+
Log.LogMessage(MessageImportance.Low, $"No assets directory found ({basePath})");
58+
}
59+
}
60+
61+
Assets = assets.ToArray();
62+
}
63+
64+
return true;
65+
}
66+
}
67+
}

src/SourceGenerators/Uno.UI.Tasks/Assets/RetargetAssets.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,26 @@ private TaskItem ProcessContentItem(ITaskItem asset, Func<ResourceCandidate, str
7575
{
7676
if (
7777
!asset.MetadataNames.OfType<string>().Contains("Link")
78+
&& !asset.MetadataNames.OfType<string>().Contains("TargetPath")
7879
&& !asset.MetadataNames.OfType<string>().Contains("DefiningProjectDirectory")
7980
)
8081
{
81-
Log.LogMessage($"Skipping '{asset.ItemSpec}' because 'Link' or 'DefiningProjectDirectory' metadata is not set.");
82+
Log.LogMessage($"Skipping '{asset.ItemSpec}' because 'Link', 'TargetPath' or 'DefiningProjectDirectory' metadata is not set.");
8283
return null;
8384
}
8485

8586
var fullPath = asset.GetMetadata("FullPath");
86-
var relativePath = asset.GetMetadata("Link");
87+
var relativePath = asset.GetMetadata("Link") is { Length: > 0 } link
88+
? link
89+
: asset.GetMetadata("TargetPath");
8790

8891
if (string.IsNullOrEmpty(relativePath))
8992
{
9093
relativePath = fullPath.Replace(asset.GetMetadata("DefiningProjectDirectory"), "");
9194
}
9295

96+
relativePath = AlignPath(relativePath);
97+
9398
if (IsImageAsset(asset.ItemSpec))
9499
{
95100
var resourceCandidate = ResourceCandidate.Parse(fullPath, relativePath);
@@ -138,5 +143,10 @@ private static bool IsImageAsset(string path)
138143
|| extension == ".jpeg"
139144
|| extension == ".gif";
140145
}
146+
147+
private static string AlignPath(string path)
148+
=> path
149+
.Replace('/', Path.DirectorySeparatorChar)
150+
.Replace('\\', Path.DirectorySeparatorChar);
141151
}
142152
}

src/SourceGenerators/Uno.UI.Tasks/Content/Uno.UI.Tasks.targets

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<UnoSourceGeneratorBeforeTarget Condition="'$(XamarinProjectType)'=='android'" Include="UpdateAndroidAssets" />
1010
</ItemGroup>
1111

12+
<Import Project="uno.ui.tasks.assets.targets"/>
13+
1214
<UsingTask AssemblyFile="$(UnoUIMSBuildTasksPath)\Uno.UI.Tasks.v0.dll" TaskName="Uno.UI.Tasks.ResourcesGenerator.ResourcesGenerationTask_v0" />
1315
<UsingTask AssemblyFile="$(UnoUIMSBuildTasksPath)\Uno.UI.Tasks.v0.dll" TaskName="Uno.UI.Tasks.Assets.RetargetAssets_v0" />
1416
<UsingTask AssemblyFile="$(UnoUIMSBuildTasksPath)\Uno.UI.Tasks.v0.dll" TaskName="Uno.UI.Tasks.LinkerHintsGenerator.LinkerHintGeneratorTask_v0" TaskFactory="TaskHostFactory" />
@@ -52,17 +54,22 @@
5254
</Target>
5355

5456
<Target Name="UnoAssetsGeneration"
55-
BeforeTargets="_GetLibraryImports;PrepareForBuild;_CheckForContent;_CollectBundleResources"
56-
DependsOnTargets="ResolveProjectReferences"
57-
Condition="'$(DesignTimeBuild)' != 'true' and '$(BuildingInsideUnoSourceGenerator)' == '' and ('$(XamarinProjectType)'!='' or '$(UnoForceProcessPRIResource)'!='')">
57+
BeforeTargets="_GetLibraryImports;_CheckForContent;_CollectBundleResources"
58+
DependsOnTargets="ResolveProjectReferences;GetCopyToOutputDirectoryItems"
59+
Condition="
60+
'$(DesignTimeBuild)' != 'true'
61+
and '$(BuildingInsideUnoSourceGenerator)' == ''
62+
and ('$(IsUnoHead)'=='true'
63+
or '$(AndroidApplication)'=='true'
64+
or '$(ProjectTypeGuids)'!='')">
5865
<!-- Assets -->
5966
<PropertyGroup>
6067
<UseHighDPIResources Condition="'$(UseHighDPIResources)'==''">True</UseHighDPIResources>
6168
</PropertyGroup>
6269
<RetargetAssets_v0 UseHighDPIResources="$(UseHighDPIResources)"
6370
TargetPlatform="$(XamarinProjectType)"
6471
DefaultLanguage="$(DefaultLanguage)"
65-
ContentItems="@(Content)"
72+
ContentItems="@(Content);@(_SourceItemsToCopyToOutputDirectory)"
6673
AndroidAssetsPrefix="$(MonoAndroidAssetsPrefix)"
6774
Condition="'$(XamarinProjectType)'!=''">
6875
<Output TaskParameter="Assets"

0 commit comments

Comments
 (0)