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 <m.j.hutchinson@gmail.com>2015-02-12 03:42:47 +0300
committerMichael Hutchinson <m.j.hutchinson@gmail.com>2015-02-12 03:43:02 +0300
commite758935d08111235b0c00f10e84e20b773e1dd2b (patch)
treea97920dba10d06a0ab1d9606c7e4a26c3f65a173 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools
parent151be5ed272b188a5082123608575855fb8a3e79 (diff)
[Ide] Only run MSBuild generator if project supports it
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
index 02668061f4..6c3e3a6d1e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
@@ -135,6 +135,21 @@ namespace MonoDevelop.Ide.CustomTools
return false;
}
+ //ignore MSBuild tool for projects that aren't MSBuild or can't build
+ //we could emit a warning but this would get very annoying for Xamarin Forms + SAP
+ //in future we could consider running the MSBuild generator in context of every referencing project
+ if (tool is MSBuildCustomTool) {
+ if (!file.Project.SupportsBuild ()) {
+ return false;
+ }
+ bool byDefault, require;
+ MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectService.CheckHandlerUsesMSBuildEngine (file.Project, out byDefault, out require);
+ var usesMSBuild = require || (file.Project.UseMSBuildEngine ?? byDefault);
+ if (!usesMSBuild) {
+ return false;
+ }
+ }
+
if (!string.IsNullOrEmpty (file.LastGenOutput)) {
genFile = file.Project.Files.GetFile (file.FilePath.ParentDirectory.Combine (file.LastGenOutput));
}