Jump to content
Software FX Community

To GAC or not to GAC ?


Recommended Posts

The typical set up on our servers is that we have an install of CFX to C:\Program Files\ChartFX for .NET 6.2. The assemblies in /bin folder are not put in the GAC. Our application obviously makes references to the necessary CFX assemblies so when we compile it copies these assemblies to it's local project /bin folder. As mentioned earlier we have a build server that creates our deployable build which is set up like a developer machine so the end result if that when we deploy to say a UAT server we effectively have 2 copies of some of the CFX assemblies :


i) The binaries in C:\Program Files\ChartFX\bin (there are the ones used by the ChartFX62 web app right ?)

ii) The binaries in the /bin folder of our built application


My question is : is there any harm putting all of the C:\Program Files\ChartFX\bin  assemblies in the GAC on the server ? I'm hoping that this would mean we only would have a single copy of the CFX assemblies on the server which of course in theory cause less of a deployment headache in the future.


What is the best practice advise on CFX installation ?


Any advice greatefully received.


Link to comment
Share on other sites

The best practice is NOT to use the GAC.

The GAC can actually contain multiple versions of the assemblies making it harder, not easier to determine which one is being used by whom.

In our experience, putting the assemblies in the GAC brings many problems with service packs.

All that said, ChartFX is strong-named so it can be placed it in the GAC if you want to. The decision is ultimately yours and it depends on each case, our recommendation is not to put it in the GAC because it works best in most situations.

The following is a good rule for using the GAC:

The Global Assembly Cache (GAC) is a .NET mechanism that's used to explicitly share assemblies between applications. As a rule, you should use the Global Assembly Cache only for assemblies that are expressly intended to be shared among multiple .NET applications. If your application's assembly is not shared, it should remain private, and you shouldn't add it to the Global Assembly Cache.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...