3

We have many projects using interop & related DLL. All projects have individual DLL reference with setup, but basically all of them use same DLL. So that's creates problem many times if any DLL register/unregister while installation/unistallation of setup.

Also, above approach can create problem if setup location changed or DLL reference location changed.

We need to place DLL at one location and all projects require to use DLL reference from that location to avoid register/unregister problem. But wondering about how actual reference located in .net for dependencies.

How can we do that? Any better solution or workaround for that?

Amit Joshi
  • 15,448
  • 21
  • 77
  • 141

3 Answers3

2

Personally I like to make all my applications include all the DLLs referenced for a couple of reasons:

  • I can do a clean install and uninstall to remove all traces of my application without worrying about breaking anything
  • If I make a change to the shared DLL i don't have to worry about breaking other applications

But if you really need one location, you can register the DLL in the Global assembly cache. If you use a deployment tool like Wix this is pretty straightforward. Alternatively you could use a custom action to do the registration in the GAC

Rad
  • 8,336
  • 4
  • 46
  • 45
0

Put the assembly/interop dll into the Global Assembly Cache (GAC).

References:

How to deploy unmanaged dll into GAC
http://blogs.msdn.com/yizhang/archive/2007/06/17/how-to-deploy-unmanaged-dll-into-gac.aspx

Global Assembly Cache
http://msdn.microsoft.com/en-us/library/yf1d93sz.aspx

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
0

Use Merge modules: Merge modules provide a standard method by which developers deliver shared Windows Installer components and setup logic to their application. ...

This link might be helpful or just google for "visual studio setup project merge module".

van
  • 74,297
  • 13
  • 168
  • 171