开发者

Problem with C# COM

开发者 https://www.devze.com 2023-03-03 11:57 出处:网络
I have a C++ MFC Project that calls a C# COM, and whilst I can successfully call my C# COM, I have hit a problem which has me stumped.

I have a C++ MFC Project that calls a C# COM, and whilst I can successfully call my C# COM, I have hit a problem which has me stumped.

When I call my C# COM object it throws an error it says "the file or assembly xxxxxx cannot be loaded or one of its dependencies. The file sepecified can be found". In my C# COM object I am referencing another class, which itself references another class. When I compiled the C# COM Object, the bin file has the other classes as dlls are pr开发者_C百科esent.

What am I doing wrong here? I have to be careful here because the referenced referenced class is used elsewhere in the other project. So, I am not sure whether adding a strong key and registering it would break the program elsewhere.

Can you help?

Thanks


Dependency Walker can usually diagnose this kind of problem. You may have to use profiling mode, as .NET assemblies are loaded dynamically as they are needed, so the default "static analysis" mode may not detect a problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消