Installing assemblies into the GAC is no longer straight forward. In the good ol’ days it used to be as simple as dragging a file into the Assembly folder. Or using the gacutil.exe. Neither is available any longer.

According to various posts out in the wild wild web, the updated .NET 4 version of gacutil.exe is for dev purposes only and should not be used in a production environment. It says so here, and I believe everything posted on the internet. The recommended approach of using a Setup and Deployment InstallSheild (Limited Edition) installation project also has it’s issues; the out of the box version installed with VS 2012 is not usable without downloading a new version, downloading a new version requires you to register, registration is a hassle, and the dude doesn’t abide hassles.

So … is there another option?

You betcha.

Are you going to tell me what it is?

If you ask nicely.

Okay, what’s the other option?

Check out PowerShellGac on CodePlex. It contains several useful ps scripts for getting assemblies into and out of the GAC. This was the best option I found.

The documentation on CodePlex is good enough to get you going, however when running the Install-Module command, I had to do: Install-Module .\Gac instead of Install-Module Gac. No big whoop.

Is there a catch?

Not really. If I had one wish for Christmas this year, just one wish, this set of scripts would allow for deployments of assemblies to various staging and production servers remotely. In order to use these powershells they need to be deployed to each server and run individually.

Are there other options?

Great question. Do you know of a better method or better scripts? Is there an easier way to install remotely? Comment up, people.


What next?
Let Axian come to the rescue and help define your custom application strategy, develop a roadmap, work with your business community to identify the next project, and provide clarity and direction to a daunting task. For more details about Axian, Inc. and the Custom Application practice click here to view our portfolio or email us directly to setup a meeting.