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

Bug:Build failure due to namespace changes in XamlTypeInfo after C++/WinRT update #1398

Closed
takatsuka2022 opened this issue Mar 19, 2024 · 2 comments

Comments

@takatsuka2022
Copy link

Version

2.0.240111.5

Summary

I'm experiencing a build failure when referencing a WinUI 3 runtime component (root namespace: Control1) in a WinUI 3 project (root namespace: App1). The namespaces registered in App1's XamlTypeInfo are different before and after updating C++/WinRT.

Before the update, the entry in XamlTypeInfo looks like this:

L"Control1.UserControl1", L"",
&ActivateType<::winrt::Control1::UserControl1>, nullptr, nullptr, nullptr,
121, // Microsoft.UI.Xaml.Controls.UserControl
85, 0, -1, TypeKind::Metadata,
TypeInfo_Flags_None,
-1,

After the update, it changes to:

L"Control1.UserControl1", L"",
&ActivateLocalType<::winrt::Control1::implementation::UserControl1>, nullptr, nullptr, nullptr,
121, // Microsoft.UI.Xaml.Controls.UserControl
85, 0, -1, TypeKind::Custom,
TypeInfo_Flags_IsLocalType | TypeInfo_Flags_None,
-1,

This change seems to be causing the build to fail. Could anyone help me understand how to resolve the build issue?

Reproducible example

No response

Expected behavior

No response

Actual behavior

No response

Additional comments

No response

@kennykerr
Copy link
Collaborator

For Xaml issues please use this repo: https://github.com/microsoft/microsoft-ui-xaml

@YexuanXiao
Copy link

I found a troubleshooter that may be related to this, at the bottom of the page: https://learn.microsoft.com/en-us/windows/uwp/winrt-components/create-a-windows-runtime-component-in-cppwinrt

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

No branches or pull requests

3 participants