helix400
8th June 2007 18:41 UTC
Installing .NET managed dll's into the GAC
I'm about a month or two away from deploying .net managed dll's into customers GAC's, so I looked into what it would take to do it right.
So far, I'm a bit confuse how this would be done. I did find this:
http://nsis.sourceforge.net/Register...DLL_in_the_GAC
But it mentions that if the user doesn't have the SDK installed, then gacutil probably won't exist on the users machine (the 2.0 version of GACUtil only exists on my machine because of Visual Studio). That makes the solution worthless.
It also mentioned that instead of using NSIS to deploy the .NET dll, you use some C# app to do it for you. But that has issus with Windows Vista users who don't have admin access (and I'd assume any non-admin user).
Another thread (http://forums.winamp.com/showthread....&highlight=gac), talked about this too, and it seemed a solution was to package gacutil with the install. But, then
mayevski chimed in and said you're not allowed to do that.
So I'm just stuck and asking for help. Are there any clean methods for installing a .NET dll into the GAC?
n_baua
12th June 2007 07:51 UTC
Hi,
I guess this is not the easy task even either.
First you would have to look around all the requirements and if they are available then install the .net dll to GAC
The steps should be as under;
1> Check if supported OS.. (if No skip installation else proceed)
2> Check if Admin Rights are available..
. [if No skip installation else proceed]
3> Check if required framework installed.... (if No you can launch installer from your installation disk OR redirect user to online for download OR proceed)
4> To install the .Net dll proceed as normal with the GacUtil.exe (Make sure you have sn.exe to strong name the same dlls or better you have them strong name before you ship).
helix400
12th June 2007 20:57 UTC
Thanks n_baua for the update. Your approach would work, but like you said, it's not an easy task.
It seems the best approach would be to create a plugin that uses C++ code to work with Fusion to do all of this the Microsoft recommended way.
A couple good sites that show how to do it are:
http://www.codeguru.com/csharp/.net/...le.php/c12793/
and
http://support.microsoft.com/kb/317540
Unfortunately, my C++ skills are weak. :(
Our alternate approach is to just install all of our applications to a common folder. That way, they can all share the same bin folder, and no GAC registeration is necessary.
n_baua
13th June 2007 06:49 UTC
Hi Helix,
I am not seeing the following thing as a good practice,
Our alternate approach is to just install all of our applications to a common folder. That way, they can all share the same bin folder, and no GAC registeration is necessary.
The objective to use the GAC is to have a system wide usage and not just with the projects which we have created, another issue is if we choose to use c:\myFolder or some other static location as a prefered common directory, some one may tamper it or possibilities are the directory it self can be deleted, this is not possible with the GAC.
in short the question is about the Security.
BTW I am also not good in C++ ;)
jocker
16th June 2007 17:25 UTC
the only good & official way to put dlls into the GAC is to use a windows installer setup program.
But there's an alternative, written in c# that uses fusion, as it was said before on this thread: gacutil2 by Christoph Wille
http://chrison.net/OnlyColdFusionCan...mplicated.aspx
it does not implement everything of gacutil, but at least it seems usable.
good luck
EDIT: why this board does not let me add links??
chrison.net/OnlyColdFusionCanBeMoreComplicated.aspx
Anders
16th June 2007 22:22 UTC
Stupid spam protection for new users
http://chrison.net/OnlyColdFusionCan...mplicated.aspx
helix400
18th June 2007 17:41 UTC
Don't use the url block tags. It doesn't work for me. Just keep the URL as plain text, and the board will convert it.
Btw, thanks for the link.