We have a C# UWP winmd library (no DLL, winmd only) that will be used in a C++ UWP application project.
The problem is that if I run the C++ application in Debug it crashes somewhere when trying to get the activation factory for the winmd.
If we force enable UseDotNetNativeToolchain in Debug build then it sometimes work, but it's really strange because it seems to be inconsistent and it sometimes works and then it starts crashing again.
The crash happens asap when trying to access any of the classes from the winmd C# library.
It works if the winmd is a C++ winmd, but this is not applicable to us right now (also wrapping the C# winmd in a C++ winmd crashes with the same issue).
Does anyone know a way to have Debug builds of a C++ UWP that consumes a C# winmd working WITHOUT the UseDotNetNativeToolchain flag?
We don't want to use UseDotNetNativeToolchain in Debug builds because we're afraid that it might increase compile times too much.
This is the crash stack, but the actual crash is somewhere deep where there is no PDB symbols for: