You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
@@ -93,7 +93,7 @@ namespace Microsoft.Build.BuildEngine {
|
||||
{
|
||||
this.binPath = binPath;
|
||||
this.buildEnabled = true;
|
||||
this.projects = new Dictionary <string, Project> ();
|
||||
this.projects = new Dictionary <string, Project> (StringComparer.OrdinalIgnoreCase);
|
||||
this.eventSource = new EventSource ();
|
||||
this.loggers = new List <ILogger> ();
|
||||
this.buildStarted = false;
|
||||
@@ -118,6 +118,9 @@ namespace Microsoft.Build.BuildEngine {
|
||||
ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version40)));
|
||||
#if XBUILD_12
|
||||
Toolsets.Add (new Toolset ("12.0", ToolLocationHelper.GetPathToBuildTools ("12.0")));
|
||||
#endif
|
||||
#if XBUILD_14
|
||||
Toolsets.Add (new Toolset ("14.0", ToolLocationHelper.GetPathToBuildTools ("14.0")));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -464,6 +464,8 @@ namespace Microsoft.Build.BuildEngine {
|
||||
List<string> args = new List<string> ();
|
||||
int parens = 0;
|
||||
bool backticks = false;
|
||||
bool inDoubleQuotes = false;
|
||||
bool inSingleQuotes = false;
|
||||
int start = pos;
|
||||
for (; pos < text.Length; ++pos) {
|
||||
var ch = text [pos];
|
||||
@@ -476,6 +478,16 @@ namespace Microsoft.Build.BuildEngine {
|
||||
if (backticks)
|
||||
continue;
|
||||
|
||||
if(ch == '\'' && !inDoubleQuotes) {
|
||||
inSingleQuotes = !inSingleQuotes;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == '\"' && !inSingleQuotes) {
|
||||
inDoubleQuotes = !inDoubleQuotes;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch == '(') {
|
||||
++parens;
|
||||
continue;
|
||||
@@ -498,7 +510,7 @@ namespace Microsoft.Build.BuildEngine {
|
||||
if (parens != 0)
|
||||
continue;
|
||||
|
||||
if (ch == ',') {
|
||||
if (ch == ',' && !inDoubleQuotes && !inSingleQuotes) {
|
||||
args.Add (text.Substring (start, pos - start));
|
||||
start = pos + 1;
|
||||
continue;
|
||||
|
@@ -32,6 +32,7 @@ using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Globalization;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.Build.BuildEngine
|
||||
@@ -123,6 +124,14 @@ namespace Microsoft.Build.BuildEngine
|
||||
return value;
|
||||
}
|
||||
|
||||
static string TrimFirstAndLast(string unTrimmed)
|
||||
{
|
||||
if (unTrimmed.Length > 1 && Array.IndexOf (ArgumentTrimChars, unTrimmed [0]) != -1 && Array.IndexOf (ArgumentTrimChars, unTrimmed [unTrimmed.Length - 1]) != -1) {
|
||||
return unTrimmed.Substring (1, unTrimmed.Length - 2);
|
||||
}
|
||||
return unTrimmed;
|
||||
}
|
||||
|
||||
void ExpandArguments (Project project, ExpressionOptions options)
|
||||
{
|
||||
for (int i = 0; i < Arguments.Count; ++i) {
|
||||
@@ -133,7 +142,7 @@ namespace Microsoft.Build.BuildEngine
|
||||
arg = Expression.ParseAs<string> (arg, ParseOptions.None,
|
||||
project, options);
|
||||
|
||||
arg = arg.Trim (ArgumentTrimChars);
|
||||
arg = TrimFirstAndLast (arg);
|
||||
}
|
||||
|
||||
Arguments [i] = arg;
|
||||
@@ -280,7 +289,10 @@ namespace Microsoft.Build.BuildEngine
|
||||
|
||||
public ITaskItem[] ConvertToITaskItemArray (Project project, ExpressionOptions options)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
var items = new ITaskItem[1];
|
||||
items[0] = new TaskItem (ConvertToString (project, options));
|
||||
|
||||
return items;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user