• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 800
  • Last Modified:

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

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!

CII
0
cyimxtck
Asked:
cyimxtck
1 Solution
 
Vadim RappCommented:
> 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 http://msdn.microsoft.com/en-us/library/dkkx7f79(v=vs.110).aspx

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.
0
 
Vadim RappCommented:
...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.
0
 
jmcmunnCommented:
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 Gac...it is free last I checked.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
cyimxtckAuthor Commented:
Not sure I get what you're saying:

NoteNote
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 http://msdn.microsoft.com/en-us/library/dkkx7f79(v=vs.110).aspx
0
 
käµfm³d 👽Commented:
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?
0
 
cyimxtckAuthor Commented:
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
0
 
Jacques Bourgeois (James Burger)PresidentCommented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now