[AccessD] [dba-VB] VB.Net - using an outside DLL

MartyConnelly martyconnelly at shaw.ca
Wed May 2 18:08:14 CDT 2007


I use an install batch file that  looks like this for your dll
MyProgram.dll The new tlb will be created under MyPath
There are probably better ways.

gacutil -u MyProgram
regasm /u "MyPath\MyProgram.dll"

regasm  "MyPath\MyProgram.dll"

regasm /tlb "MyPath\MyProgram.dll"
gacutil -i "MyPath\MyProgram.dll"


JWColby wrote:

>Shamil,
>
>Thanks for that info. I will make sure that "localcopy" is set and not worry
>about it for now.  I am going to be doing a simple xcopy kind of install for
>the immediate future.  
>
>Again, many thanks for the response.
>
>John W. Colby
>Colby Consulting
>www.ColbyConsulting.com
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil
>Salakhetdinov
>Sent: Wednesday, May 02, 2007 4:28 PM
>To: 'Access Developers discussion and problem solving'
>Subject: Re: [AccessD] [dba-VB] VB.Net - using an outside DLL
>
>John,
>
>To use gacutil.exe your .NET component classlib assembly has to be signed
>using strong name generated by sn.exe utility - did you do that?
>
>Anyway while you're just starting with VB.NET classlibs using local copy is
>safe and easy way to proceed now until you get enough experience with sn.exe
>and gacutil.exe...
>
><<<
>but that begs the question of
>where I am supposed to place this stuff initially in order for that to work
>correctly.
>  
>
>gacutil.exe (see MSDN) installs your assembly in GAC - "installs" means that
>it registers it in GAC and also physically copies it there. And GAC can keep
>several versions of your components...
>
>When your .NET component is installed in GAC then you can reference it from
>your projects.
>
>You can also reference your .NET components without installing them in GAC.
>
>In both cases you can have CopyLocal flag set then you'll get the component
>copied on compile/build time into your /Bin (or whatever you call it) folder
>where your client (FE/Utility) executable/component is getting built. Then
>you can just XCopy this /Bin folder's contents to your customer site.
>
>If you do not use CopyLocal flag and if your have your component registered
>locally in GAC and referenced from your client (FE/Utility) project then you
>will have to register this referenced component on customer's site using
>gacutil. Then your client (FE/Utility) executable/library will find
>registered in GAC component on runtime...
>
>Easy... (?!)
>
>Well, not that easy when you will find you wanted to have several versions
>of your .NET component installed in GAC and using different versions of .NET
>framework etc - all that is possible but should be better avoided as
>deployment scenarios in the beginning...
>
>--
>Shamil
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada




More information about the AccessD mailing list