2010-01-05 Marek Habersack <mhabersack@novell.com>
authorMarek Habersack <grendel@twistedcode.net>
Tue, 5 Jan 2010 12:13:22 +0000 (12:13 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Tue, 5 Jan 2010 12:13:22 +0000 (12:13 -0000)
* BuildManager.cs: in GenerateAssembly, if compilation fails for
the requested path and exception thrown is of type
CompilationException, do not wrap it in HttpException, just
rethrow.

* AppResourcesCompiler.cs: the culture files dictionary is
case-insensitive now. Otherwise culture files with culture name
cased differently will cause overlapped i/o on response files
while building satellite assemblies and, in effect, compilation
will fail.

svn path=/trunk/mcs/; revision=149077

mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.cs
mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
mcs/class/System.Web/System.Web.Compilation/ChangeLog

index c27e849a4499eeb607fd2b9ffb8fc422ea2c593f..8de4aea5c1fde457a20383fc22d26a4b9878419b 100644 (file)
@@ -278,7 +278,7 @@ namespace System.Web.Compilation
                {
                        this.isGlobal = true;
                        this.files = new AppResourceFilesCollection (context);
-                       this.cultureFiles = new Dictionary <string, List <string>> ();
+                       this.cultureFiles = new Dictionary <string, List <string>> (StringComparer.OrdinalIgnoreCase);
                }
 
                public AppResourcesCompiler (string virtualPath)
@@ -287,7 +287,7 @@ namespace System.Web.Compilation
                        this.virtualPath = virtualPath;
                        this.isGlobal = false;
                        this.files = new AppResourceFilesCollection (HttpContext.Current.Request.MapPath (virtualPath));
-                       this.cultureFiles = new Dictionary <string, List <string>> ();
+                       this.cultureFiles = new Dictionary <string, List <string>> (StringComparer.OrdinalIgnoreCase);
                }
 
                static Assembly LoadAssembly (string asmPath)
index 1661118be291b3374ff6c13bd600e225c2fb8de4..f9d18c1452ca15364b5c5bd3f48ab58b669502d3 100644 (file)
@@ -568,8 +568,13 @@ namespace System.Web.Compilation
                                try {
                                        bp.GenerateCode (abuilder);
                                } catch (Exception ex) {
-                                       if (String.Compare (bvp, vpabsolute, stringComparer) == 0)
+                                       if (String.Compare (bvp, vpabsolute, stringComparer) == 0) {
+                                               if (ex is CompilationException)
+                                                       throw;
+                                               
                                                throw new HttpException ("Code generation failed.", ex);
+                                       }
+                                       
                                        if (failedBuildProviders == null)
                                                failedBuildProviders = new List <BuildProvider> ();
                                        failedBuildProviders.Add (bp);
index 3dda3fe9967716a11a2a42ae5c9fc596d463eb5f..e01081ad2bb9b745153e488c931b174e976f4587 100644 (file)
@@ -1,3 +1,16 @@
+2010-01-05  Marek Habersack  <mhabersack@novell.com>
+
+       * BuildManager.cs: in GenerateAssembly, if compilation fails for
+       the requested path and exception thrown is of type
+       CompilationException, do not wrap it in HttpException, just
+       rethrow.
+
+       * AppResourcesCompiler.cs: the culture files dictionary is
+       case-insensitive now. Otherwise culture files with culture name
+       cased differently will cause overlapped i/o on response files
+       while building satellite assemblies and, in effect, compilation
+       will fail.
+
 2009-12-14  Marek Habersack  <mhabersack@novell.com>
 
        * BuildManager.cs: RemoveFailedAssemblies ignores warnings to