Просмотр исходного кода

2005-08-18 Gonzalo Paniagua Javier <[email protected]>

	* WebServiceCompiler.cs: apply the same fix as in r45440 that fixed bug
	75146 for pages/controls.


svn path=/trunk/mcs/; revision=48521
Gonzalo Paniagua Javier 20 лет назад
Родитель
Сommit
549563ff5e

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

@@ -1,4 +1,10 @@
+2005-08-18 Gonzalo Paniagua Javier <[email protected]>
+
+	* WebServiceCompiler.cs: apply the same fix as in r45440 that fixed bug
+	75146 for pages/controls.
+
 2005-07-18  Eyal Alalouf  <[email protected]>
+
 	* Location.cs: Added set to the FileName property.
 
 2005-07-11 Gonzalo Paniagua Javier <[email protected]>

+ 8 - 4
mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs

@@ -105,12 +105,16 @@ namespace System.Web.Compilation
 
 			CompilerResults results = CachingCompiler.Compile (this);
 			CheckCompilerErrors (results);
-			if (results.CompiledAssembly == null)
-				throw new CompilationException (inputFile, results.Errors,
-					"No assembly returned after compilation!?");
+			Assembly assembly = results.CompiledAssembly;
+			if (assembly == null) {
+				if (!File.Exists (compilerParameters.OutputAssembly))
+					throw new CompilationException (inputFile, results.Errors,
+						"No assembly returned after compilation!?");
+				assembly = Assembly.LoadFrom (compilerParameters.OutputAssembly);
+			}
 
 			results.TempFiles.Delete ();
-			type = results.CompiledAssembly.GetType (parser.ClassName, true);
+			type = assembly.GetType (parser.ClassName, true);
 			CachingCompiler.InsertType (type, parser.PhysicalPath);
 			return type;
 		}