2010-03-12 Jb Evain <jbevain@novell.com>
[mono.git] / mcs / class / Microsoft.Build.Tasks / Test / Microsoft.Build.Tasks / Consts.cs
index 12c1a0fbcef9062fd8069b7bc83e30d516355db5..2f41a67c3d99691cd58e52aefd22b9666c8b5b25 100644 (file)
@@ -29,11 +29,15 @@ using System;
 using Microsoft.Build.Utilities;
 
 public static class Consts {
+
+       static bool RunningOnMono ()
+       {
+               return Type.GetType ("Mono.Runtime") != null;
+       }
+       
        public static string BinPath {
                get {
-                       // FIXME: it should check for runtime not OS
-                       int p = (int) Environment.OSVersion.Platform;
-                       if (p == 4 || p == 128)
+                       if (RunningOnMono ())
                                return "../../tools/xbuild/xbuild";
                        else
                                return ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version20);