Search:
Namespaces
Discussions
.NET v1.1
Feedback
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...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com