My MSIX-packaged project uses a hand-made C++ DLL, which requires Visual C++ Runtime (vc_redist) to run, otherwise it will silently crash. I would like to allow users to run it without having to find / install vc_redist by themselves.
I did find people mentioning that including VCLibs as a dependency in the MSIX package manifest thing, but it didn't work for my project for some reason. I assume in some part of the code it is explicitly targeting the runtime from vc_redist.
Here is the project: https://github.com/AkazaRenn/FruitLanguageSwitcher/ The DLL project is inside at here: https://github.com/AkazaRenn/FruitLanguageSwitcher/tree/main/Core/LanguageSwitcher
I can be certain that this DLL project is the issue, with this part removed the project would start with no problems.
Any help is greatly appreciated, thanks in advance!
Update: Did a lot of tests and found it's related to the #pragma unmanaged piece I put on the DLL. Didn't think too much about it since it seemed to be working, but actually it has an impact. I've changed it into a more precise way and seems fine now. Would like any explanation on such behavior.