0
votes

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?

1

1 Answers

2
votes

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: