Solved

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

Posted on 2014-04-18
7
697 Views
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!

CII
0
Comment
Question by:cyimxtck
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40009105
> 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
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 40009139
...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
 
LVL 12

Accepted Solution

by:
jmcmunn earned 500 total points
ID: 40009221
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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:cyimxtck
ID: 40009268
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
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40009309
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
 

Author Comment

by:cyimxtck
ID: 40009315
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
 
LVL 40
ID: 40009736
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

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

733 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