I have a COM DLL that creates VB .NET objects. I use this COM object in my
ASP files.
The ASP files work fine on my system but will not work anywhere else. I
get the error
The assembly couldn't find some dependencies. The question is how do I
deploy
VB.NET assemblies that are set to register for COM INTEROP.
This is what I am doing right now.
I build everything on my machine. Copy all .NET assemblies and registered
them using REGASM.
Copy COM DLL and register it.
Copy my WEB project and restart IIS.
I have also tried to compile all .NET assemblies using a strong name and
placing them into the GAC but still get the error.
> The ASP files work fine on my system but will not work anywhere else. I
> get the error
>
> The assembly couldn't find some dependencies. The question is how do I
> deploy
[snip]
What are the assemblies that fail? Assemblies like
Microsoft.VisualBasic.Compatibility.dll are not part of the .NET Framework
redistributable, so you must make sure that they are part of your installer.

Signature
Kevin Westhead
Lisa Sonneson - 26 Sep 2003 17:54 GMT
Hi Kevin,
I created an installer package for the .NET
assemblies. Then I proceeded to do an installation to a different server.
Register all DLLS
with REGASM.exe and still get this error in the ASP file.
NETInterop (0x80070002)
File or assembly name CECC.Financial2000.Reports.Reports2000UI, or one of
its dependencies, was not found.
I also have an executable test project where I instantiate the COM DLL,
which in turns calls the .NET objects, and as long as this executable is in
the same directory as my .NET assemblies it works. However, if I placed it
in a different directory I get the same error as I get in ASP.
Another thing I have tried is to install VB 6.0, Visual Studio NET 2003 on
this other server, and do a build. if I do this then the ASP works just like
in my system.
Do you have any other advice that I may try.
Thanks,
Lisa Sonneson
> > The ASP files work fine on my system but will not work anywhere else. I
> > get the error
[quoted text clipped - 10 lines]
> --
> Kevin Westhead
Kevin Westhead - 27 Sep 2003 18:44 GMT
[snip]
> File or assembly name CECC.Financial2000.Reports.Reports2000UI, or one of
> its dependencies, was not found.
[snip]
Have you tried looking at this assembly with ildasm.exe? The manifest
section should list all of its dependencies, which appear as a bunch of
".assembly extern" statements; you can use this to check that all of the
dependencies are accounted for.
When you use regasm, are you using the /codebase option?

Signature
Kevin Westhead
Lisa Sonneson - 29 Sep 2003 16:48 GMT
Kevin,
Using the codebase parameter fix the problem. However, I am not using the
strong name and REGASM is returning a warning. The reason why I don't use
strong names is because at compile, it wants me to add a strong name to all
dependencies. That is not a good solution for me because there are other
developers that use some of these dependencies. anyway, if you had any
suggestions on this let me know. Thanks again for the fix.
Lisa
> [snip]
>
[quoted text clipped - 12 lines]
> --
> Kevin Westhead
Kevin Westhead - 30 Sep 2003 23:17 GMT
> Using the codebase parameter fix the problem. However, I am not using the
> strong name and REGASM is returning a warning. The reason why I don't use
> strong names is because at compile, it wants me to add a strong name to all
> dependencies. That is not a good solution for me because there are other
> developers that use some of these dependencies. anyway, if you had any
> suggestions on this let me know. Thanks again for the fix.
I would recommend signing all assemblies that you produce; you can use delay
signing during development to avoid issues with other developers not having
access to your key-pair file. If the issue is that you have dependencies on
3rd party COM type libraries, then your options are limited:
1. Plead with the original author to provide a primary interop assembly.
2. Use tlbimp.exe to create a signed (but not primary) interop assembly
for the type library.
3. Ship unsigned assemblies, although this means you cannot guarantee
their integrity.

Signature
Kevin Westhead
Lisa Sonneson - 26 Sep 2003 18:27 GMT
I tried using installer package but I get the error still.
NETInterop (0x80070002)
File or assembly name CECC.Financial2000.Reports.Reports2000UI, or one of
its dependencies, was not found.
> > The ASP files work fine on my system but will not work anywhere else. I
> > get the error
[quoted text clipped - 10 lines]
> --
> Kevin Westhead
Lisa Sonneson - 26 Sep 2003 18:32 GMT
I used the installer package. Even though it picked up more dependencies
that I had in the bin directory, I am still getting the same error.
NETInterop (0x80070002)
File or assembly name CECC.Financial2000.Reports.Reports2000UI, or one of
its dependencies, was not found.
Thanks,
Lisa Sonneson
> > The ASP files work fine on my system but will not work anywhere else. I
> > get the error
[quoted text clipped - 10 lines]
> --
> Kevin Westhead