2010-03-12 Jb Evain <jbevain@novell.com>
[mono.git] / mcs / class / Microsoft.Build.Tasks / Test / Microsoft.Build.Tasks / Consts.cs
index a6ebaeee63cb9a2cbb28eeca1fbb2bdb8495fec2..2f41a67c3d99691cd58e52aefd22b9666c8b5b25 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-namespace MonoTests.Microsoft.Build.Tasks {
+using System;
+using Microsoft.Build.Utilities;
 
-       public static class Consts {
+public static class Consts {
 
-               public static string BinPath {
-                       get { return "../../tools/xbuild/xbuild"; }
+       static bool RunningOnMono ()
+       {
+               return Type.GetType ("Mono.Runtime") != null;
+       }
+       
+       public static string BinPath {
+               get {
+                       if (RunningOnMono ())
+                               return "../../tools/xbuild/xbuild";
+                       else
+                               return ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version20);
                }
        }
 }