Perhaps someone will be interested in a few notes that I have made in the last 
couple of days while trying to locate the source of a problem a user was having 
with loading mod_aspdotnet under a Server Suite that I provide...
(do note that I know nothing about .NET and am of the c/asm camp -- if I have 
anything wrong, please correct me)

While gacutil.exe is considered to be a .NET Framework SDK 'developer' tool, 
Microsoft has mistakenly included it into...
.NET Framework (runtime) v1.0 SP2, SP3
.NET Framework (runtime) v1.1 SP1
(and in a few other packages)

I do not believe MS will be able to remove gacutil.exe from any further .NET 
v1.0 or v1.1 releases; and _might_ have to include gacutil.exe in all the other 
branches of the .NET Framework as I'm sure some end-users are now dependent on 
this 'feature'.

regasm.exe is also now (or has it always been?) part of .NET Framework 
(runtime). Perhaps it was only not present under the beta or pre-release 
versions? (I'm very sure regasm.exe is in v1.1 (no SP1) while gacutil.exe is 
not -- so they could not have made it in at the same time)

Here are some of the options that I have used to deploy Apache.Web.dll into the 
GAC (without using MSI Installer or depending on the SDK)...

------
Method 1 (regasm.exe and gacutil.exe):

SET PATH=%PATH%;%SystemRoot%\Microsoft.NET\Framework\v1.1.4322
SET PATH=%PATH%;%SystemRoot%\Microsoft.NET\Framework\v1.0.3705

_register_
regasm /verbose /nologo "C:\www\Apache22\bin\Apache.Web.dll"
gacutil /nologo /ir "Apache.Web.dll" FILEPATH 
"C:\www\Apache22\bin\Apache.Web.dll" "mod_aspdotnet Apache.Web.dll"

_unregister_
gacutil /nologo /ur "Apache.Web" FILEPATH "C:\www\Apache22\bin\Apache.Web.dll" 
"mod_aspdotnet Apache.Web.dll"
regasm /verbose /nologo /unregister "C:\www\Apache22\bin\Apache.Web.dll"
------

------
Method 2 (idiot proof):
(does not provide reference counting)

Open two folder views (Windows Explorer)...
1) C:\www\Apache22\bin\
2) %systemroot%\assembly\

Drag-and-drop file 'Apache.Web.dll' from 1st window into the second.
------

'How to determine which versions of the .NET Framework are installed and 
whether service packs have been applied'
http://support.microsoft.com/kb/318785/

To determine if .NET Framework (runtime) v1.0 with SP2/3 or v1.1 with SP1 is 
installed...
Open folder '%SystemRoot%\Microsoft.NET\Framework\v1.0.3705'.
Open folder '%SystemRoot%\Microsoft.NET\Framework\v1.1.4322'.
Right-click file 'mscorlib.dll', Select 'Properties', Select menu 'Version'...
'File Version : .NET Runtime Version'
'1.1.4322.2032 : .NET v1.1 SP1'
'1.0.3705.6018 : .NET v1.0 SP3'
'1.0.3705.288 : .NET v1.0 SP2'

The only clear reason that I have been able to find against using gacutil.exe 
is this...

'.NET Framework Developer's Guide -- Global Assembly Cache'
http://msdn2.microsoft.com/en-us/library/yf1d93sz.aspx
"In deployment scenarios, use Windows Installer 2.0 to install assemblies into 
the global assembly cache. Use Windows Explorer or the Global Assembly Cache 
tool only in development scenarios, because they do not provide assembly 
reference counting and other features provided when using the Windows 
Installer."

However, this is probably in reference to an older version of gacutil.exe, as 
current versions of gacutil.exe do provide traced reference counting with the 
'/r' option...

'.NET Development -- Global Assembly Cache Tool (Gacutil.exe)'
http://msdn2.microsoft.com/en-us/library/ex0ss12c.aspx
"Gacutil.exe provides options that support reference counting similar to the 
reference counting scheme supported by Windows Installer. You can use 
Gacutil.exe to install two applications that install the same assembly; the 
tool keeps track of the number of references to the assembly."


http://blogs.msdn.com/psfd/archive/2005/05/05/414918.aspx
http://hoser.lander.ca/GACUtil+V20++Where+To+Get+It.aspx
http://channel9.msdn.com/ShowPost.aspx?PostID=209954

Reply via email to