.NET deployment for dll assemblies and added to the GAC...

Posted on 2014-04-18
Last Modified: 2014-04-18
I have come across a major issue that I cannot seem to resolve...we have to come up with a way to deploy a bunch of dll files to a persons desktop with little to no interaction.  Can here is that you need to register them in the GAC for them to work and be used.

From what I understand through my testing:

PowerShell can accomplish this but is very complicated and there is not guarantee that it will be installed on the client box.
XCOPY cannot register things in the GAC in say using a bat file to copy from a network location
MSI installers are not longer an option in .NET 2012 but you can use the InstallShield, which doesn't register in the GAC
You can copy the gacutil.exe to the client box but that will create issues with license agreements, versioning, etc...

So here I am, an MVC/ASP.NET Webforms and WPF developer trying to figure out how to get this to work.  Surely it cannot be that complicated and I am missing something I would think...

For the project there isn't an "app" so to speak, just dll files that are being transferred ti the client box and then referenced in Excel...

Can someone that has experience in this topic please tell me what I am missing here?

Thanks in advance!

Question by:cyimxtck
LVL 40

Expert Comment

by:Vadim Rapp
Comment Utility
> You can copy the gacutil.exe to the client box but that will create issues with license agreements, versioning, etc

I don't think it would.

>  but you can use the InstallShield, which doesn't register in the GAC

It does, see

Also, depending on  the purpose, maybe it's not necessary to put them in GAC. If they are going to be used by one application, xcopy to the app directory will do it.
LVL 40

Expert Comment

by:Vadim Rapp
Comment Utility
...yet another way is to install WiX add-on into Visual Studio, and create the installation in it. The article "Installing Assemblies for Runtime and Design-time Use"  has the details.
LVL 12

Accepted Solution

jmcmunn earned 500 total points
Comment Utility
I've used Wix, Installshield and gacutil in various projects and they all work fine putting stuff in the gac.

If you can't (or don't want to) get the dll's in the Gac you can deploy them to the application directory (or bin directory of a web site) and they will get loaded and used just fine.  There is no reason you HAVE to put something in the Gac unless it is an artificial limitation put on the dll by the creator (or consumer) of the dll.

If the purpose is to share the same version of the dll and have windows help with managing the version etc, then that is exactly the purpose of the gac.

In visual studio 2012 and 2013 you can installe the LE version of Installshield and it can put things in the is free last I checked.
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails


Author Comment

Comment Utility
Not sure I get what you're saying:

Gacutil.exe is only for development purposes and should not be used to install production assemblies into the global assembly cache.

It must be in the GAC and this will not do the job:

It does, see
LVL 74

Expert Comment

by:käµfm³d 👽
Comment Utility
Can here is that you need to register them in the GAC for them to work and be used.
OK, so I'm very curious:  Why would this be?

Author Comment

Comment Utility
Don't register them in the GAC and it doesn't work.  Register them and it works.

Not sure the reason why and we don't have time to evaluate the why but only time for the HURRY UP AND GET THIS DONE!!!  lol
LVL 40

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
Something that nobody seems to have stated in this thread is that you need to be an administrator to install something in the GAC. It also requires that the dlls be signed. And if you install a new version of a dll in the GAC, the older applications won't use it, they will still use the old version unless a redirection is defined somewhere in the .NET loading system.

This gives you a little more control about updates, but make them more complicated to manage unless you understand all the little intricacies. This is thus usually not a very good place to store your own dlls. The application directory is usually better.

The main reason for using the GAC if for companies who really know how to use it and want to be able to update a dll used by many applications without having to know where they are installed on the computer.

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Penetration Testing O365 to/from Azure .Net Services 4 36
crm development 2 35
Wpf develop 5 30
Library to convert HTML to PDF. 8 44
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now