+2004-04-29 Jackson Harper <jackson@ximian.com>
+
+ * driver.cs: Prefer the corlib system version when looking for
+ assemblies in the GAC. This is still a hack, but its a better hack
+ now.
+
2004-04-29 Marek Safar <marek.safar@seznam.cz>
* decl.cs, enum.cs: Improved error 3005 reporting.
// Whether the user has specified a different encoder manually
//
static bool using_default_encoder = true;
+
+ //
+ // The system version we are using, if not specified on the commandline we
+ // will use the same version as corlib for looking for libraries in the GAC.
+ //
+ static string sys_version;
public static void ShowTime (string msg)
{
if (!Directory.Exists (asmb_path))
return null;
- canidates = Directory.GetDirectories (asmb_path);
-
+ canidates = Directory.GetDirectories (asmb_path, GetSysVersion () + "*");
+ if (canidates.Length == 0)
+ canidates = Directory.GetDirectories (asmb_path);
+ if (canidates.Length == 0)
+ return null;
try {
Assembly a = Assembly.LoadFrom (Path.Combine (canidates [0], use_name + ".dll"));
return a;
}
}
+ static string GetSysVersion ()
+ {
+ if (sys_version != null)
+ return sys_version;
+ sys_version = typeof (object).Assembly.GetName ().Version.ToString ();
+ return sys_version;
+ }
+
static public void LoadModule (MethodInfo adder_method, string module)
{
Module m;