Solved

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

Posted on 2014-04-18
7
710 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
Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

 

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

707 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