Bowman, John C.
2009-04-20 22:10:48 UTC
Hi All,
I'm fairly new to COM interop w/ .NET and need some help. Assume I have .NET
assembly A.DLL (running under .NET assembly A.EXE) which is registered via
Regasm.exe that exposes a COM object which .NET B.DLL assembly (running
under .NET assembly B.EXE) needs to consume. When I set a reference in (VS
2005) in the project for B.DLL to A.DLL I'm forced to either have A.DLL in
the GAC (unacceptable for other reasons), or a copy of A.DLL must exist in
the installation folder of B.DLL. This is not very desirable either, because
it would mean we need to distribute A.DLL with B.DLL, we'd like to not have
that situation.
I know that if I try to set the reference in the VS project of B.DLL to the
.TLB from A.DLL, that it complains I'm not allowed to do that & I need to
set the reference directly to the A.DLL assembly. Also, I know that if A.DLL
had been a simple unmanaged .DLL exposing the COM object that setting a
reference to it's .TLB in project B causes a simple interop .DLL to be
generated at compile time for distribution - which would be acceptable.
Is there some way (using manifests(s)? / or an interop aseembly of some kind
?) to make this work so we don't have to distribute A.DLL all the time since
it's already installed and running in the system?
TIA,
John
I'm fairly new to COM interop w/ .NET and need some help. Assume I have .NET
assembly A.DLL (running under .NET assembly A.EXE) which is registered via
Regasm.exe that exposes a COM object which .NET B.DLL assembly (running
under .NET assembly B.EXE) needs to consume. When I set a reference in (VS
2005) in the project for B.DLL to A.DLL I'm forced to either have A.DLL in
the GAC (unacceptable for other reasons), or a copy of A.DLL must exist in
the installation folder of B.DLL. This is not very desirable either, because
it would mean we need to distribute A.DLL with B.DLL, we'd like to not have
that situation.
I know that if I try to set the reference in the VS project of B.DLL to the
.TLB from A.DLL, that it complains I'm not allowed to do that & I need to
set the reference directly to the A.DLL assembly. Also, I know that if A.DLL
had been a simple unmanaged .DLL exposing the COM object that setting a
reference to it's .TLB in project B causes a simple interop .DLL to be
generated at compile time for distribution - which would be acceptable.
Is there some way (using manifests(s)? / or an interop aseembly of some kind
?) to make this work so we don't have to distribute A.DLL all the time since
it's already installed and running in the system?
TIA,
John