Deployment of assembly which has Com Interoperability.

D

divya

Hi,
I made an assembly (class library project) in Dot net and
wanted the assembly to have COM interoperability successfully got the
assembly working with VB6 performing following steps:
1.Create a strong name key file using sn tool.
2.In the Class Library Project (I am using VS 2005)
2.1 Select "Register For COM" in the Project Properties
2.2 Inside assemblyinfo.cs set COMVISIBLE to True
2.3 Assign strong name key file to the assembly
Project (right Click) --> Properties --> Signing --> Browse
strong name Key File
2.4 Include using System.Runtime.InteropServices; in the
classlibrary.cs
2.5 Build the Project
3 Use gactutil.exe to add assembly into the Global Assembly Cache
4 Register the asembly using regasm.exe
5 Test in VB6
All this works fine on my local machine which has VS 2005 on it.
But I want to move this assembly onto the server which has only the
dotnet framework v 2.0.
My Question is
Q1.Do I need to perform all the steps(step 1 to 4) again to move this
assembly which should have COM Interoperability onto different machine
which is the server where it would be actually used.
Q2.or Should I create a new strong name key file on the server and
assign this new key to the assembly?
My understanding :- I can't skip and have to perform steps 4 and 5
again on the server for adding the assembly to server's GAC and to
register the assembly on server. Wanted to know if I can skip steps 1
and 2 on the server. If yes How?
I am a beginner so not worked much on Dot net Kindly help me out
deploying the assembly to server.

Thank You.
 
J

Jan Hyde (VB MVP)

divya <[email protected]>'s wild thoughts were released
Hi,
I made an assembly (class library project) in Dot net and
wanted the assembly to have COM interoperability successfully got the
assembly working with VB6 performing following steps:
1.Create a strong name key file using sn tool.
2.In the Class Library Project (I am using VS 2005)
2.1 Select "Register For COM" in the Project Properties
2.2 Inside assemblyinfo.cs set COMVISIBLE to True
2.3 Assign strong name key file to the assembly
Project (right Click) --> Properties --> Signing --> Browse
strong name Key File
2.4 Include using System.Runtime.InteropServices; in the
classlibrary.cs
2.5 Build the Project
3 Use gactutil.exe to add assembly into the Global Assembly Cache
4 Register the asembly using regasm.exe
5 Test in VB6
All this works fine on my local machine which has VS 2005 on it.
But I want to move this assembly onto the server which has only the
dotnet framework v 2.0.
My Question is
Q1.Do I need to perform all the steps(step 1 to 4) again to move this
assembly which should have COM Interoperability onto different machine
which is the server where it would be actually used.

Create a setup program to deploy the app, it should take
care of ensuring your dll is registered correctly.

J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top