简体   繁体   English

vb6 COM DLL无法加载C#程序集

[英]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. 我有一个asp.net应用程序调用中间C#dll,它将通过COM调用传统的vb6 dll。 During the actual call I find an error in my logs from my vb6 dll: 在实际调用过程中,我在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" “无法加载文件或程序集,'Generic_C#_DLL.DataAccess,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = f0c9890f55677d2'或其中一个依赖项。系统找不到指定的文件”

Why is my vb6 COM dll trying to load some of my other C# dlls? 为什么我的vb6 COM dll试图加载我的其他一些C#dll? Is it because the dll that is calling the vb6 COM dll also referencing the 'Generic_C#_DLL.DataAccess'? 是因为调用vb6 COM dll的dll还引用了'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? 我正在通过引用'Interops.VB6dll'来调用COM的C#dll中正确引用vb6 dll并且我已经用regasm.exe正确注册了vb6 dll ...所以到目前为止我有点像对于为什么会发生这种情况一无所知,有没有人有任何建议?

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: 有一些非常有用的工具可以解决DLL加载问题:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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