[xbuild] Make Engine.DefaultToolsVersion 2.0 .
[mono.git] / mcs / class / Microsoft.Build.Engine / Microsoft.Build.BuildEngine / Engine.cs
index 8f7bc6d4b7a275abf033e796ae806318024f3506..239118910a277e63707b74a82afb515da34f3f3a 100644 (file)
@@ -518,16 +518,14 @@ namespace Microsoft.Build.BuildEngine {
 
                public string DefaultToolsVersion {
                        get {
-                               if (String.IsNullOrEmpty (defaultToolsVersion))
-#if NET_4_0
-                                       return "4.0";
-#elif NET_3_5
-                                       return "3.5";
-#else
-                                       return "2.0";
-#endif
-                               
-                               return defaultToolsVersion;
+                               // This is used as the fall back version if the
+                               // project can't find a version to use
+                               // Hard-coded to 2.0, so it allows even vs2005 projects
+                               // to build correctly, as they won't have a ToolsVersion
+                               // set!
+                               return String.IsNullOrEmpty (defaultToolsVersion)
+                                               ? "2.0"
+                                               : defaultToolsVersion;
                        }
                        set {
                                if (Toolsets [value] == null)