By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,107 Members | 1,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,107 IT Pros & Developers. It's quick & easy.

Deploying .NET COM class library

P: n/a
Hi All,

The company I work for has traditionally used COM/ActiveX for the
solutions that it provides. We are in the process of moving to .NET and
a few applications have been written in VB.NET up to this point.

Some of the applications are class libraries which need to be callable
via the COM interface from some of the older applications. Could
someone please explain to me the issues involved in deploying such a
class library?

On the developer machines it is easy to /deploy/ since you just mark
the project as "Register for COM interop", but what is the equivelant
of this process on a client's machine?

You can assume that we will deploy the .NET runtime.
Friendly Regards
Pieter Breed

Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hello Pieter,

I didnt got the chance to work with COM-.net interopratbility in a
professional env...But i had spent lil bit of my time with this for the sake
of learning. I think the only thing that we have to make sure is that. the
assemblies and the corresponding type libraries generated from these
assemblies are residing in the same folder, Suppose your assembly is having
a class that contains a method that returns or accepts a type (say a class
residing in another .net assembly), you should create the tlbs for those
types as well, and it should be present at the same folder where these
assemblies are residing.

Nothing esle i can remember at thsi time..
:)

regards
Sujith S.Varier
<pi**********@gmail.com> wrote in message
news:10*********************@f14g2000cwb.googlegro ups.com...
Hi All,

The company I work for has traditionally used COM/ActiveX for the
solutions that it provides. We are in the process of moving to .NET and
a few applications have been written in VB.NET up to this point.

Some of the applications are class libraries which need to be callable
via the COM interface from some of the older applications. Could
someone please explain to me the issues involved in deploying such a
class library?

On the developer machines it is easy to /deploy/ since you just mark
the project as "Register for COM interop", but what is the equivelant
of this process on a client's machine?

You can assume that we will deploy the .NET runtime.
Friendly Regards
Pieter Breed

Jul 21 '05 #2

P: n/a
"pi**********@gmail.com" <pi**********@gmail.com> wrote:
Hi All,

The company I work for has traditionally used COM/ActiveX for the
solutions that it provides. We are in the process of moving to .NET and
a few applications have been written in VB.NET up to this point.

Some of the applications are class libraries which need to be callable
via the COM interface from some of the older applications. Could
someone please explain to me the issues involved in deploying such a
class library?

On the developer machines it is easy to /deploy/ since you just mark
the project as "Register for COM interop", but what is the equivelant
of this process on a client's machine?

You can assume that we will deploy the .NET runtime.
Friendly Regards
Pieter Breed

To make .NET assemblies available to applications that use
COM you need to use this:

NET Framework Tools Assembly Registration Tool (Regasm.exe)
http://msdn.microsoft.com/library/de...lregasmexe.asp

..NET Framework Developer's Guide Registering Assemblies
with COM
http://msdn.microsoft.com/library/de...ieswithcom.asp
see also
..NET Framework Tools Type Library Exporter (Tlbexp.exe)
http://msdn.microsoft.com/library/de...rTlbExpexe.asp

You may also have to add some code/attributes to the .NET
code to supply additional COM metadata/functionality.

To have a .NET application access a COM component you create
a Runtime Callable Wrapper (RCW). Visual Studio can do it
for you. However this is the tool to create one
independently:
..NET Framework Tools Type Library Importer (Tlbimp.exe)
http://msdn.microsoft.com/library/de...rtlbimpexe.asp

For ActiveX components see
NET Framework Tools Windows Forms ActiveX Control Importer
(Aximp.exe)
http://msdn.microsoft.com/library/de...erAximpexe.asp
Use Visual Studio .NET only to create the RCW if your
project is the only one that uses that COM library.

If the COM component is used by multiple .NET projects and
was developed in house create a Primary Interop Assembly
(PIA) and include it in a setup merge module.

..NET Framework Developer's Guide Primary Interop Assemblies
http://msdn.microsoft.com/library/de...assemblies.asp

..NET Framework Developer's Guide Registering Primary Interop
Assemblies
http://msdn.microsoft.com/library/de...assemblies.asp

if the COM library was developed by a vendor, obtain the PIA
from them.

In General

C# Programmer's Reference COM Interop Tutorials
http://msdn.microsoft.com/library/de...opTutorial.asp

Visual Basic Language Concepts Introduction to COM Interop
http://msdn.microsoft.com/library/de...opTutorial.asp

Microsoft .NET/COM Migration and Interoperability
http://msdn.microsoft.com/library/de...cominterop.asp

..NET Framework Developer's Guide Building .NET Framework
Components for Interoperation
http://msdn.microsoft.com/library/de...roperation.asp
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.