Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared COM Interop

Status
Not open for further replies.

RookPSU

Programmer
Jan 9, 2003
20
US
I'm not sure the correct way to go about this.

I have a .NET solution comprised of an .exe and a .dll project. Both of these projects reference the same two COM .dll's and therefore create two different sets of Interop files which are created under their respective project root directories.

The problem lies when I go to deploy as I'm constantly getting an ActiveX cannot create object on the target machine which I can only assume is due to the fact that the setup package is only taking one set of the interops.

Since you can't strong name a COM dll I can't toss it in the GAC, and while I can manually create strong named Interop's with TlbImp.exe and toss them in the GAC when I reference the COM .dll's in my project new Interop's are created instead of .NET automatically referencing the ones I tossed in the GAC. If anyone can decipher my babble and understand what i'm trying to achieve, by all means let me know.

Thanks.
 
does the .Net exe project reference the .net dll project?

if not then why don't you have two different solutions? One for the exe and one for the dll, you can have actual project references, so that if you have to change one of the base dll project then next time the other one is built it will automatically have the changes.

You can name the exe project and dll project diffently so that they do not create the same object.

-Sometimes the answer to your question is the hack that works
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top