Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cherry pick][WinAppSDK 1.5] Only merge PRIs from references if the project is producing an executable #4145

Merged
Changes from all commits
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
10 changes: 6 additions & 4 deletions dev/MRTCore/packaging/MrtCore.PriGen.targets
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@
<AppxGeneratePriEnabled Condition="'$(AppxGeneratePriEnabled)' == ''">true</AppxGeneratePriEnabled>
<AppxGetPackagePropertiesEnabled Condition="'$(AppxGetPackagePropertiesEnabled)' == ''">true</AppxGetPackagePropertiesEnabled>

<!-- Only application projects should have the PRIs from references merged into the project's own PRI -->
<ShouldComputeInputPris Condition="'$(ShouldComputeInputPris)' == '' AND ('$(OutputType)' == 'WinExe' OR '$(OutputType)' == 'Exe')">true</ShouldComputeInputPris>
<ShouldComputeInputPris Condition="'$(ShouldComputeInputPris)' == ''">false</ShouldComputeInputPris>

<!--
For Centennial apps, we want the resources of the unpackaged app to appear in the root namespace of the app. So, set the value
of PrependPriInitialPath to false.
Expand Down Expand Up @@ -650,9 +654,8 @@

<!--
Get list of PRI files from the payload.
In Microsoft.AppxPackage.Targets, this is run only if $(AppxPackage) is 'true' but here, of course, that shouldn't be the case.
-->
<Target Name="_GetPriFilesFromPayload">
<Target Name="_GetPriFilesFromPayload" Condition="'$(ShouldComputeInputPris)' == 'true'">

<ItemGroup>
<_PriFilesFromPayloadRaw Include="@(PackagingOutputs)"
Expand All @@ -676,9 +679,8 @@

<!--
Compute final list of input PRI files.
In Microsoft.AppxPackage.Targets, this is run only if $(AppxPackage) is 'true' but here, of course, that shouldn't be the case.
-->
<Target Name="_ComputeInputPriFiles">
<Target Name="_ComputeInputPriFiles" Condition="'$(ShouldComputeInputPris)' == 'true'">

<ItemGroup>
<_PriFile Include="@(_PriFilesFromPayload)" />
Expand Down