Author: mhutch
Date: 2007-11-20 18:17:54 -0500 (Tue, 20 Nov 2007)
New Revision: 90046

Modified:
   trunk/monodevelop/Extras/AspNetAddIn/ChangeLog
   trunk/monodevelop/Extras/AspNetAddIn/Project/AspNetAppProject.cs
Log:
* Project/AspNetAppProject.cs: Don't try to compile if no files are set
  to compile, as compilers/bindings (e.g. CSharpBinding) will error
  out if no files are set to compile. 

Modified: trunk/monodevelop/Extras/AspNetAddIn/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/AspNetAddIn/ChangeLog      2007-11-20 23:04:49 UTC 
(rev 90045)
+++ trunk/monodevelop/Extras/AspNetAddIn/ChangeLog      2007-11-20 23:17:54 UTC 
(rev 90046)
@@ -1,3 +1,9 @@
+2007-11-20  Michael Hutchinson <[EMAIL PROTECTED]> 
+
+       * Project/AspNetAppProject.cs: Don't try to compile if no files are set 
to
+         compile, as compilers/bindings (e.g. CSharpBinding) will error out if 
no
+         files are set to compile. 
+
 2007-11-09  Michael Hutchinson <[EMAIL PROTECTED]> 
 
        * Deployment/WebDeployService.cs, Project/AspNetAppProject.cs,

Modified: trunk/monodevelop/Extras/AspNetAddIn/Project/AspNetAppProject.cs
===================================================================
--- trunk/monodevelop/Extras/AspNetAddIn/Project/AspNetAppProject.cs    
2007-11-20 23:04:49 UTC (rev 90045)
+++ trunk/monodevelop/Extras/AspNetAddIn/Project/AspNetAppProject.cs    
2007-11-20 23:17:54 UTC (rev 90046)
@@ -191,12 +191,28 @@
                
                #region build/prebuild/execute
                
-               // all this does is makes sure that references are copied after 
building
-               // it's not strictly necessary, as the Run/Deploy commands do 
it too..
-               // but some users expect it to happen during a compile, so it's 
easier all round this way
+               
                protected override ICompilerResult DoBuild (IProgressMonitor 
monitor)
                {
-                       ICompilerResult ret = base.DoBuild (monitor);
+                       //if no files are set to compile, then some compilers 
will error out
+                       //though this is valid with ASP.NET apps, so we just 
avoid calling the compiler in this case
+                       bool needsCompile = false;
+                       foreach (ProjectFile pf in ProjectFiles) {
+                               if (pf.BuildAction == BuildAction.Compile) {
+                                       needsCompile = true;
+                                       break;
+                               }
+                       }
+                       
+                       ICompilerResult ret;
+                       if (needsCompile)
+                               ret = base.DoBuild (monitor);
+                       else
+                               ret = new DefaultCompilerResult ();
+                       
+                       // all this does is makes sure that references are 
copied after building
+                       // it's not strictly necessary, as the Run/Deploy 
commands do it too..
+                       // but some users expect it to happen during a compile, 
so it's easier all round this way
                        //need to do this after the compile, as the compile 
phase removes copied references
                        CopyReferencesToOutputPath (false);
                        return ret;

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

Reply via email to