简体   繁体   中英

vb6 COM dll failing to load C# assemblies

I have a asp.net application calling intermediate C# dll which will make a call to a legacy vb6 dll through COM. During the actual call I find an error in my logs from my vb6 dll:

"Could not load file or assembly, 'Generic_C#_DLL.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0c9890f55677d2' or one of its dependencies. The system cannot find the file specified"

Why is my vb6 COM dll trying to load some of my other C# dlls? Is it because the dll that is calling the vb6 COM dll also referencing the 'Generic_C#_DLL.DataAccess'?

I think I am referencing the vb6 dll correctly in the C# dll that is calling COM by having a reference to 'Interops.VB6dll' and I have properly registered the vb6 dll with regasm.exe...So as of now I am kind of clueless to why this is happening, does anyone have any advice?

We're going to need to see code to be able to best help with this. However, note that this also says "or one of its dependencies", which may indicate that there is another load failure preventing this one.

There are a few very useful tools for figuring out DLL loading problems:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM