.NETGURU
Deploying COM Wrapper
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngmigrate' list.


Chan, Jasmine
Hi all,
I am working on creating a com wrapper for a .net class library.
I have generated a strong name key file for my .Net class and added it to my
assemblyInfo.vb file. I was wondering when I deploy this dll, do I need to
copy the strong name key file over to my production and do the same steps
like adding it to the global assembly cache?

Jasmine
Reply to this message...
 
    
Johnson, Peter
Don't bother adding it to the GAC if you don't need it there. If it's just
being used on the one web then just keep it in that web's bin directory.

--Peter

-----Original Message-----
From: Chan, Jasmine [mailto:Click here to reveal e-mail address]
Sent: Tuesday, March 19, 2002 10:33 AM
To: aspngmigrate
Subject: [aspngmigrate] Deploying COM Wrapper

Hi all,
I am working on creating a com wrapper for a .net class library.
I have generated a strong name key file for my .Net class and added it to my
assemblyInfo.vb file. I was wondering when I deploy this dll, do I need to
copy the strong name key file over to my production and do the same steps
like adding it to the global assembly cache?

Jasmine

| [aspngmigrate] member Click here to reveal e-mail address = YOUR ID |
http://www.asplists.com/asplists/aspngmigrate.asp = JOIN/QUIT

----------------------------------------------------------------------------

This e-mail and any attachments may be confidential or legally privileged.
If you received this message in error or are not the intended recipient, you
should destroy the e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing, disclosing or using any information
contained herein. Please inform us of the erroneous delivery by return
e-mail.

Thank you for your cooperation.

----------------------------------------------------------------------------
Reply to this message...
 
    
Chan, Jasmine
Let me backtrack because I am confusing myself as well as others. I have
two class libraries, one is an old COM dll named clsCOM and the other is a
.Net class library named clsDotNet. In order to call clsDotNet from clsCOM,
I have to create a COM Callable Wrapper. In order to do that these are the
following steps that needs to be done:
1. Generate a strong name key file using sn.exe which is myKey.sn
2. Add the name of the key file to the clsDotNet assembly using the
AssemblyKeyFile attribute
3. Use either the regasm.exe or the option in the VS.net to register the
clsDotNet for COM Interop which would also create a clsDotNet.tlb file
4. Add the compiled clsDotNet to the global assembly cache.
5. Reference the clsDotNet.tlb file in my clsCOM library.

I have done all of the above and it works on my test server. My questions
involve deploying clsCOM and clsDotNet to my production server named DEPLOY:

1. Do I need to copy the strong name file, myKey.sn, to DEPLOY? If so where
would it need to reside?
2. Can I use the same key file that I have on my test server on the
production server? Or do I have to create a new key file on the production
server?
3. After I deploy clsDotNet to the production do I have to add the assembly
into the global cache assembly of the production server?
4. When I package and deploy my clsCOM using VB6 Package and Deployment
Wizard, do I just include the clsDotNet.tlb file with the setup?

Thanks in advance for your help.

Jasmine

-----Original Message-----
From: Johnson, Peter [mailto:Click here to reveal e-mail address]
Sent: Tuesday, March 19, 2002 10:55 AM
To: Chan, Jasmine
Subject: RE: [aspngmigrate] RE: Deploying COM Wrapper

What I meant is that you shouldn't bother adding the assembly to the GAC if
you don't need it there, e.g. if it's just being used by the one web app. I
don't think it matters where you put the COM library and the type library,
without being familiar with regasm and your type library; I believe you will
have to use regsvr32 to register those on the machine anyway, then the
wrapper assembly will use the registry to find it.

My main point was not to put .NET assemblies in the GAC as a matter of
course. Rereading your original message, I'm not sure if you're talking
about putting it in the GAC or just deploying your strong name file. If
you're not putting it in the GAC, why are you making a strong name file? I
may be missing something here.

HTH,
Peter

[Original message clipped]

----------------------------------------------------------------------------

This e-mail and any attachments may be confidential or legally privileged.
If you received this message in error or are not the intended recipient, you
should destroy the e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing, disclosing or using any information
contained herein. Please inform us of the erroneous delivery by return
e-mail.

Thank you for your cooperation.

----------------------------------------------------------------------------

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification