C++/WinRT project crashes when calling into C# Windows Runtime component


I have a Windows Runtime component written in C# (call it TreeDumpLibrary) and a C++/WinRT UWP app. The app references the C# WinRT component and calls a static function in a class in the WinRT component. Everything builds, however at runtime I get an exception

when trying to activate: 0x80131040 : The located assembly's manifest definition does not match the assembly reference.

I checked the generated appxmanifest for my app and it lists my classes as activatableClasses through uwpshim.exe which I believe is .net's solution for hosting winrt components/WinMDs.

I turned on loader snaps in my app, and I see that TreeDumpLibrary.winmd is successfully loaded, and then we decide to look for a TreeDumpLibrary.dll which doesn’t exist.

What am I missing? How can I call a C# static method from C++/WinRT?

asked on Stack Overflow Apr 18, 2020 by Alexander Sklar - MSFT • edited Apr 18, 2020 by Denzil Soans

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0