Author: gonzalo
Date: 2005-04-22 16:34:00 -0400 (Fri, 22 Apr 2005)
New Revision: 43462
Modified:
trunk/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
trunk/mcs/class/System.Web/System.Web.Configuration/ChangeLog
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs
trunk/mcs/class/System.Web/System.Web.UI/ChangeLog
trunk/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
trunk/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
Log:
2005-04-22 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* System.Web.Configuration/CompilationConfigurationHandler.cs: ensure
TempDirectory is not empty before assigning it. Don't mangle the
assembly names provided.
* System.Web.Configuration/CompilationConfiguration.cs: use DynamicBase
as the temp directory instead of Path.GetTempPath.
* System.Web.UI/SimpleWebHandlerParser.cs:
* System.Web.UI/TemplateParser.cs: always get the location (full path)
for assemblies, even the ones from the GAC.
* System.Web.Compilation/BaseCompiler.cs: check that DynamicBase
directory exists before creating the TempFileCollection.
The changes related to assembly names fix bug number #74500.
Modified: trunk/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
2005-04-22 19:43:46 UTC (rev 43461)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
2005-04-22 20:34:00 UTC (rev 43462)
@@ -311,12 +311,12 @@
compilerParameters.WarningLevel =
config.GetWarningLevel (lang);
bool keepFiles = (Environment.GetEnvironmentVariable
("MONO_ASPNET_NODELETE") != null);
+ if (!Directory.Exists (dynamicBase))
+ Directory.CreateDirectory (dynamicBase);
+
TempFileCollection tempcoll = new TempFileCollection
(config.TempDirectory, keepFiles);
compilerParameters.TempFiles = tempcoll;
string dllfilename = Path.GetFileName
(tempcoll.AddExtension ("dll", true));
- if (!Directory.Exists (dynamicBase))
- Directory.CreateDirectory (dynamicBase);
-
compilerParameters.OutputAssembly = Path.Combine
(dynamicBase, dllfilename);
CompilerResults results = CachingCompiler.Compile
(this);
Modified: trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2005-04-22
19:43:46 UTC (rev 43461)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2005-04-22
20:34:00 UTC (rev 43462)
@@ -1,5 +1,10 @@
2005-04-22 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+ * BaseCompiler.cs: check that DynamicBase directory exists before
+ creating the TempFileCollection.
+
+2005-04-22 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
* AspGenerator.cs: use a stack for non-server tags even before getting
to a form. Fixes bug #70274.
Modified: trunk/mcs/class/System.Web/System.Web.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Configuration/ChangeLog
2005-04-22 19:43:46 UTC (rev 43461)
+++ trunk/mcs/class/System.Web/System.Web.Configuration/ChangeLog
2005-04-22 20:34:00 UTC (rev 43462)
@@ -1,3 +1,11 @@
+2005-04-22 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * CompilationConfigurationHandler.cs: ensure TempDirectory is not empty
+ before assigning it. Don't mangle the assembly names provided.
+
+ * CompilationConfiguration.cs: use DynamicBase as the temp directory
+ instead of Path.GetTempPath.
+
2005-04-20 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* ModuleItem.cs:
Modified:
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs
===================================================================
---
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs
2005-04-22 19:43:46 UTC (rev 43461)
+++
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfiguration.cs
2005-04-22 20:34:00 UTC (rev 43462)
@@ -67,8 +67,8 @@
if (assemblies == null)
assemblies = new ArrayList ();
- if (temp_directory == null)
- temp_directory = Path.GetTempPath ();
+ if (temp_directory == null || temp_directory == "")
+ temp_directory =
AppDomain.CurrentDomain.SetupInformation.DynamicBase;
}
static public CompilationConfiguration GetInstance (HttpContext
context)
@@ -187,6 +187,7 @@
if (value != null && !Directory.Exists (value))
throw new ArgumentException ("Directory
does not exist");
+ Console.WriteLine ("Dos: '{0}'\n{1}", value,
Environment.StackTrace);
temp_directory = value;
}
}
Modified:
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs
===================================================================
---
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs
2005-04-22 19:43:46 UTC (rev 43461)
+++
trunk/mcs/class/System.Web/System.Web.Configuration/CompilationConfigurationHandler.cs
2005-04-22 20:34:00 UTC (rev 43462)
@@ -40,7 +40,9 @@
{
CompilationConfiguration config = new
CompilationConfiguration (parent);
- config.TempDirectory = AttValue ("tempDirectory",
section, true);
+ string tmp = AttValue ("tempDirectory", section, true);
+ if (tmp != null && tmp != "")
+ config.TempDirectory = tmp;
config.DefaultLanguage = AttValue ("defaultLanguage",
section);
if (config.DefaultLanguage == null)
config.DefaultLanguage = "c#";
@@ -122,7 +124,6 @@
continue;
}
- aname = ShortAsmName (aname);
if (!assemblies.Contains (aname))
assemblies.Add (aname);
@@ -134,7 +135,6 @@
config.AssembliesInBin = false;
continue;
}
- aname = ShortAsmName (aname);
assemblies.Remove (aname);
continue;
}
@@ -187,14 +187,6 @@
return HandlersUtil.ExtractAttributeValue (name, node,
true);
}
- private static string ShortAsmName (string long_name)
- {
- int i = long_name.IndexOf (',');
- if (i < 0)
- return long_name + ".dll";
- return long_name.Substring (0, i) + ".dll";
- }
-
static void ThrowException (string message, XmlNode node)
{
HandlersUtil.ThrowException (message, node);
Modified: trunk/mcs/class/System.Web/System.Web.UI/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/ChangeLog 2005-04-22 19:43:46 UTC
(rev 43461)
+++ trunk/mcs/class/System.Web/System.Web.UI/ChangeLog 2005-04-22 20:34:00 UTC
(rev 43462)
@@ -1,3 +1,12 @@
+2005-04-22 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * SimpleWebHandlerParser.cs:
+ * TemplateParser.cs: always get the location (full path) for assemblies,
+ even the ones from the GAC.
+
+ * BaseCompiler.cs: check that DynamicBase directory exists before
+ creating the TempFileCollection.
+
2005-04-22 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* ClientScriptManager.cs: Use a linked list instead of a Hashtable
Modified: trunk/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
2005-04-22 19:43:46 UTC (rev 43461)
+++ trunk/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
2005-04-22 20:34:00 UTC (rev 43462)
@@ -256,22 +256,20 @@
return (Assembly) o;
}
- bool fullpath = true;
Assembly assembly = LoadAssemblyFromBin (name);
if (assembly != null) {
- AddAssembly (assembly, fullpath);
+ AddAssembly (assembly, true);
return assembly;
}
try {
assembly = Assembly.LoadWithPartialName (name);
string loc = assembly.Location;
- fullpath = (Path.GetDirectoryName (loc) ==
PrivateBinPath);
} catch (Exception e) {
throw new ParseException (location, "Assembly "
+ name + " not found", e);
}
- AddAssembly (assembly, fullpath);
+ AddAssembly (assembly, true);
return assembly;
}
Modified: trunk/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/TemplateParser.cs 2005-04-22
19:43:46 UTC (rev 43461)
+++ trunk/mcs/class/System.Web/System.Web.UI/TemplateParser.cs 2005-04-22
20:34:00 UTC (rev 43462)
@@ -86,7 +86,8 @@
imports.Add ("System.Web.UI.HtmlControls");
assemblies = new ArrayList ();
- assemblies.AddRange (CompilationConfig.Assemblies);
+ foreach (string a in CompilationConfig.Assemblies)
+ AddAssemblyByName (a);
if (CompilationConfig.AssembliesInBin)
AddAssembliesInBin ();
@@ -265,7 +266,7 @@
continue;
if (Path.GetDirectoryName (ass.Location) !=
PrivateBinPath) {
- AddAssembly (ass, false);
+ AddAssembly (ass, true);
} else {
seenBin = true;
}
@@ -369,23 +370,20 @@
return (Assembly) o;
}
- bool fullpath = false;
Assembly assembly = null;
try {
assembly = Assembly.Load (name);
string loc = assembly.Location;
- fullpath = (Path.GetDirectoryName (loc) ==
PrivateBinPath);
} catch (Exception) {
try {
assembly = Assembly.LoadWithPartialName
(name);
string loc = assembly.Location;
- fullpath = (Path.GetDirectoryName (loc)
== PrivateBinPath);
} catch (Exception e) {
ThrowParseException ("Assembly " + name
+ " not found", e);
}
}
- AddAssembly (assembly, fullpath);
+ AddAssembly (assembly, true);
return assembly;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches