Skip to content

Commit

Permalink
Merge pull request #1845 from unoplatform/dev/nr/primauifix
Browse files Browse the repository at this point in the history
fix: Adding PRI workaround
  • Loading branch information
nickrandolph authored Sep 1, 2023
2 parents 2d5a304 + ab08619 commit 8a0eab6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Uno.Extensions.Maui.UI/build/Package.targets
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,23 @@
</Task>
</UsingTask>


<!-- Workaround to avoid including Uno.Toolkit.UI XBFs in the PRI file -->
<Target Name="AdjustGetPackagingOutput1" AfterTargets="GetMrtPackagingOutputs">
<Message Importance="high" Text="Applying NuGet packaging workaround for dependent PRI files exclusion" />
<ItemGroup>
<_OtherPriFiles Include="@(PackagingOutputs)" Condition="'%(Extension)' == '.pri' and ('%(PackagingOutputs.ReferenceSourceTarget)' == 'ProjectReference' or '%(PackagingOutputs.NugetSourceType)'=='Package')" />
<PackagingOutputs Remove="@(_OtherPriFiles)" />
</ItemGroup>
</Target>
<Target Name="AdjustGetPackagingOutput2" BeforeTargets="AddPriPayloadFilesToCopyToOutputDirectoryItems">
<Message Importance="high" Text="Applying NuGet packaging workaround for dependent PRI files exclusion" />
<ItemGroup>
<_OtherPriFiles1 Include="@(_ReferenceRelatedPaths)" Condition="'%(Extension)' == '.pri' and ('%(_ReferenceRelatedPaths.ReferenceSourceTarget)' == 'ProjectReference' or '%(_ReferenceRelatedPaths.NugetSourceType)'=='Package')" />
<_ReferenceRelatedPaths Remove="@(_OtherPriFiles1)" />
<_OtherPriFiles2 Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' == '.pri' and ('%(ReferenceCopyLocalPaths.ReferenceSourceTarget)' == 'ProjectReference' or '%(ReferenceCopyLocalPaths.NugetSourceType)'=='Package')" />
<ReferenceCopyLocalPaths Remove="@(_OtherPriFiles2)" />
</ItemGroup>
</Target>

</Project>

0 comments on commit 8a0eab6

Please sign in to comment.