I have a Visual C++ 6 MFC app which uses .NET COM (built with 1.1) objects.
I have installed .NET 2.0 beta and now I find that CoCreateInstance crashes
when trying to create the .NET COM objects.
This is extremely easy to reproduce:
1) Install 2.0 beta.
2) Create an MFC Win app with VC++6.
3) Add code to create a .NET COM object when it runs.
4) Run.
5) Bang!
I can get round this by creating a .config file for my unmanaged app to set
supportedVersion to version 1.1 to force 1.1 to be used, but why is this
happening when using 2.0? Is there a known compatibility problem with C++6
MFC apps? Is there any workaround to enable 2.0 to be used alongside C++6
MFC apps?
Clive Dixon - 27 Apr 2005 11:02 GMT
Should add that the .NET COM object is not in the GAC. Another workaround
seems to be to install the assembly in the GAC.