.net - When and when-not to install into the GAC? -


When should you install in GAC and when should not it? (I'm actually referring to setting up a client's machine when they've purchased our products).

  1. I have an assembly that is being used only with me (GAC or no-GAC)?

  2. I have an assembly, which shares all my applications (GAC or NO-GAC)?

  3. All of my applications can be use different versions of my assembly (GAC or NO-GAC)?

These are three scenarios. But I'm sure there is a lot more. I am not necessarily only in response to these three questions.

Similar questions:

normal MS guideline < / P>

  1. No
  2. No

GAC is actually a repository for Microsoft's general NAT libraries . Yes, they also use it to developers, but as a rule of thumb, if you do not need a GAC, do not use it. If things do not get hurt easily and locally, keep it.

  • I will only consider GAC for demonstration reasons, for example if you have some large assemblies, then keep them in GAC and they will This performance should increase significantly, Microsoft does it for all standards.The installation during the Net Frame assembly (now you know how long the installation takes) Net is also good (improves the startup time of your app) Although most of us do not work on vast frameworks or photoshop competitors, most of the time, GAC's performance in the assembly reduces the profitability of simple X-copy deployment Not worth leaving

  • Some developers can use GAC to make sure users with insufficient privileges can not delete or modify their conventions.

  • For others, this may be due to the reasons, but here you should really rethink. I am not going to repeat what has already been said.

And do not forget that once you want to deploy in GAC, your installer will need administrator privileges, once you click on Deployment, etc. Can forget too much ...


Comments