diff options
author | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2015-02-12 03:42:47 +0300 |
---|---|---|
committer | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2015-02-12 03:43:02 +0300 |
commit | e758935d08111235b0c00f10e84e20b773e1dd2b (patch) | |
tree | a97920dba10d06a0ab1d9606c7e4a26c3f65a173 /main | |
parent | 151be5ed272b188a5082123608575855fb8a3e79 (diff) |
[Ide] Only run MSBuild generator if project supports it
Diffstat (limited to 'main')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs | 15 |
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)); } |