Replies: 1 comment
-
@Jaiganeshkumaran, I assume you are trying to reference a C++/WinRT component from a C# app? In order to do this, you will need to explicitly invoke CsWinRT to generate the C# projection for your component. Here is an example: https://docs.microsoft.com/windows/uwp/csharp-winrt/net-projection-from-cppwinrt-component If you are consuming the component with a ProjectReference, you currently need to reference the Microsoft.Windows.CsWinRT package in your app in order to workaround the winmd reference (In .NET 5+, the built-in winmd support was removed). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Referencing a native WinRT component project created using the old templates doesn't work from a WinUI 3 app as the build system tries to reference the output WinMD instead of invoking CsWinRT even though I'm just using a ProjectReference. The project does have the Windows Desktop compatible option enabled. This problem only occurs in C# apps, C++ projects work fine.
Beta Was this translation helpful? Give feedback.
All reactions