views:

53

answers:

1

I have a few different applications that share some common DLLs. At the moment I am copying each DLL into the application root folder (for each application) and it all works fine.

Obviously this isn't exactly the most efficient way as if I need to make a change in one, I need to redeploy this several times to all the different folders. Ideally I would like the DLLs to be installed into the Common folder in the Program Files dir and my application just pointing to them. I can do this through my setup application.

However, the issue is, how do I tell my application to look for those DLLs in the common folder and not its root? I currently reference the DLLs by adding the actual Lib projects to the solution and then just adding them from the Projects tab. So in order for the application to realise it needs to look in the common do I need to move those files to that folder first and then reference them? I would imagine there must be a neater way than this?

+1  A: 

Why don't you deploy it in Global Assembly Cache(GAC)? Its shared between all the installed applications. You can install to GAC using gacutil command.

Anuraj
@Anuraj: Not really too familar with GAC. Is it easy to update DLLs etc?
James
@James : Yes, you can share assemblies, multiple versions of same assembly etc in GAC.Check this link : http://msdn.microsoft.com/en-us/library/yf1d93sz%28VS.71%29.aspx
Anuraj
The OP is talking about unmanaged code, the GAC doesn't apply.
Hans Passant
@Hans: No its managed code.
James
@James, the "Lib" remark was confuzzling. Yes, the GAC. You'd need a manifest with `<dependentAssembly>` and codebase if you want to store them in c:\program files.
Hans Passant
Ok I have added a strong name to all my assemblies. However, one of my 3rd party libs that my lib projects references doesn't have a strong name. How do I go about getting that into the cache?
James