Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -35,5 +35,4 @@ BUILT_SOURCES = $(EXPR_PARSER).cs
include ../../build/library.make
XBUILD_FRAMEWORK_FOLDERS_PATH=xbuild-testing
include $(XBUILD_DIR)/xbuild_test.make

View File

@@ -34,9 +34,7 @@ using System.Collections.Generic;
namespace Microsoft.Build.Construction
{
[Serializable]
#if NET_4_5
public
#endif
abstract class ElementLocation
{
public abstract int Column { get; }

View File

@@ -114,15 +114,9 @@ namespace Microsoft.Build.Construction
writer.WriteAttributeString (attributeName, attributeValue);
}
#if NET_4_5
public ElementLocation Location { get; private set; }
public ElementLocation LabelLocation { get; private set; }
public ElementLocation ConditionLocation { get; private set; }
#else
internal ElementLocation Location { get; private set; }
internal ElementLocation LabelLocation { get; private set; }
internal ElementLocation ConditionLocation { get; private set; }
#endif
string GetFilePath (string baseURI)
{
return string.IsNullOrEmpty (baseURI) ? string.Empty : new Uri (baseURI).LocalPath;

View File

@@ -65,23 +65,11 @@ namespace Microsoft.Build.Construction
string keepDuplicates;
string keepMetadata;
string removeMetadata;
#if NET_4_5
public
#else
internal
#endif
string KeepDuplicates { get { return keepDuplicates ?? String.Empty; } set { keepDuplicates = value; } }
#if NET_4_5
public
#else
internal
#endif
string KeepMetadata { get { return keepMetadata ?? String.Empty; } set { keepMetadata = value; } }
#if NET_4_5
public
#else
internal
#endif
string RemoveMetadata { get { return removeMetadata ?? String.Empty; } set { removeMetadata = value; } }
public ProjectMetadataElement AddMetadata (string name, string unevaluatedValue)
@@ -142,18 +130,10 @@ namespace Microsoft.Build.Construction
AppendChild (metadata);
return metadata;
}
#if NET_4_5
public ElementLocation ExcludeLocation { get; private set; }
public ElementLocation IncludeLocation { get; private set; }
public ElementLocation KeepDuplicatesLocation { get; private set; }
public ElementLocation RemoveLocation { get; private set; }
public ElementLocation RemoveMetadataLocation { get; private set; }
#else
ElementLocation ExcludeLocation { get; set; }
ElementLocation IncludeLocation { get; set; }
ElementLocation KeepDuplicatesLocation { get; set; }
ElementLocation RemoveLocation { get; set; }
ElementLocation RemoveMetadataLocation { get; set; }
#endif
}
}

View File

@@ -62,9 +62,7 @@ namespace Microsoft.Build.Construction
}
}
#if NET_4_5
public
#endif
ElementLocation ExecuteTargetsAttributeLocation { get; set; }
}
}

View File

@@ -57,13 +57,11 @@ namespace Microsoft.Build.Construction
get { return taskParameter ?? String.Empty; }
set { taskParameter = value; }
}
#if NET_4_5
ElementLocation taskParameterLocation;
public ElementLocation TaskParameterLocation {
get { return taskParameterLocation; }
set { taskParameterLocation = value; }
}
#endif
internal override string XmlName {
get { return "Output"; }
}

View File

@@ -112,7 +112,6 @@ namespace Microsoft.Build.Construction
get { return "Target"; }
}
#if NET_4_5
public ElementLocation AfterTargetsLocation { get; private set; }
public ElementLocation BeforeTargetsLocation { get; private set; }
public ElementLocation DependsOnTargetsLocation { get; private set; }
@@ -121,17 +120,6 @@ namespace Microsoft.Build.Construction
public ElementLocation NameLocation { get; private set; }
public ElementLocation OutputsLocation { get; private set; }
public ElementLocation ReturnsLocation { get; private set; }
#else
internal ElementLocation AfterTargetsLocation { get; set; }
internal ElementLocation BeforeTargetsLocation { get; set; }
internal ElementLocation DependsOnTargetsLocation { get; set; }
internal ElementLocation InputsLocation { get; set; }
internal ElementLocation KeepDuplicateOutputsLocation { get; set; }
internal ElementLocation LabelLocation { get; set; }
internal ElementLocation NameLocation { get; set; }
internal ElementLocation OutputsLocation { get; set; }
internal ElementLocation ReturnsLocation { get; set; }
#endif
internal override ProjectElement LoadChildElement (XmlReader reader)
{

View File

@@ -127,7 +127,6 @@ namespace Microsoft.Build.Construction
case "ContinueOnError":
ContinueOnError = value;
break;
#if NET_4_5
case "ExecuteTargets":
ExecuteTargets = value;
break;
@@ -137,7 +136,6 @@ namespace Microsoft.Build.Construction
case "MSBuildRuntime":
MSBuildRuntime = value;
break;
#endif
case "xmlns":
break;
case "Label":
@@ -162,13 +160,11 @@ namespace Microsoft.Build.Construction
private Dictionary<string, string> parameters = new Dictionary<string, string> ();
public string ExecuteTargets { get; set; }
#if NET_4_5
public ElementLocation ExecuteTargetsLocation { get; set; }
public ElementLocation ContinueOnErrorLocation { get; set; }
public string MSBuildArchitecture { get; set; }
public ElementLocation MSBuildArchitectureLocation { get; set; }
public string MSBuildRuntime { get; set; }
public ElementLocation MSBuildRuntimeLocation { get; set; }
#endif
}
}

View File

@@ -717,11 +717,7 @@ namespace Microsoft.Build.Evaluation
public bool SkipEvaluation { get; set; }
#if NET_4_5
public
#else
internal
#endif
IDictionary<string, ProjectTargetInstance> Targets {
get { return targets; }
}

View File

@@ -69,11 +69,7 @@ namespace Microsoft.Build.Evaluation
static ProjectCollection ()
{
#if NET_4_5
global_project_collection = new ProjectCollection (new ReadOnlyDictionary<string, string> (new Dictionary<string, string> ()));
#else
global_project_collection = new ProjectCollection (new Dictionary<string, string> ());
#endif
}
public static string Escape (string unescapedString)
@@ -251,20 +247,24 @@ namespace Microsoft.Build.Evaluation
//FIXME: should also support config file, depending on ToolsetLocations
void LoadDefaultToolsets ()
{
AddToolset (new Toolset ("4.0",
ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version40), this, null));
#if XBUILD_12
AddToolset (new Toolset ("12.0", ToolLocationHelper.GetPathToBuildTools ("12.0"), this, null));
#endif
#if XBUILD_14
AddToolset (new Toolset ("14.0", ToolLocationHelper.GetPathToBuildTools ("14.0"), this, null));
#endif
// We don't support these anymore
AddToolset (new Toolset ("2.0",
ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version20), this, null));
AddToolset (new Toolset ("3.0",
ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version30), this, null));
AddToolset (new Toolset ("3.5",
ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version35), this, null));
#if NET_4_0
AddToolset (new Toolset ("4.0",
ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version40), this, null));
#endif
#if XBUILD_12
AddToolset (new Toolset ("12.0", ToolLocationHelper.GetPathToBuildTools ("12.0"), this, null));
#endif
default_tools_version = toolsets.First ().ToolsVersion;
default_tools_version = toolsets [0].ToolsVersion;
}
[MonoTODO ("not verified at all")]

View File

@@ -4,9 +4,7 @@ using Microsoft.Build.Execution;
namespace Microsoft.Build.Evaluation
{
#if NET_4_5
public
#endif
class SubToolset
{
internal SubToolset (IDictionary<string, ProjectPropertyInstance> properties, string subToolsetVersion)

View File

@@ -48,9 +48,7 @@ namespace Microsoft.Build.Evaluation
{
}
#if NET_4_5
public
#endif
Toolset (string toolsVersion, string toolsPath, IDictionary<string, string> buildProperties,
ProjectCollection projectCollection, IDictionary<string, SubToolset> subToolsets,
string msbuildOverrideTasksPath)
@@ -61,15 +59,11 @@ namespace Microsoft.Build.Evaluation
buildProperties == null ?
new Dictionary<string, ProjectPropertyInstance> () :
buildProperties.Select (p => new ProjectPropertyInstance (p.Key, true, p.Value)).ToDictionary (e => e.Name);
#if NET_4_5
SubToolsets = subToolsets ?? new Dictionary<string, SubToolset> ();
#endif
}
#if NET_4_5
public string DefaultSubToolsetVersion { get; private set; }
public IDictionary<string, SubToolset> SubToolsets { get; private set; }
#endif
public IDictionary<string, ProjectPropertyInstance> Properties { get; private set; }

View File

@@ -99,9 +99,7 @@ namespace Microsoft.Build.Execution
IDictionary<string, string> global_properties;
string full_path, directory;
#if NET_4_5
ElementLocation location;
#endif
Dictionary<string, ProjectItemDefinitionInstance> item_definitions;
List<ResolvedImport> raw_imports; // maybe we don't need this...
@@ -146,9 +144,7 @@ namespace Microsoft.Build.Execution
void InitializeProperties (ProjectRootElement xml)
{
#if NET_4_5
location = xml.Location;
#endif
full_path = xml.FullPath;
directory = string.IsNullOrWhiteSpace (xml.DirectoryPath) ? System.IO.Directory.GetCurrentDirectory () : xml.DirectoryPath;
InitialTargets = xml.InitialTargets.Split (item_target_sep, StringSplitOptions.RemoveEmptyEntries).Select (s => s.Trim ()).ToList ();
@@ -334,11 +330,9 @@ namespace Microsoft.Build.Execution
public List<string> InitialTargets { get; private set; }
#if NET_4_5
public bool IsImmutable {
get { throw new NotImplementedException (); }
}
#endif
public IDictionary<string, ProjectItemDefinitionInstance> ItemDefinitions {
get { return item_definitions; }
@@ -352,21 +346,15 @@ namespace Microsoft.Build.Execution
get { return all_evaluated_items.Select (i => i.ItemType).Distinct ().ToArray (); }
}
#if NET_4_5
public ElementLocation ProjectFileLocation {
get { return location; }
}
#endif
public ICollection<ProjectPropertyInstance> Properties {
get { return properties.Values; }
}
#if NET_4_5
public
#else
internal
#endif
IDictionary<string, ProjectTargetInstance> Targets {
get { return targets; }
}
@@ -521,12 +509,10 @@ namespace Microsoft.Build.Execution
throw new NotImplementedException ();
}
#if NET_4_5
public void UpdateStateFrom (ProjectInstance projectState)
{
throw new NotImplementedException ();
}
#endif
// static members

View File

@@ -51,29 +51,17 @@ namespace Microsoft.Build.Execution
get { return condition; }
}
#if NET_4_5
public
#else
internal
#endif
override ElementLocation ConditionLocation {
get { return condition_location; }
}
#if NET_4_5
public
#else
internal
#endif
override ElementLocation Location {
get { return location; }
}
#if NET_4_5
public
#else
internal
#endif
ElementLocation ExecuteTargetsLocation { get; private set; }
public ICollection<ProjectItemGroupTaskItemInstance> Items { get; private set; }

View File

@@ -41,7 +41,6 @@ namespace Microsoft.Build.Execution
ItemType = xml.ItemType;
Metadata = xml.Metadata.Select (m => new ProjectItemGroupTaskMetadataInstance (m)).ToArray ();
Remove = xml.Remove;
#if NET_4_5
KeepDuplicates = xml.KeepDuplicates;
KeepMetadata = xml.KeepMetadata;
RemoveMetadata = xml.RemoveMetadata;
@@ -53,7 +52,6 @@ namespace Microsoft.Build.Execution
KeepDuplicatesLocation = xml.KeepDuplicatesLocation;
RemoveLocation = xml.RemoveLocation;
RemoveMetadataLocation = xml.RemoveMetadataLocation;
#endif
}
public string Condition { get; private set; }
@@ -73,7 +71,6 @@ namespace Microsoft.Build.Execution
public string Remove { get; private set; }
public string RemoveMetadata { get; private set; }
#if NET_4_5
public ElementLocation ConditionLocation { get; private set; }
public ElementLocation ExcludeLocation { get; private set; }
@@ -89,7 +86,6 @@ namespace Microsoft.Build.Execution
public ElementLocation RemoveLocation { get; private set; }
public ElementLocation RemoveMetadataLocation { get; private set; }
#endif
}
}

View File

@@ -38,21 +38,17 @@ namespace Microsoft.Build.Execution
Condition = xml.Condition;
Name = xml.Name;
Value = xml.Value;
#if NET_4_5
ConditionLocation = xml.ConditionLocation;
Location = xml.Location;
#endif
}
public string Condition { get; private set; }
public string Name { get; private set; }
public string Value { get; private set; }
#if NET_4_5
public ElementLocation ConditionLocation { get; private set; }
public ElementLocation Location { get; private set; }
#endif
}
}

View File

@@ -36,11 +36,9 @@ namespace Microsoft.Build.Execution
condition = xml.Condition;
ExecuteTargets = xml.ExecuteTargetsAttribute;
//this.FullPath = fullPath;
#if NET_4_5
condition_location = xml.ConditionLocation;
ExecuteTargetsLocation = xml.ExecuteTargetsAttributeLocation;
location = xml.Location;
#endif
}
readonly string condition;
@@ -53,27 +51,15 @@ namespace Microsoft.Build.Execution
readonly ElementLocation condition_location, location;
#if NET_4_5
public
#else
internal
#endif
override ElementLocation ConditionLocation {
get { return condition_location; }
}
#if NET_4_5
public
#else
internal
#endif
ElementLocation ExecuteTargetsLocation { get; private set; }
#if NET_4_5
public
#else
internal
#endif
override ElementLocation Location {
get { return location; }
}

View File

@@ -51,29 +51,17 @@ namespace Microsoft.Build.Execution
get { return condition; }
}
#if NET_4_5
public
#else
internal
#endif
override ElementLocation ConditionLocation {
get { return condition_location; }
}
#if NET_4_5
public
#else
internal
#endif
override ElementLocation Location {
get { return location; }
}
#if NET_4_5
public
#else
internal
#endif
ElementLocation ExecuteTargetsLocation { get; private set; }
public ICollection<ProjectPropertyGroupTaskPropertyInstance> Properties { get; private set; }

View File

@@ -39,10 +39,8 @@ namespace Microsoft.Build.Execution
Condition = xml.Condition;
Name = xml.Name;
Value = xml.Value;
#if NET_4_5
ConditionLocation = xml.ConditionLocation;
Location = xml.Location;
#endif
}
public string Condition { get; private set; }
@@ -51,11 +49,9 @@ namespace Microsoft.Build.Execution
public string Value { get; private set; }
#if NET_4_5
public ElementLocation ConditionLocation { get; private set; }
public ElementLocation Location { get; private set; }
#endif
}
}

View File

@@ -35,9 +35,7 @@ using System.Linq;
namespace Microsoft.Build.Execution
{
#if NET_4_5
public
#endif
sealed class ProjectTargetInstance
{
internal ProjectTargetInstance (ProjectTargetElement xml)
@@ -64,7 +62,6 @@ namespace Microsoft.Build.Execution
Outputs = xml.Outputs;
Returns = xml.Returns;
Tasks = xml.Tasks.Select (t => new ProjectTaskInstance (t)).ToArray ();
#if NET_4_5
AfterTargetsLocation = xml.AfterTargetsLocation;
BeforeTargetsLocation = xml.BeforeTargetsLocation;
ConditionLocation = xml.ConditionLocation;
@@ -74,7 +71,6 @@ namespace Microsoft.Build.Execution
Location = xml.Location;
OutputsLocation = xml.OutputsLocation;
ReturnsLocation = xml.ReturnsLocation;
#endif
}
public ElementLocation AfterTargetsLocation { get; private set; }

Some files were not shown because too many files have changed in this diff Show More