Class Library Deployment

G

Guest

I'm working on a class library that is designed to be an add-on to my full
application. The application already knows about the library but (obviously)
won't run it if the library is not there. Instead it just gives the user a
message.

I'm having trouble deploying the library though after the full app has
already been installed on the device. If I don't deploy the library to the
same directory as the application, the application still won't know that it's
there and as a result won't use it.

How do I register the class library so that my application can use the
library no matter where it is on the device?

thanks in advance,
ed
 
P

Peter Foot [MVP]

You only have two choices - you must place it in the same folder as your
executable, or you must register it with the GAC on the device in which case
it is available to any managed application on the device. To GAC install a
dll is fairly easy, first you need to ensure your dll has a strong name -
that is it's signed with a keypair. Then when you install the dll to the
device, also place a file with a .gac extension into the \windows folder. In
this file write the full path to your dll. When the runtime next runs it
will move the dll into the GAC (actually the windows folder with a mangled
name and a few registry entries).
See here for more GAC details:-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncfhowto/html/HOWTOGAC.asp

Peter
 
D

Daniel Moth

.... in addition, you can place the dll at the root of the device and any app
can pick it up. However, I only mention this as a technically possible way
*but* not as good design...

Cheers
Daniel
 

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