Author: mhabersack
Date: 2006-11-15 20:11:49 -0500 (Wed, 15 Nov 2006)
New Revision: 67968

Modified:
   trunk/mcs/class/System.Web/System.Web.Compilation/AppCodeCompiler.cs
   trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
Log:
Changes to the App_Code compiler

Modified: trunk/mcs/class/System.Web/System.Web.Compilation/AppCodeCompiler.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/AppCodeCompiler.cs        
2006-11-16 00:54:23 UTC (rev 67967)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/AppCodeCompiler.cs        
2006-11-16 01:11:49 UTC (rev 67968)
@@ -35,6 +35,7 @@
 using System.Collections.Generic;
 using System.Globalization;
 using System.IO;
+using System.Web;
 using System.Web.Configuration;
 using System.Web.Util;
 
@@ -190,10 +191,12 @@
                        if (file == null || file.Length == 0 || buildProviders 
== null || buildProviders.Count == 0)
                                return null;
 
-                       foreach (BuildProvider bp in buildProviders)
-                               if (IsCorrectBuilderType (bp))
-                                       return bp;
-
+                       BuildProvider ret = 
buildProviders.GetProviderForExtension (Path.GetExtension (file));
+                       if (ret != null && IsCorrectBuilderType (ret)) {
+                               ret.SetVirtualPath 
(VirtualPathUtility.ToAppRelative (file));
+                               return ret;
+                       }
+                               
                        return null;
                }
 

Modified: trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2006-11-16 
00:54:23 UTC (rev 67967)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2006-11-16 
01:11:49 UTC (rev 67968)
@@ -1,3 +1,11 @@
+2006-11-16  Marek Habersack  <[EMAIL PROTECTED]>
+
+       * AppCodeCompiler.cs: Fixed BuildProvider creation for a path. Now
+       correctly uses the BuildProviderCollection to retrieve the
+       appropriate builder and maps the physical input file path into
+       application relative path when setting the virtual path of the
+       build provider.
+
 2006-11-13  Marek Habersack  <[EMAIL PROTECTED]>
 
        * AssemblyBuilder.cs: Added referenced assemblies support. Added a

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to