I know 3 different ways of deploying a .Net assembly into the GAC.
1. Through windows explorer, drag and drop the dll into C:\WINDOWS\assembly
2. Through the "Microsoft .NET Framework 2.0 Configuration" (found under
Administrative Tools)
3. Through a command line utility called gacutil.exe which is NOT delivered
with the .Net framework redistributable but with the .NET SDK. So, you will
need to have either the .Net SDK or Visual Studio installed on the machine
you want to deploy the assembly. Visual Studio indeed includes the SDK as
Alex Melata reminded me in a previous post.
- to install an assembly in the GAC : gacutil /i myAssembly.dll
- to remove an assembly from the GAC: gacutil /u myAssembly.dll
Please run gacutil /? for more details.
If you still can't have it working, Make sure you use a command prompt from
Programs-> Microsoft .NET Framework SDK v2.0 -> SDK Command Prompt
As that link initialize the command prompt with the necessary variables set
(PATH and so on).
If you want to deploy your assembly through a batch file, your batch file
should include the necessary path, to make it easy, just include in the
beginning of your batch file the commands found in "C:\Program
Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sdkvars.bat"
I hope this help so that you can finally deploy your assembly.
Best,
Francois Malgreve
http://www.malgreve.net
Bishman said:
OK....
Refering to Phils reply "...If you just want it deployed into the
GAC, that's just a plain install into the GAC.. " this is what I want.
My question would then seem to be how do you deploy into the GAC ?
Phil Wilson said:
"assembly registered in the GAC" is one of those ambiguous phrases where
I never know what people are asking. If you just want it deployed into
the GAC, that's just a plain install into the GAC. The term "registered"
implies registration (as in COM registration) so if you really really
mean that you want the equivalent of regsvr32 for .NET assemblies, then
regasm.exe is what registers them for COM clients, and they can be in the
GAC or not.
--
Phil Wilson
[MVP Windows Installer]
Bishman said:
Hi,
I have been digging around for info on the deployment of a .Net DLL.
There doesnt seem to be an equivalent of Regsvr32 for a .Net DLL. Is
this correct ? Am I right in saying that what I need to do is get the
Assembly registered in the GAC ? I can do it using .Net Framework 2.0
Configuration from the Administrative tools but this is not command line
based and doesnt reside on an XP pro machine.
I thought that maybe Gacutil.exe may be the answer but I dont think so.
Can someone point me in the right direction as I need to deploy a .Net
DLL that is shared accross several Forms apps.
Thanks.
Jon.