Imported Upstream version 3.8.0

Former-commit-id: 6a76a29bd07d86e57c6c8da45c65ed5447d38a61
This commit is contained in:
Jo Shields
2014-09-04 09:07:35 +01:00
parent a575963da9
commit fe777c5c82
1062 changed files with 12460 additions and 5983 deletions

View File

@@ -328,8 +328,13 @@ namespace Microsoft.Build.Utilities
}
}
}
protected void AppendTextUnquoted (string textToAppend)
#if NET_4_0
public
#else
protected
#endif
void AppendTextUnquoted (string textToAppend)
{
commandLine.Append (textToAppend);
}

View File

@@ -190,9 +190,9 @@ namespace Microsoft.Build.Utilities
string targetFrameworkProfile)
{
var path = Path.Combine (xbuildFxDir, targetFrameworkIdentifier);
if (targetFrameworkVersion != null) {
if (!string.IsNullOrEmpty (targetFrameworkVersion)) {
path = Path.Combine (path, targetFrameworkVersion);
if (targetFrameworkProfile != null)
if (!string.IsNullOrEmpty (targetFrameworkProfile))
path = Path.Combine (path, "Profile", targetFrameworkProfile);
}
if (!Directory.Exists (path))
@@ -200,7 +200,6 @@ namespace Microsoft.Build.Utilities
var flist = Path.Combine (path, "RedistList", "FrameworkList.xml");
if (!File.Exists (flist))
return null;
var xml = XmlReader.Create (flist);
xml.MoveToContent ();
var targetFxDir = xml.GetAttribute ("TargetFrameworkDirectory");

View File

@@ -2,4 +2,5 @@ Microsoft.Build.Utilities/CommandLineBuilderTest.cs
Microsoft.Build.Utilities/LoggerTest.cs
Microsoft.Build.Utilities/TaskItemTest.cs
Microsoft.Build.Utilities/TaskLoggingHelperTest.cs
Microsoft.Build.Utilities/ToolLocationHelperTest.cs
Microsoft.Build.Utilities/ToolTaskTest.cs

View File

@@ -0,0 +1,21 @@
#if NET_4_0
using System;
using NUnit.Framework;
using Microsoft.Build.Utilities;
namespace MonoTests.Microsoft.Build.Utilities
{
[TestFixture]
public class ToolLocationHelperTest
{
[Test]
[Category ("NotWorking")] // this test needs extra xbuild testing settings, as the target framework path is different.
public void GetPathToStandardLibraries ()
{
Assert.IsTrue (!string.IsNullOrEmpty (ToolLocationHelper.GetPathToStandardLibraries (".NETFramework", "v4.0", null)), "std path");
Assert.IsTrue (!string.IsNullOrEmpty (ToolLocationHelper.GetPathToStandardLibraries (".NETFramework", "v4.0", string.Empty)), "empty Profile path");
}
}
}
#endif