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

[WinAppSDK 1.4 Servicing] Libraries should not merge PRIs from references into their own PRI #4146

Conversation

evelynwu-msft
Copy link
Contributor

@evelynwu-msft evelynwu-msft commented Feb 1, 2024

(Addresses microsoft/microsoft-ui-xaml#8857)

The MRT Core targets are incorrectly merging the PRIs of references into the final PRI in all cases. Suppose you have Package A which contains some WinUI controls, which results in some XBFs being inserted as resources into its PRI. There is also a Package B that relies on Package A version 1.0. Finally, there is an App C that relies on both Package A (version 1.1) and Package B. Because Package B is including the PRI resources from Package A version 1.0 in its own PRI, when App C attempts to merge the PRI resources from all of its dependencies a conflict will arise and break the build.

Package B should not be including the PRI resources from Package A in its own PRI, and instead should advertise the dependency and allow App C to resolve it and perform the PRI resource merge itself. In the UWP targets, this was done by checking to see if the project was producing a package but since Windows App SDK needs to also handle unpackaged apps, the correct way to achieve the same goal is to check if the project is a library (i.e. not producing an executable) and not merge PRI resources from dependencies if that is the case.

Note: Libraries (including Nuget packages) affected by this bug will need to be recompiled.

Cherry-picked from #4124

@evelynwu-msft evelynwu-msft changed the base branch from main to release/1.4-stable February 1, 2024 08:39
@evelynwu-msft
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@evelynwu-msft
Copy link
Contributor Author

@bpulliam @codendone Could I get approval for this PR as well? It's the other half of https://task.ms/48791400 that was approved by shiproom this morning.

@evelynwu-msft
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bpulliam bpulliam merged commit 5f17543 into release/1.4-stable Feb 2, 2024
23 checks passed
@bpulliam bpulliam deleted the user/evelynwu/fix-pri-generation-for-libraries-onto-release-1.4-stable branch February 2, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants