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

Pack project PRI next to WinMD #1186

Merged
merged 1 commit into from
May 9, 2022
Merged

Pack project PRI next to WinMD #1186

merged 1 commit into from
May 9, 2022

Conversation

j0shuams
Copy link
Contributor

@j0shuams j0shuams commented May 6, 2022

Today, C++ apps that try to use XAML/WinUI types authored with C#/WinRT fail at runtime because they can't find the xaml resources.

E.g.
WinRT originate error - 0x80004005 : 'Cannot locate resource from 'ms-appx:///WinUIComponentCs/NameReporter.xaml'.'.

Evelyn and I found that the component's PRI file needs to live in same folder as the WinMD.
This PR updates our build logic to reflect this requirement.

Fixes #1118

We're taking advantage of msbuild here actually. Since the pri file has the same name as the winmd and the winmd is a reference assembly, msbuild will grab the pri. It's not just for PRI, PRI is one of the allowed extensions for this behavior.

Copy link
Contributor

@evelynwu-msft evelynwu-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@j0shuams
Copy link
Contributor Author

j0shuams commented May 7, 2022

Confirmed: C++ and C# apps that use nuget references to authored components work with custom user controls.

@j0shuams j0shuams merged commit 7d8e45c into master May 9, 2022
@j0shuams j0shuams deleted the jlarkin/auth-pri branch May 9, 2022 23:21
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.

Cannot used authored user controls via authored nupkg
3 participants