79159456

Date: 2024-11-05 14:20:39
Score: 1
Natty:
Report link

I got a solution -> http://blog.functionalfun.net/2012/09/a-quick-guide-to-registration-free-com.html#:~:text=If%20you%20have%20a%20Unit%20Test%20which%20tries%20to%20create

[...]unit tests are actually being run in a different process (for example, the Resharper.TaskRunner), and the manifest file which you so carefully crafted for your exe is being ignored. Only the manifest on the entry executable is taken into account, and since that’s a generic unit test runner it says nothing about your COM dependencies.

But there’s a workaround. Win32 has some APIs –the Activation Context APIs- which allow you to manually load up a manifest for each thread which needs to create COM components.

This code might also help -> https://gist.github.com/LevYas/7275c6f4e402b99a7512547b98b33632

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Peter Jaghorn