diff options
author | Michael Hutchinson <mhutch@xamarin.com> | 2014-01-09 02:32:10 +0400 |
---|---|---|
committer | Michael Hutchinson <mhutch@xamarin.com> | 2014-01-09 10:41:50 +0400 |
commit | 00ca672c1d0f3d6a5040e45a6c14631edf250f9d (patch) | |
tree | 8aca5e1a38964749d8c269cd6e31aa067f9ea3df /main/src/core/MonoDevelop.Projects.Formats.MSBuild | |
parent | d37307d7b04b694caf7e26367cfeaf4083879c85 (diff) |
[MSBuild] Set DefaultToolsVersion on build engines
Diffstat (limited to 'main/src/core/MonoDevelop.Projects.Formats.MSBuild')
6 files changed, 40 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v12.0.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v12.0.cs index ea87dd5e87..eff9423485 100644 --- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v12.0.cs +++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v12.0.cs @@ -1 +1,9 @@ -[assembly: System.Reflection.AssemblyTitle ("MonoDevelop MSBuild 12.0 Builder")]
\ No newline at end of file +[assembly: System.Reflection.AssemblyTitle ("MonoDevelop MSBuild 12.0 Builder")]
+
+namespace MonoDevelop.Projects.Formats.MSBuild
+{
+ static class MSBuildConsts
+ {
+ public const string Version = "12.0";
+ }
+}
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v2.0.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v2.0.cs index ce86fd384f..993d6e363f 100644 --- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v2.0.cs +++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v2.0.cs @@ -1 +1,9 @@ -[assembly: System.Reflection.AssemblyTitle ("MonoDevelop MSBuild 2.0 Builder")]
\ No newline at end of file +[assembly: System.Reflection.AssemblyTitle ("MonoDevelop MSBuild 2.0 Builder")]
+
+namespace MonoDevelop.Projects.Formats.MSBuild
+{
+ static class MSBuildConsts
+ {
+ public const string Version = "2.0";
+ }
+}
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v3.5.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v3.5.cs index a38dfbe97e..bca044d5cf 100644 --- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v3.5.cs +++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v3.5.cs @@ -1 +1,9 @@ -[assembly: System.Reflection.AssemblyTitle ("MonoDevelop MSBuild 3.5 Builder")]
\ No newline at end of file +[assembly: System.Reflection.AssemblyTitle ("MonoDevelop MSBuild 3.5 Builder")]
+
+namespace MonoDevelop.Projects.Formats.MSBuild
+{
+ static class MSBuildConsts
+ {
+ public const string Version = "3.5";
+ }
+}
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v4.0.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v4.0.cs index a6ee70814b..de5f65ec45 100644 --- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v4.0.cs +++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/AssemblyInfo.v4.0.cs @@ -1 +1,9 @@ -[assembly: System.Reflection.AssemblyTitle ("MonoDevelop MSBuild 4.0 Builder")]
\ No newline at end of file +[assembly: System.Reflection.AssemblyTitle ("MonoDevelop MSBuild 4.0 Builder")]
+
+namespace MonoDevelop.Projects.Formats.MSBuild
+{
+ static class MSBuildConsts
+ {
+ public const string Version = "4.0";
+ }
+}
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs index 580d746872..f1c644f148 100644 --- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs +++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs @@ -82,6 +82,9 @@ namespace MonoDevelop.Projects.Formats.MSBuild RunSTA (delegate { if (!engines.TryGetValue (binDir, out engine)) { engine = new Engine (binDir); +#if NET_3_5 + engine.DefaultToolsVersion = MSBuildConsts.Version; +#endif engine.GlobalProperties.SetProperty ("BuildingInsideVisualStudio", "true"); //we don't have host compilers in MD, and this is set to true by some of the MS targets diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs index 011f5400f4..7d8500ed06 100644 --- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs +++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs @@ -103,6 +103,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild RunSTA (delegate {
if (!engines.TryGetValue (binDir, out engine)) {
engine = new ProjectCollection ();
+ engine.DefaultToolsVersion = MSBuildConsts.Version;
engine.SetGlobalProperty ("BuildingInsideVisualStudio", "true");
//we don't have host compilers in MD, and this is set to true by some of the MS targets
|