Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hutchinson <mhutchinson@novell.com>2007-11-21 02:17:54 +0300
committerMichael Hutchinson <mhutchinson@novell.com>2007-11-21 02:17:54 +0300
commita737411f8213f030f32876da21145be3fe68c635 (patch)
treea2934bc2361b1fb7cebaf8117ef77d31892b1fec /Extras/AspNetAddIn/Project/AspNetAppProject.cs
parent3952ab7653c05737c78ce723d56a6d2e5b6bacff (diff)
* 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. svn path=/trunk/monodevelop/; revision=90046
Diffstat (limited to 'Extras/AspNetAddIn/Project/AspNetAppProject.cs')
-rw-r--r--Extras/AspNetAddIn/Project/AspNetAppProject.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/Extras/AspNetAddIn/Project/AspNetAppProject.cs b/Extras/AspNetAddIn/Project/AspNetAppProject.cs
index d847e0221f..8446601d22 100644
--- a/Extras/AspNetAddIn/Project/AspNetAppProject.cs
+++ b/Extras/AspNetAddIn/Project/AspNetAppProject.cs
@@ -191,12 +191,28 @@ namespace AspNetAddIn
#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;