[Mono-dev] recharge.sh problems (monocharge-20070111.tar.gz)

Andy Hume andyhume32 at yahoo.co.uk
Sun Jan 14 10:24:25 EST 2007


I tried to use the recharge.sh script from monolite-20070111.tar.gz to update my install and had some problems.  I'm doing this on Windows so some of the problems I had are cross-platform problems, but some seem general.

Do we know if people use the recharge.sh script successfully on a unix platform?  I would expect that at least #3 occurs...

1. gacutil.exe uses native Windows path but is passed UNIX paths.

I passed the correct (UNIX-style) path to the Mono installation that was to be updated to the script (env prefix=...), but had various problems with that, and eventually worked out that gacutil.exe needed a Windows-style path...

My bash isn't too good but maybe something like the following is required in recharge.sh, along with changing the "... /root ${libdir}" path of the gacutil command line to "... /root ${libdirNative}".  (Maybe libdirNative should be called gacRootDir).

if [ $OSTYPE = cygwin ]
  # err...?
  libdirNative=`cygpath --windows $libdir`

2. If gacutil.exe is given the wrong path, it just creates a new GAC.

This caused me much confusion, gacutil wasn't reporting any error, but no changes were apparent.  I discovered that actually a whole new GAC had been created in a whole new tree at "/cygdrive/e/temp/Mono-20070111_on_1.2.2.1/lib/mono/gac"!  I think that gacutil.exe should fail if told to install to a non-existent GAC; it should't just create a new one.

3. Script runs gacutil.exe from "./2.0/".

That file doesn't exist.  That resultant path is ".../monocharge-20070111/2.0/gacutil.exe"  and gacutil only exists in the 1.0 subdirectory (as it does in the installed version).  Should there be gacutils.exe in both versions?

BTW I tried changing the script's path, to ./1.0/gacutil.exe but that was NOT good... (e.g. (typed by hand): "** ERROR ** Cannot find custom attr constructor image: E:\temp\monocharge-20070111\2.0/System.Xml.dll intoken: 0x0a0002d7"
and "** (./1.0/gacutil:4824: WARNING **: Missing method .ctor in assembly E:\temp\monocharge-20070111\2.0/System.Xml.dll, type System.Runtime.CompilerServoices.RuntimeCompatabilityAttribute")

2. Apparently leaves behind .mdb files

It appears that the script runs correctly for the everything but the GAC 2.0 update but there are lots of .mdb files left behind from the previous version where the .exe itself _has_ been updated.  For instance "Mono\lib\mono\1.0\al.exe[.mdb]", and also caspol, cert2spc, certmgr etc there too; and "Mono\lib\mono\2.0\gmcs.exe[.mdb]", and also ilasem, mkbundle, etc etc.  The GAC apparently correctly deletes the old .mdb files when updating.

Don't what the effect of this is?  Though after some manual hacking I did to get be able to test a fixed bug, I got an error about .mdb and .exe not matching...


Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html

More information about the Mono-devel-list mailing list