Selaa lähdekoodia

2007-04-15 Marek Habersack <[email protected]>

	* AppCodeCompiler.cs: Make sure there's actually anything to compile.

svn path=/trunk/mcs/; revision=75722
Marek Habersack 18 vuotta sitten
vanhempi
sitoutus
114cd09856

+ 5 - 1
mcs/class/System.Web/System.Web.Compilation/AppCodeCompiler.cs

@@ -121,7 +121,7 @@ namespace System.Web.Compilation
 			
 			// First make sure all the files are in the same
 			// language
-			bool known;
+			bool known = false, unknown = false;
 			foreach (string f in files) {
 				known = true;
 				language = null;
@@ -206,8 +206,12 @@ namespace System.Web.Compilation
 					if (bprovider == null)
 						continue;
 					bprovider.GenerateCode (abuilder);
+					unknown = true;
 				}
 			}
+
+			if (!known && !unknown)
+				return;
 			
 			outputAssemblyName = (string)FileUtils.CreateTemporaryFile (
 				AppDomain.CurrentDomain.SetupInformation.DynamicBase,

+ 1 - 0
mcs/class/System.Web/System.Web.Compilation/ChangeLog

@@ -2,6 +2,7 @@
 
 	* AppCodeCompiler.cs: properly convert physical file path to
 	virtual path for build providers.
+	Make sure there's actually anything to compile.
 
 2007-04-11  Marek Habersack  <[email protected]>