Author: mhabersack
Date: 2008-02-06 15:31:37 -0500 (Wed, 06 Feb 2008)
New Revision: 95074
Modified:
trunk/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs
trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
Log:
* AssemblyBuilder.cs: if there are no units, no source files, no
resources and no embedded resources in the passed options then
do not attempt to compile the assembly. Fixes bug #359325
Modified: trunk/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs
2008-02-06 20:18:27 UTC (rev 95073)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs
2008-02-06 20:31:37 UTC (rev 95074)
@@ -508,8 +508,9 @@
// files. This also facilates possible debugging for the
// end user, since they get the code beforehand.
List <string> files = SourceFiles;
+ Dictionary <string, string> resources = ResourceFiles;
- if (units.Length == 0 && files.Count == 0)
+ if (units.Length == 0 && files.Count == 0 &&
resources.Count == 0 && options.EmbeddedResources.Count == 0)
return null;
string filename;
@@ -530,7 +531,7 @@
}
}
}
- Dictionary <string, string> resources = ResourceFiles;
+
foreach (KeyValuePair <string, string> de in resources)
options.EmbeddedResources.Add (de.Value);
foreach (Assembly refasm in ReferencedAssemblies)
Modified: trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2008-02-06
20:18:27 UTC (rev 95073)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2008-02-06
20:31:37 UTC (rev 95074)
@@ -3,8 +3,9 @@
* GenericBuildProvider.cs: GetGeneratedType may return a type even
though the results are null.
- * AssemblyBuilder.cs: if there are no units and no source files,
- do not attempt to compile the assembly.
+ * AssemblyBuilder.cs: if there are no units, no source files, no
+ resources and no embedded resources in the passed options then
+ do not attempt to compile the assembly. Fixes bug #359325
* AppResourcesAssemblyBuilder.cs, AppCodeCompiler.cs: expect that
BuildAssembly may return null results.
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches