0

I am currently working on a software library that will be used to develop Class Libraries.

  1. These class libraries can be run by our application running on the user's machine

  2. The application uses the same dlls that the customer uses to develop their library. The user code expects objects of certain types that are provided by the application when it is running.

  3. A project template will be available to customers with the appropriate references for developing their library

I considered installing the dlls into the GAC on the customer's machine. This way I could have a post build event on development machines that would use gacutil to install the dlls when they are built. The application code under development would reference the dlls in the GAC as opposed to the dlls in other projects on the machine. This would more closely represent a User's machine when a dev is debugging. One problem here is the requirement of admin privileges for running gacutil.

I also considered just requiring the User projects (created from our templates) to reference the dlls from the location of the installed application since the dll dependencies are there ANYWAY for use by the application. What I'm not sure about is how references get resolved on a user machine vs a development machine since a development machine will not necessarily run the application from the same place as the user (it may just be running out of the build output directory)

Any suggestions about what approach I should take? I've read up on using assemblies in the GAC and creating project templates but I haven't found much that describes how to deploy this setup to users (while also not creating too many headaches when developing).

2
  • Does your application otherwise require admin rights to install?
    – RubberDuck
    Dec 22, 2018 at 1:05
  • @RubberDuck currently the application does not require admin rights to install
    – Doug Tait
    Dec 22, 2018 at 1:38

1 Answer 1

2

Do not put your DLLs in the GAC (see this question and answer for details).

The modern approach for distributing DLLs and code for development use is to use a Nuget package.

If you want to go old school, simply put the DLLs (along with documentation) into a .ZIP file and distribute to developers as an SDK.

The developers using your DLLs will be responsible for ensuring they get distributed in the final application. In many cases they will use a one-click installer which, when built via Visual Studio, will automatically include your DLLs in the distributable package and put them where they need to go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.