Old 8th June 2007, 17:41   #1
helix400
Member
 
Join Date: Oct 2003
Posts: 51
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?
helix400 is offline   Reply With Quote
Old 12th June 2007, 06:51   #2
n_baua
Member
 
Join Date: Aug 2006
Posts: 86
Post

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).
n_baua is offline   Reply With Quote
Old 12th June 2007, 19:57   #3
helix400
Member
 
Join Date: Oct 2003
Posts: 51
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.
helix400 is offline   Reply With Quote
Old 13th June 2007, 05:49   #4
n_baua
Member
 
Join Date: Aug 2006
Posts: 86
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++
n_baua is offline   Reply With Quote
Old 16th June 2007, 16:25   #5
jocker
Junior Member
 
Join Date: Jun 2007
Posts: 1
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
jocker is offline   Reply With Quote
Old 16th June 2007, 21:22   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,153
Stupid spam protection for new users

http://chrison.net/OnlyColdFusionCan...mplicated.aspx

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 18th June 2007, 16:41   #7
helix400
Member
 
Join Date: Oct 2003
Posts: 51
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.
helix400 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump