// 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);
}
}
}