1

We have an old application which can be extended only by using COM exposed assemblies. There is now way to work with it without the GAC. The extension we want to provide is an existing .NET component. We want to provide the extension without putting all required references in the GAC as well. I came up with a solution to do this.

I'll host a WCF service in a windows service and use a named pipe endpoint. This endpoint will be consumed by the COM component. This way the COM component is only forwarding call's and I don't need any dependant assemblies in the GAC.

Two questions about this setup:
1. Are there better ways to do what I want?
2. How can I keep the COM component as small as possible? (it's just a forwarding point)

Tom Kuijsten
  • 337
  • 4
  • 16
  • 1
    .NET components can exist w/o putting them in the GAC (regasm /codebase) – Simon Mourier Jun 26 '14 at 07:25
  • Didn't know that. Will the assembly be at a specific folder which I can specify? Will it search in that directory for required reference assemblies? – Tom Kuijsten Jun 26 '14 at 07:45
  • It will be referenced where it was regasm'd. Same for referenced assemblies, you can regasm /codebase them as well. – Simon Mourier Jun 26 '14 at 10:50
  • My GAC/COM knowledge is very limited and I can't get it to work. I created three .net assemblies. A client console (1), using COMComponent library (2) which references COMComponentReference library (3). I registered the COMComponent with regasm. How do I reference this from the client console? It's not in the GAC. – Tom Kuijsten Jun 26 '14 at 12:02
  • When you use RegAsm, it can/will create a COM Type Library (.TLB file). You can reference that TLB. – Simon Mourier Jun 26 '14 at 12:06
  • No I can't, it will complain that it is a tlb from a CLR assembly and I should directly reference the assembly itself. – Tom Kuijsten Jun 26 '14 at 12:35
  • oh ok, yes, but your whole story is not clear. Why would you do this? http://stackoverflow.com/questions/4614625/can-not-add-reference-a-com-in-com-client – Simon Mourier Jun 26 '14 at 13:02
  • I want to test if I can call the COM component from another application. I already found the way to do that, so thanks for all your help. – Tom Kuijsten Jun 27 '14 at 06:43
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/56411/discussion-between-tom-kuijsten-and-simon-mourier). – Tom Kuijsten Jun 27 '14 at 11:10

0 Answers0