зеркало из https://github.com/dotnet/msbuild.git
Remove trailing whitespace
Find and replace `\s+$` in `{*.cs,*.props,*.targets}`, then reverted `src/Build.OM.UnitTests/Construction/WhiteSpacePreservation_Tests.cs` since it was explicitly working with whitespace.
This commit is contained in:
Родитель
31c4d33532
Коммит
9a0cef6f75
|
@ -1,12 +1,12 @@
|
|||
<Project>
|
||||
<Target Name="CopyAMD64Symbols" Condition="'$(OfficialBuild)' == 'true' AND '$(ArcadeBuildFromSource)' != 'true'" BeforeTargets="Build">
|
||||
<Copy
|
||||
<Copy
|
||||
SourceFiles="$(ArtifactsBinDir)MSBuild\x64\Release\net472\MSBuild.pdb"
|
||||
DestinationFolder="$(ArtifactsSymStoreDirectory)\MSBuild\net472\amd64"
|
||||
/>
|
||||
<Copy
|
||||
<Copy
|
||||
SourceFiles="$(ArtifactsBinDir)MSBuildTaskHost\x64\Release\net35\MSBuildTaskHost.pdb"
|
||||
DestinationFolder="$(ArtifactsSymStoreDirectory)\MSBuildTaskHost\net35\amd64"
|
||||
/>
|
||||
</Target>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace Microsoft.Build.Engine.OM.UnitTests.Construction
|
|||
// Note that there are two spaces after the <ItemGroup> tag on the second line
|
||||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project DefaultTargets=`Build` ToolsVersion=`msbuilddefaulttoolsversion` xmlns=`msbuildnamespace`>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include=`..\CLREXE\CLREXE.vcxproj`>
|
||||
<Project>{3699f81b-2d03-46c5-abd7-e88a4c946f28}</Project>
|
||||
</ProjectReference>
|
||||
|
|
|
@ -56,8 +56,8 @@ namespace Microsoft.Build.UnitTests.Construction
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Test that a project with the C++ project guid and an arbitrary extension is seen as valid --
|
||||
/// we assume that all C++ projects except .vcproj are MSBuild format.
|
||||
/// Test that a project with the C++ project guid and an arbitrary extension is seen as valid --
|
||||
/// we assume that all C++ projects except .vcproj are MSBuild format.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ParseSolution_VC2()
|
||||
|
@ -238,7 +238,7 @@ namespace Microsoft.Build.UnitTests.Construction
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Test to parse a very basic .sln file to validate that description property in a solution file
|
||||
/// Test to parse a very basic .sln file to validate that description property in a solution file
|
||||
/// is properly handled.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -496,8 +496,8 @@ namespace Microsoft.Build.UnitTests.Construction
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests situation where there's a nonexistent project listed in the solution folders. We should
|
||||
/// error with a useful message.
|
||||
/// Tests situation where there's a nonexistent project listed in the solution folders. We should
|
||||
/// error with a useful message.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void MissingNestedProject()
|
||||
|
@ -840,7 +840,7 @@ namespace Microsoft.Build.UnitTests.Construction
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Make sure the project configurations in solution configurations get parsed correctly
|
||||
/// Make sure the project configurations in solution configurations get parsed correctly
|
||||
/// for a simple mixed C#/VC solution
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -938,7 +938,7 @@ namespace Microsoft.Build.UnitTests.Construction
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make sure the project configurations in solution configurations get parsed correctly
|
||||
/// Make sure the project configurations in solution configurations get parsed correctly
|
||||
/// for a more tricky solution
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
|
|
@ -456,7 +456,7 @@ ObjectModelHelpers.CleanupFileContents(
|
|||
|
||||
/// <summary>
|
||||
/// Built-in metadata is prohibited in item definition conditions.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExpandBuiltInMetadataAtPointOfUse_BuiltInProhibitedOnItemDefinitionMetadataCondition()
|
||||
|
@ -478,7 +478,7 @@ ObjectModelHelpers.CleanupFileContents(
|
|||
}
|
||||
/// <summary>
|
||||
/// Built-in metadata is prohibited in item definition conditions.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExpandBuiltInMetadataAtPointOfUse_UnquotedBuiltInProhibitedOnItemDefinitionMetadataCondition()
|
||||
|
@ -500,7 +500,7 @@ ObjectModelHelpers.CleanupFileContents(
|
|||
}
|
||||
/// <summary>
|
||||
/// Built-in metadata is prohibited in item definition conditions.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExpandBuiltInMetadataAtPointOfUse_BuiltInProhibitedOnItemDefinitionCondition()
|
||||
|
@ -522,7 +522,7 @@ ObjectModelHelpers.CleanupFileContents(
|
|||
}
|
||||
/// <summary>
|
||||
/// Built-in metadata is prohibited in item definition conditions.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExpandBuiltInMetadataAtPointOfUse_BuiltInProhibitedOnItemDefinitionGroupCondition()
|
||||
|
@ -544,7 +544,7 @@ ObjectModelHelpers.CleanupFileContents(
|
|||
}
|
||||
/// <summary>
|
||||
/// Built-in metadata is prohibited in item definition conditions.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExpandBuiltInMetadataAtPointOfUse_QualifiedBuiltInProhibitedOnItemDefinitionMetadataCondition()
|
||||
|
@ -566,7 +566,7 @@ ObjectModelHelpers.CleanupFileContents(
|
|||
}
|
||||
/// <summary>
|
||||
/// Built-in metadata is prohibited in item definition conditions.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExpandBuiltInMetadataAtPointOfUse_QualifiedBuiltInProhibitedOnItemDefinitionCondition()
|
||||
|
@ -588,7 +588,7 @@ ObjectModelHelpers.CleanupFileContents(
|
|||
}
|
||||
/// <summary>
|
||||
/// Built-in metadata is prohibited in item definition conditions.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExpandBuiltInMetadataAtPointOfUse_QualifiedBuiltInProhibitedOnItemDefinitionGroupCondition()
|
||||
|
@ -610,7 +610,7 @@ ObjectModelHelpers.CleanupFileContents(
|
|||
}
|
||||
/// <summary>
|
||||
/// Built-in metadata is prohibited in item definition conditions.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// Ideally it would also be late evaluated, but that's too difficult.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExpandBuiltInMetadataAtPointOfUse_UnquotedQualifiedBuiltInProhibitedOnItemDefinitionCondition()
|
||||
|
|
|
@ -120,22 +120,22 @@ namespace Microsoft.Build.UnitTests.OM.ObjectModelRemoting
|
|||
<When Condition=""'$(Configuration)'=='Foo'"">
|
||||
<PropertyGroup>
|
||||
<p>vFoo</p>
|
||||
</PropertyGroup>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition='false'>
|
||||
<PropertyGroup>
|
||||
<p>vFalse</p>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition='true'>
|
||||
<PropertyGroup>
|
||||
<p>vTrue</p>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<p>vOtherwise</p>
|
||||
</PropertyGroup>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace Microsoft.Build.UnitTests.OM.ObjectModelRemoting
|
|||
/// <summary>
|
||||
/// The C# does not really provide a easy way to efficiently implement inheritance in cases like this
|
||||
/// for abstract classes or interface, when there is a hierarchy, it is not way to share the implementation.
|
||||
/// Like if one have IFoo and IBar : IFoo (or as we do abstractFoo, abstractBar:abstractFoo)
|
||||
/// Like if one have IFoo and IBar : IFoo (or as we do abstractFoo, abstractBar:abstractFoo)
|
||||
/// we can provide implementation for IFoo, but we can not use that for implementations for IBar.
|
||||
/// Since no multiple inheritance or other suitable mechanism for code share across classes is supported by C#,
|
||||
/// Instead IBar implementation should fully implement both IFoo and IBar interfaces.
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace Microsoft.Build.UnitTests.OM.ObjectModelRemoting
|
|||
|
||||
// all bellow are very inefficient,
|
||||
// in reality we do cache these collections until invalidated and use lazy access for dictionaries.
|
||||
// TODO: Might bring that infrastructure here as well ...
|
||||
// TODO: Might bring that infrastructure here as well ...
|
||||
public IDictionary<string, string> GlobalProperties => this.Source.GlobalProperties;
|
||||
public ICollection<string> ItemTypes => this.Source.ItemTypes;
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ namespace Microsoft.Build.UnitTests.OM.ObjectModelRemoting
|
|||
For the ExternalProjectsProvider mock infrastructure we'll try to use very similar model as in the actual implementation in VS.
|
||||
|
||||
Typical flow for "linked object" of type "Foo"
|
||||
[ --- Client Collection ] [ Server collection (can be different process) ]
|
||||
[ --- Client Collection ] [ Server collection (can be different process) ]
|
||||
(Foo) localView <=> (FooLink) link <=> FooLinkRemoter (Proxy) <=~connection mechanism~=> FooLinkRemoter(stub) <=> (Real object)
|
||||
|
||||
|
||||
FooLinkRemoter would be whatever ExternalProviders see useful to provide FooLink implementation and is compatable with connection mechanism
|
||||
it might be completely different interface since some link types would be either inefficient or impossible to serialize for example and pass cross process.
|
||||
|
||||
|
||||
Here we can cheat a little bit, since we run both Client and Server collection in the same process so we can ignore connection mechanism (typically some
|
||||
form of serialization/deserialization) and just give the "client" link implementation the same Remoter object we create on the "server"
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
/// <summary>
|
||||
/// Make sure we get an internal error when we call the initialize factory on the public method.
|
||||
/// This is done because we cannot properly initialize the task factory using the public interface and keep
|
||||
/// This is done because we cannot properly initialize the task factory using the public interface and keep
|
||||
/// backwards compatibility with orcas and whidbey.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -111,7 +111,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
/// <summary>
|
||||
/// Make sure we get an internal error when we call the ITaskFactory2 version of initialize factory.
|
||||
/// This is done because we cannot properly initialize the task factory using the public interface and keep
|
||||
/// This is done because we cannot properly initialize the task factory using the public interface and keep
|
||||
/// backwards compatibility with orcas and whidbey.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -166,8 +166,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Make sure that when an explicitly matching identity is specified (e.g. the identity is non-empty),
|
||||
/// it still counts as correct.
|
||||
/// Make sure that when an explicitly matching identity is specified (e.g. the identity is non-empty),
|
||||
/// it still counts as correct.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void CreatableByTaskFactoryMatchingIdentity()
|
||||
|
@ -186,7 +186,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify that if the task identity parameters don't match the factory identity, TaskNameCreatableByFactory
|
||||
/// Verify that if the task identity parameters don't match the factory identity, TaskNameCreatableByFactory
|
||||
/// returns false.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -263,7 +263,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that does not use the task host can be created when passed "don't care"
|
||||
/// Verify a good task that does not use the task host can be created when passed "don't care"
|
||||
/// for the task invocation task host parameters.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -294,8 +294,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that does not use the task host can be created when passed task host
|
||||
/// parameters that explicitly match the current process.
|
||||
/// Verify a good task that does not use the task host can be created when passed task host
|
||||
/// parameters that explicitly match the current process.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VerifyMatchingTaskParametersDontLaunchTaskHost2()
|
||||
|
@ -325,7 +325,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that does not use the task host can be created when passed "don't care"
|
||||
/// Verify a good task that does not use the task host can be created when passed "don't care"
|
||||
/// for the task invocation task host parameters.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -358,8 +358,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that does not use the task host can be created when passed task host
|
||||
/// parameters that explicitly match the current process.
|
||||
/// Verify a good task that does not use the task host can be created when passed task host
|
||||
/// parameters that explicitly match the current process.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VerifyMatchingUsingTaskParametersDontLaunchTaskHost2()
|
||||
|
@ -391,8 +391,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that uses the task host can be created when passed task host
|
||||
/// parameters that explicitly do not match the current process.
|
||||
/// Verify a good task that uses the task host can be created when passed task host
|
||||
/// parameters that explicitly do not match the current process.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VerifyMatchingParametersDontLaunchTaskHost()
|
||||
|
@ -426,8 +426,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that uses the task host can be created when passed task host
|
||||
/// parameters that explicitly do not match the current process.
|
||||
/// Verify a good task that uses the task host can be created when passed task host
|
||||
/// parameters that explicitly do not match the current process.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VerifyNonmatchingUsingTaskParametersLaunchTaskHost()
|
||||
|
@ -459,8 +459,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that uses the task host can be created when passed task host
|
||||
/// parameters that explicitly do not match the current process.
|
||||
/// Verify a good task that uses the task host can be created when passed task host
|
||||
/// parameters that explicitly do not match the current process.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VerifyNonmatchingTaskParametersLaunchTaskHost()
|
||||
|
@ -490,8 +490,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that uses the task host can be created when passed task host
|
||||
/// parameters that explicitly do not match the current process.
|
||||
/// Verify a good task that uses the task host can be created when passed task host
|
||||
/// parameters that explicitly do not match the current process.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VerifyNonmatchingParametersLaunchTaskHost()
|
||||
|
@ -525,8 +525,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that uses the task host can be created when the task factory is
|
||||
/// explicitly instructed to launch the task host.
|
||||
/// Verify a good task that uses the task host can be created when the task factory is
|
||||
/// explicitly instructed to launch the task host.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VerifyExplicitlyLaunchTaskHost()
|
||||
|
@ -554,8 +554,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that uses the task host can be created when the task factory is
|
||||
/// explicitly instructed to launch the task host.
|
||||
/// Verify a good task that uses the task host can be created when the task factory is
|
||||
/// explicitly instructed to launch the task host.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VerifyExplicitlyLaunchTaskHostEvenIfParametersMatch1()
|
||||
|
@ -587,8 +587,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that uses the task host can be created when the task factory is
|
||||
/// explicitly instructed to launch the task host.
|
||||
/// Verify a good task that uses the task host can be created when the task factory is
|
||||
/// explicitly instructed to launch the task host.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VerifyExplicitlyLaunchTaskHostEvenIfParametersMatch2()
|
||||
|
@ -620,8 +620,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify a good task that uses the task host can be created when the task factory is
|
||||
/// explicitly instructed to launch the task host.
|
||||
/// Verify a good task that uses the task host can be created when the task factory is
|
||||
/// explicitly instructed to launch the task host.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VerifySameFactoryCanGenerateDifferentTaskInstances()
|
||||
|
@ -677,7 +677,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Abstract out the creation of the new AssemblyTaskFactory with default task, and
|
||||
/// Abstract out the creation of the new AssemblyTaskFactory with default task, and
|
||||
/// with some basic validation.
|
||||
/// </summary>
|
||||
private void SetupTaskFactory(IDictionary<string, string> factoryParameters, bool explicitlyLaunchTaskHost)
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace Microsoft.Build.UnitTests.Logging
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Verify consume properly packages up the message event into a packet and send it to the
|
||||
/// Verify consume properly packages up the message event into a packet and send it to the
|
||||
/// transport delegate
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -145,7 +145,7 @@ namespace Microsoft.Build.UnitTests.Logging
|
|||
|
||||
/// <summary>
|
||||
/// Create a method which will be a fake method to process a packet.
|
||||
/// This needs to be done because using an anonymous method does not work.
|
||||
/// This needs to be done because using an anonymous method does not work.
|
||||
/// Using an anonymous method does not work because when the delegate is created
|
||||
/// it seems that a field is created which creates a strong reference
|
||||
/// between the delegate and the class it was created in. This means the delegate is not
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace Microsoft.Build.UnitTests.Logging
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify the correct exception is thrown when the logger is initialized with a null
|
||||
/// Verify the correct exception is thrown when the logger is initialized with a null
|
||||
/// event source.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -59,7 +59,7 @@ namespace Microsoft.Build.UnitTests.Logging
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Verify the correct exception is thrown when the logger is initialized with a null
|
||||
/// Verify the correct exception is thrown when the logger is initialized with a null
|
||||
/// event source.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -123,7 +123,7 @@ namespace Microsoft.Build.UnitTests.Logging
|
|||
|
||||
/// <summary>
|
||||
/// Create a new forwarding logger, event redirector, and event source.
|
||||
/// The returned event source can then have and event raised on it and it can
|
||||
/// The returned event source can then have and event raised on it and it can
|
||||
/// check to see if the event raised matches the one we were expecting.
|
||||
/// </summary>
|
||||
/// <param name="buildEventToCheck">A build event we are expecting to be forwarded by the forwarding logger</param>
|
||||
|
@ -139,8 +139,8 @@ namespace Microsoft.Build.UnitTests.Logging
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// An event redirector which takes in an expected event
|
||||
/// and when the forwarding logger forwards and event
|
||||
/// An event redirector which takes in an expected event
|
||||
/// and when the forwarding logger forwards and event
|
||||
/// we check to see if the events match. This allows
|
||||
/// us to check to see if the forwarding logger is
|
||||
/// sending us the events we send in.
|
||||
|
@ -150,8 +150,8 @@ namespace Microsoft.Build.UnitTests.Logging
|
|||
#region Data
|
||||
|
||||
/// <summary>
|
||||
/// Event we expect to see in the ForwardEvent method.
|
||||
/// This helps us verify that a logger is correctly forwarding
|
||||
/// Event we expect to see in the ForwardEvent method.
|
||||
/// This helps us verify that a logger is correctly forwarding
|
||||
/// an event.
|
||||
/// </summary>
|
||||
private BuildEventArgs _expectedEvent;
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Microsoft.Build.UnitTests.Logging
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Verify the correct exception is thrown when the logger is initialized with a null
|
||||
/// Verify the correct exception is thrown when the logger is initialized with a null
|
||||
/// event source.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<p1>v1</p1>
|
||||
<p2>v2</p2>
|
||||
</PropertyGroup>
|
||||
|
@ -179,7 +179,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<PropertyGroup Condition='false'>
|
||||
<PropertyGroup Condition='false'>
|
||||
<p1>v1</p1>
|
||||
<p2>v2</p2>
|
||||
</PropertyGroup>
|
||||
|
@ -194,7 +194,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<PropertyGroup Condition='true'>
|
||||
<PropertyGroup Condition='true'>
|
||||
<p1>v1</p1>
|
||||
<p2>v2</p2>
|
||||
</PropertyGroup>
|
||||
|
@ -230,7 +230,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'/>
|
||||
<i2 Include='b1'/>
|
||||
</ItemGroup>
|
||||
|
@ -274,7 +274,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a1' KeepDuplicates='' />
|
||||
</ItemGroup>
|
||||
|
@ -294,7 +294,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a1' KeepDuplicates='false' />
|
||||
</ItemGroup>
|
||||
|
@ -314,7 +314,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a1' KeepDuplicates="" '$(Keep)' == 'true' "" />
|
||||
</ItemGroup>
|
||||
|
@ -334,9 +334,9 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a1' KeepDuplicates='false' />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
@ -355,9 +355,9 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a1'/>
|
||||
<i2 Include='@(i1)' KeepDuplicates='false' />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
@ -379,8 +379,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
</i1>
|
||||
<i1 Include='a2' KeepDuplicates='false' />
|
||||
|
@ -404,8 +404,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
</i1>
|
||||
<i2 Include='@(i1)' KeepMetadata='' />
|
||||
|
@ -426,8 +426,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
<m2>m2</m2>
|
||||
<m3>m3</m3>
|
||||
|
@ -453,8 +453,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
<m2>m2</m2>
|
||||
<m3>m3</m3>
|
||||
|
@ -479,8 +479,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
<m2>m2</m2>
|
||||
<m3>m3</m3>
|
||||
|
@ -505,8 +505,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
<m2>m2</m2>
|
||||
<m3>m3</m3>
|
||||
|
@ -534,8 +534,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
</i1>
|
||||
<i2 Include='@(i1)' RemoveMetadata='' />
|
||||
|
@ -556,8 +556,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
<m2>m2</m2>
|
||||
<m3>m3</m3>
|
||||
|
@ -582,8 +582,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
<m2>m2</m2>
|
||||
<m3>m3</m3>
|
||||
|
@ -608,8 +608,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
<m2>m2</m2>
|
||||
<m3>m3</m3>
|
||||
|
@ -639,8 +639,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m1>m1</m1>
|
||||
<m2>m2</m2>
|
||||
<m3>m3</m3>
|
||||
|
@ -663,7 +663,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='$(xxx)'/>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
@ -709,7 +709,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include=' $(p0) '/>
|
||||
<i2 Include='b1'/>
|
||||
</ItemGroup>
|
||||
|
@ -782,7 +782,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a.cpp'/>
|
||||
<i2 Include=""@(i1->'%(filename).obj')""/>
|
||||
</ItemGroup>
|
||||
|
@ -804,7 +804,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a.cpp'/>
|
||||
<i2 Include='@(i1)'>
|
||||
<m>@(i1->'%(filename).obj')</m>
|
||||
|
@ -827,7 +827,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'/>
|
||||
<i2 Include='a1;@(i1);b1;b2' Exclude='@(i1);b1'/>
|
||||
</ItemGroup>
|
||||
|
@ -849,7 +849,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m>a1</m>
|
||||
</i1>
|
||||
|
@ -876,7 +876,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup Condition='false'>
|
||||
<ItemGroup Condition='false'>
|
||||
<i1 Include='a1'/>
|
||||
<i2 Include='b1'/>
|
||||
</ItemGroup>
|
||||
|
@ -891,7 +891,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup Condition='true'>
|
||||
<ItemGroup Condition='true'>
|
||||
<i1 Include='a1'/>
|
||||
<i2 Include='b1'/>
|
||||
</ItemGroup>
|
||||
|
@ -932,7 +932,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<p1>$(p0)</p1>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
@ -955,7 +955,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='$(p0)'/>
|
||||
<i2 Include='a2'/>
|
||||
</ItemGroup>
|
||||
|
@ -978,7 +978,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m>m1</m>
|
||||
</i1>
|
||||
|
@ -1011,7 +1011,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<m>m1</m>
|
||||
</i1>
|
||||
|
@ -1070,7 +1070,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='b1'>
|
||||
<m>%(i0.m)</m>
|
||||
</i1>
|
||||
|
@ -1103,7 +1103,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<p1>v1</p1>
|
||||
<p2>#$(p1)#</p2>
|
||||
<p1>v2</p1>
|
||||
|
@ -1155,7 +1155,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<p1 Condition=""'%(i0.n)' != n3"">%(i0.n)</p1>
|
||||
</PropertyGroup>
|
||||
</Target></Project>");
|
||||
|
@ -1199,7 +1199,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<PropertyGroup>
|
||||
<p0>v0</p0>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include='$(p0)'/>
|
||||
</ItemGroup>
|
||||
<Message Text='[@(i1)]'/>
|
||||
|
@ -1306,7 +1306,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t2' DependsOnTargets='t'>
|
||||
<Message Text='[$(p)]'/>
|
||||
<Message Text='[$(p)]'/>
|
||||
</Target>
|
||||
<Target Name='t'>
|
||||
<PropertyGroup>
|
||||
|
@ -1346,7 +1346,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t2' DependsOnTargets='t'>
|
||||
<Message Text='[@(i)]'/>
|
||||
<Message Text='[@(i)]'/>
|
||||
</Target>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
|
@ -1369,13 +1369,13 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<ItemGroup>
|
||||
<i Include='1.in'><output>1.out</output></i>
|
||||
<i Include='2.in'><output>2.out</output></i>
|
||||
</ItemGroup>
|
||||
</ItemGroup>
|
||||
<Target Name='t' Inputs='%(i.Identity)' Outputs='%(i.output)'>
|
||||
<Message Text='start:[@(i)]'/>
|
||||
<ItemGroup>
|
||||
<j Include='%(i.identity)'/>
|
||||
</ItemGroup>
|
||||
<Message Text='end:[@(j)]'/>
|
||||
<Message Text='end:[@(j)]'/>
|
||||
</Target>
|
||||
</Project>
|
||||
"))));
|
||||
|
@ -1556,7 +1556,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Include=''/>
|
||||
</ItemGroup>
|
||||
</Target></Project>");
|
||||
|
@ -1570,7 +1570,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1 Remove='a1'/>
|
||||
</ItemGroup>
|
||||
</Target></Project>");
|
||||
|
@ -1588,7 +1588,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Remove='a1'/>
|
||||
</ItemGroup>
|
||||
</Target></Project>");
|
||||
|
@ -1613,7 +1613,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<!-- just to cause two target batches -->
|
||||
<i Include='1.in'><output>1.out</output></i>
|
||||
<i Include='2.in'><output>2.out</output></i>
|
||||
</ItemGroup>
|
||||
</ItemGroup>
|
||||
<Target Name='t' Inputs='%(i.Identity)' Outputs='%(i.output)'>
|
||||
<ItemGroup>
|
||||
<j Include='a' Condition=""'%(i.Identity)'=='1.in'""/>
|
||||
|
@ -1650,7 +1650,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i0 Include='a.cpp;b.cpp'/>
|
||||
<i1 Include='a.obj;b.obj'/>
|
||||
<i1 Include='a.obj;b.obj'/>
|
||||
<i1 Remove=""@(i0->'%(filename).obj')""/>
|
||||
</ItemGroup>
|
||||
</Target></Project>");
|
||||
|
@ -1668,8 +1668,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a2'/>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a2'/>
|
||||
<i1 Remove='a1;a2'/>
|
||||
</ItemGroup>
|
||||
</Target></Project>");
|
||||
|
@ -1687,8 +1687,8 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a2'/>
|
||||
<i1 Include='a1'/>
|
||||
<i1 Include='a2'/>
|
||||
<i1 Remove='@(i1)'/>
|
||||
</ItemGroup>
|
||||
</Target></Project>");
|
||||
|
@ -2204,7 +2204,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- squint and pretend i0 is 'CppCompile' and 'm' is 'ObjectFile' -->
|
||||
<Link Include=""A_PCH""/>
|
||||
<Link Include=""@(i0->'%(m).obj')"" Condition=""'%(i0.m)' == 'm1'""/>
|
||||
|
@ -2336,13 +2336,13 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<ItemGroup>
|
||||
<i0 Include='a1'>
|
||||
<m>m1</m>
|
||||
</i0>
|
||||
</i0>
|
||||
</ItemGroup>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i0 Include='a1'>
|
||||
<m>m2</m>
|
||||
</i0>
|
||||
</i0>
|
||||
<i0 Remove='a1'/>
|
||||
</ItemGroup>
|
||||
<Message Text='[%(i0.m)]'/>
|
||||
|
@ -2409,13 +2409,13 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<ItemGroup>
|
||||
<i0 Include='a1'>
|
||||
<m>m1</m>
|
||||
</i0>
|
||||
</i0>
|
||||
</ItemGroup>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i0 Include='a1'>
|
||||
<m>m2</m>
|
||||
</i0>
|
||||
</i0>
|
||||
<i0 Remove='a1' Condition=""'%(i0.m)' == 'm1'""/>
|
||||
</ItemGroup>
|
||||
<Message Text='[%(i0.m)]'/>
|
||||
|
@ -2497,13 +2497,13 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<ItemGroup>
|
||||
<i Include='1.in'><output>1.out</output></i>
|
||||
<i Include='2.in'><output>2.out</output></i>
|
||||
</ItemGroup>
|
||||
</ItemGroup>
|
||||
<Target Name='t' Inputs='%(i.Identity)' Outputs='%(i.output)'>
|
||||
<Message Text='start:[@(i)]'/>
|
||||
<ItemGroup>
|
||||
<i Remove='1.in;2.in'/>
|
||||
</ItemGroup>
|
||||
<Message Text='end:[@(i)]'/>
|
||||
<Message Text='end:[@(i)]'/>
|
||||
</Target>
|
||||
</Project>
|
||||
"))));
|
||||
|
@ -2522,13 +2522,13 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<i Include='1.in'><output>1.out</output></i>
|
||||
<i Include='2.in'><output>2.out</output></i>
|
||||
<j Include='j1'/>
|
||||
</ItemGroup>
|
||||
</ItemGroup>
|
||||
<Target Name='t' Inputs='%(i.Identity)' Outputs='%(i.output)'>
|
||||
<Message Text='start:[@(j)]'/>
|
||||
<ItemGroup>
|
||||
<j Remove='@(j)'/>
|
||||
</ItemGroup>
|
||||
<Message Text='end:[@(j)]'/>
|
||||
<Message Text='end:[@(j)]'/>
|
||||
</Target>
|
||||
</Project>
|
||||
"))));
|
||||
|
@ -2758,7 +2758,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
string content = ObjectModelHelpers.CleanupFileContents(
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<ItemGroup>
|
||||
<i1/>
|
||||
</ItemGroup>
|
||||
</Target></Project>");
|
||||
|
@ -2776,7 +2776,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<i1 Include='a1'>
|
||||
<m>m1</m>
|
||||
</i1>
|
||||
<i1>
|
||||
|
@ -2831,7 +2831,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<i1 Include='a1'>
|
||||
<m>m1</m>
|
||||
</i1>
|
||||
<i1>
|
||||
|
@ -2880,10 +2880,10 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<i1 Include='a1'>
|
||||
<m>m1</m>
|
||||
</i1>
|
||||
<i1 Include='a2'>
|
||||
<i1 Include='a2'>
|
||||
<m>m2</m>
|
||||
</i1>
|
||||
<i1 Condition=""'%(i1.m)'=='m2'"">
|
||||
|
@ -2910,10 +2910,10 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<i1 Include='a1'>
|
||||
<m>m1</m>
|
||||
</i1>
|
||||
<i1 Include='a2'>
|
||||
<i1 Include='a2'>
|
||||
<m>m2</m>
|
||||
</i1>
|
||||
<i1>
|
||||
|
@ -2959,10 +2959,10 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<i1 Include='a1'>
|
||||
<m>m1</m>
|
||||
</i1>
|
||||
<i1 Include='a2'>
|
||||
<i1 Include='a2'>
|
||||
<m>m2</m>
|
||||
</i1>
|
||||
<i1 Condition=""'%(m)'=='m2'"">
|
||||
|
@ -2990,10 +2990,10 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<i1 Include='a1'>
|
||||
<i1 Include='a1'>
|
||||
<m>m1</m>
|
||||
</i1>
|
||||
<i1 Include='a2'>
|
||||
<i1 Include='a2'>
|
||||
<m>m2</m>
|
||||
</i1>
|
||||
<i1>
|
||||
|
@ -3119,7 +3119,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<ItemGroup>
|
||||
<i0>
|
||||
<m>m1</m>
|
||||
</i0>
|
||||
</i0>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
<Target Name='t2'>
|
||||
|
@ -3163,7 +3163,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
</i1>
|
||||
<i1>
|
||||
<n>n1</n>
|
||||
</i1>
|
||||
</i1>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
<Target Name='t2'>
|
||||
|
@ -3391,7 +3391,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<!-- just to cause two target batches -->
|
||||
<i Include='1.in'><output>1.out</output></i>
|
||||
<i Include='2.in'><output>2.out</output></i>
|
||||
</ItemGroup>
|
||||
</ItemGroup>
|
||||
<Target Name='t' Inputs='%(i.Identity)' Outputs='%(i.output)'>
|
||||
<Message Text='start:[$(p)]'/>
|
||||
<CreateProperty Value='$(p)--%(i.Identity)'>
|
||||
|
@ -3448,7 +3448,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<ObjectFile>def.obj</ObjectFile>
|
||||
</CppCompile>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Target Name='t'>
|
||||
<ItemGroup>
|
||||
<CppCompile>
|
||||
|
@ -3524,7 +3524,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
</x>
|
||||
<x>
|
||||
<m1>2</m1>
|
||||
</x>
|
||||
</x>
|
||||
</ItemGroup>
|
||||
<Message Text='[%(x.m1)]'/>
|
||||
</Target>
|
||||
|
@ -3554,7 +3554,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<ItemGroup>
|
||||
<x>
|
||||
<m1>2</m1>
|
||||
</x>
|
||||
</x>
|
||||
</ItemGroup>
|
||||
<Message Text='[%(x.m1)]'/>
|
||||
</Target>
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
// Start a target
|
||||
Lookup.Scope enteredScope = lookup.EnterScope("x");
|
||||
|
||||
// We see the one item
|
||||
// We see the one item
|
||||
Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude);
|
||||
Assert.Single(lookup.GetItems("i1"));
|
||||
|
||||
|
@ -163,7 +163,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
ProjectItemInstance[] newItems = new ProjectItemInstance[]
|
||||
{
|
||||
new ProjectItemInstance(project, "i1", "a1", project.FullPath), // Should not get added
|
||||
new ProjectItemInstance(project, "i1", "a2", project.FullPath), // Should get added
|
||||
new ProjectItemInstance(project, "i1", "a2", project.FullPath), // Should get added
|
||||
};
|
||||
|
||||
// Perform the addition
|
||||
|
@ -213,9 +213,9 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
ProjectItemInstance[] newItems = new ProjectItemInstance[]
|
||||
{
|
||||
new ProjectItemInstance(project, "i1", "a1", project.FullPath), // Should get added
|
||||
new ProjectItemInstance(project, "i1", "a2", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should get added
|
||||
new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should not get added
|
||||
new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m3") }, project.FullPath), // Should get added
|
||||
new ProjectItemInstance(project, "i1", "a2", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should get added
|
||||
new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m1") }, project.FullPath), // Should not get added
|
||||
new ProjectItemInstance(project, "i1", "a1", new KeyValuePair<string, string>[] { new KeyValuePair<string, string>( "m1", "m3") }, project.FullPath), // Should get added
|
||||
};
|
||||
|
||||
// Perform the addition
|
||||
|
@ -822,7 +822,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>();
|
||||
Lookup lookup = LookupHelpers.CreateLookup(table1);
|
||||
|
||||
// Add an item with m=m1 and n=n1
|
||||
// Add an item with m=m1 and n=n1
|
||||
ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath);
|
||||
item1.SetMetadata("m", "m1");
|
||||
lookup.PopulateWithItem(item1);
|
||||
|
@ -863,7 +863,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>();
|
||||
Lookup lookup = LookupHelpers.CreateLookup(table1);
|
||||
|
||||
// Add an item with m=m1 and n=n1
|
||||
// Add an item with m=m1 and n=n1
|
||||
ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath);
|
||||
item1.SetMetadata("m", "m1");
|
||||
lookup.PopulateWithItem(item1);
|
||||
|
@ -929,7 +929,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
Assert.Equal("n2", foundGroup.First().GetMetadataValue("n"));
|
||||
Assert.Equal("o1", foundGroup.First().GetMetadataValue("o"));
|
||||
|
||||
// Make a modification to the item to be n=n3
|
||||
// Make a modification to the item to be n=n3
|
||||
newMetadata = new Lookup.MetadataModifications(keepOnlySpecified: false);
|
||||
newMetadata.Add("n", "n3");
|
||||
lookup.ModifyItems("i1", group, newMetadata);
|
||||
|
@ -1026,7 +1026,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>();
|
||||
Lookup lookup = LookupHelpers.CreateLookup(table1);
|
||||
|
||||
// Add an item with m=m1 and n=n1
|
||||
// Add an item with m=m1 and n=n1
|
||||
ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath);
|
||||
item1.SetMetadata("m", "m1");
|
||||
lookup.PopulateWithItem(item1);
|
||||
|
@ -1074,7 +1074,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
public void ModifyItemInProjectPreviouslyModifiedAndGottenThroughGetItem()
|
||||
{
|
||||
ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
|
||||
// Create some project state with an item with m=m1 and n=n1
|
||||
// Create some project state with an item with m=m1 and n=n1
|
||||
ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>();
|
||||
ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath);
|
||||
item1.SetMetadata("m", "m1");
|
||||
|
@ -1130,7 +1130,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>();
|
||||
Lookup lookup = LookupHelpers.CreateLookup(table1);
|
||||
|
||||
// Add an item with m=m1 and n=n1
|
||||
// Add an item with m=m1 and n=n1
|
||||
ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath);
|
||||
item1.SetMetadata("m", "m1");
|
||||
lookup.PopulateWithItem(item1);
|
||||
|
@ -1164,7 +1164,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
public void RemoveItemFromProjectPreviouslyModifiedAndGottenThroughGetItem()
|
||||
{
|
||||
ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
|
||||
// Create some project state with an item with m=m1 and n=n1
|
||||
// Create some project state with an item with m=m1 and n=n1
|
||||
ItemDictionary<ProjectItemInstance> table1 = new ItemDictionary<ProjectItemInstance>();
|
||||
ProjectItemInstance item1 = new ProjectItemInstance(project, "i1", "a2", project.FullPath);
|
||||
item1.SetMetadata("m", "m1");
|
||||
|
@ -1257,7 +1257,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
|
||||
Lookup.Scope enteredScope2 = lookup.EnterScope("x");
|
||||
|
||||
// Change the value again in the new scope
|
||||
// Change the value again in the new scope
|
||||
lookup.SetProperty(ProjectPropertyInstance.Create("p1", "v3"));
|
||||
|
||||
// Lookup is updated, but not the original item group
|
||||
|
@ -1266,7 +1266,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
|
||||
Lookup.Scope enteredScope3 = lookup.EnterScope("x");
|
||||
|
||||
// Change the value again in the new scope
|
||||
// Change the value again in the new scope
|
||||
lookup.SetProperty(ProjectPropertyInstance.Create("p1", "v4"));
|
||||
|
||||
Assert.Equal("v4", lookup.GetProperty("p1").EvaluatedValue);
|
||||
|
|
|
@ -171,7 +171,7 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensures that it is possible to call the MSBuild task with an empty Projects parameter, and it
|
||||
/// Ensures that it is possible to call the MSBuild task with an empty Projects parameter, and it
|
||||
/// shouldn't error, and it shouldn't try to build itself.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -481,7 +481,7 @@ namespace Microsoft.Build.UnitTests
|
|||
// -------------------------------------------------------
|
||||
// TeamBuild.proj
|
||||
// -------------------------------------------------------
|
||||
// Attempts to build the above ConsoleApplication1.csproj by calling the MSBuild task,
|
||||
// Attempts to build the above ConsoleApplication1.csproj by calling the MSBuild task,
|
||||
// and overriding the OutDir property. However, the value being passed into OutDir
|
||||
// is coming from another property which is produced by CreateProperty and has
|
||||
// some special characters in it.
|
||||
|
@ -490,16 +490,16 @@ namespace Microsoft.Build.UnitTests
|
|||
<Project ToolsVersion=`msbuilddefaulttoolsversion` xmlns=`msbuildnamespace`>
|
||||
|
||||
<Target Name=`Build`>
|
||||
|
||||
|
||||
<CreateProperty Value=`$(MSBuildProjectDirectory)\binaries\`>
|
||||
<Output PropertyName=`MasterOutDir` TaskParameter=`Value`/>
|
||||
</CreateProperty>
|
||||
|
||||
|
||||
<MSBuild Projects=`ConsoleApplication1\ConsoleApplication1.csproj`
|
||||
Properties=`OutDir=$(MasterOutDir)`
|
||||
Targets=`Rebuild`/>
|
||||
</Target>
|
||||
|
||||
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
@ -521,7 +521,7 @@ namespace Microsoft.Build.UnitTests
|
|||
|
||||
<Target Name=`TargetA` Outputs=`a1.dll` Condition=`'$(MyProp)'=='0'`/>
|
||||
<Target Name=`TargetB` Outputs=`b1.dll` Condition=`'$(MyProp)'=='1'`/>
|
||||
|
||||
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
@ -590,7 +590,7 @@ namespace Microsoft.Build.UnitTests
|
|||
|
||||
<Target Name=`TargetA` Outputs=`a1.dll` Condition=`'$(MyProp)'=='0'`/>
|
||||
<Target Name=`TargetB` Outputs=`b1.dll` Condition=`'$(MyProp)'=='1'`/>
|
||||
|
||||
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
@ -665,7 +665,7 @@ namespace Microsoft.Build.UnitTests
|
|||
<UndefineProperties>g;h;</UndefineProperties>
|
||||
</PR>
|
||||
</ItemGroup>
|
||||
<Target Name='a'>
|
||||
<Target Name='a'>
|
||||
<MSBuild Projects='@(PR)' Properties='c=c;d=d;' RemoveProperties='i;c;' Targets='b'/>
|
||||
</Target>
|
||||
<Target Name='b'>
|
||||
|
@ -897,7 +897,7 @@ namespace Microsoft.Build.UnitTests
|
|||
|
||||
<Target Name=`TargetA` Outputs=`a1.dll` Condition=`'$(MyProp)'=='0'`/>
|
||||
<Target Name=`TargetB` Outputs=`b1.dll` Condition=`'$(MyProp)'=='1'`/>
|
||||
|
||||
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
@ -964,7 +964,7 @@ namespace Microsoft.Build.UnitTests
|
|||
|
||||
<Target Name=`TargetA` Outputs=`a1.dll` Condition=`'$(MyProp)'=='0'`/>
|
||||
<Target Name=`TargetB` Outputs=`b1.dll` Condition=`'$(MyProp)'=='1'`/>
|
||||
|
||||
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
@ -1019,7 +1019,7 @@ namespace Microsoft.Build.UnitTests
|
|||
|
||||
<Target Name=`TargetA` Outputs=`a1.dll` Condition=`'$(MyPropG)'=='1'`/>
|
||||
<Target Name=`TargetB` Outputs=`b1.dll` Condition=`'$(MyPropA)'=='1'`/>
|
||||
|
||||
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
@ -1086,7 +1086,7 @@ namespace Microsoft.Build.UnitTests
|
|||
|
||||
<Target Name=`TargetA` Outputs=`a1.dll` Condition=`'$(MyPropG)'=='0'`/>
|
||||
<Target Name=`TargetB` Outputs=`b1.dll` Condition=`'$(MyPropA)'=='1'`/>
|
||||
|
||||
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
@ -1155,7 +1155,7 @@ namespace Microsoft.Build.UnitTests
|
|||
|
||||
<Target Name=`TargetA` Outputs=`a1.dll` Condition=`'$(MyPropG)'=='1'`/>
|
||||
<Target Name=`TargetB` Outputs=`b1.dll` Condition=`'$(MyPropA)'=='1'`/>
|
||||
|
||||
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
@ -1232,7 +1232,7 @@ namespace Microsoft.Build.UnitTests
|
|||
<ItemGroup>
|
||||
<ProjectFile Include=`" + projectFile1 + @"` />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Target Name=`Build` Outputs=`$(SomeOutputs)`>
|
||||
<MSBuild Projects=`@(ProjectFile)` Targets=`$(Targets)` TargetAndPropertyListSeparators=`%3B;%3C` />
|
||||
</Target>
|
||||
|
@ -1297,14 +1297,14 @@ namespace Microsoft.Build.UnitTests
|
|||
new TaskItem(project1), new TaskItem(project2)
|
||||
};
|
||||
|
||||
// Test the various combinations of BuildInParallel and StopOnFirstFailure when the msbuild task is told there are not multiple nodes
|
||||
// Test the various combinations of BuildInParallel and StopOnFirstFailure when the msbuild task is told there are not multiple nodes
|
||||
// running in the system
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
bool buildInParallel = false;
|
||||
bool stopOnFirstFailure = false;
|
||||
|
||||
// first set up the project being built.
|
||||
// first set up the project being built.
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
|
@ -1345,7 +1345,7 @@ namespace Microsoft.Build.UnitTests
|
|||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
// Verify setting BuildInParallel and StopOnFirstFailure to
|
||||
// Verify setting BuildInParallel and StopOnFirstFailure to
|
||||
// true will cause the msbuild task to set BuildInParallel to false during the execute
|
||||
// Verify build did not build second project which has the message SecondProject
|
||||
logger.AssertLogDoesntContain("SecondProject");
|
||||
|
@ -1355,7 +1355,7 @@ namespace Microsoft.Build.UnitTests
|
|||
logger.AssertLogContains(AssemblyResources.GetString("MSBuild.NotBuildingInParallel"));
|
||||
break;
|
||||
case 1:
|
||||
// Verify setting BuildInParallel to true and StopOnFirstFailure to
|
||||
// Verify setting BuildInParallel to true and StopOnFirstFailure to
|
||||
// false will cause no change in BuildInParallel
|
||||
// Verify build did build second project which has the message SecondProject
|
||||
logger.AssertLogContains("SecondProject");
|
||||
|
@ -1374,7 +1374,7 @@ namespace Microsoft.Build.UnitTests
|
|||
break;
|
||||
|
||||
case 3:
|
||||
// Verify setting BuildInParallel to false and StopOnFirstFailure to
|
||||
// Verify setting BuildInParallel to false and StopOnFirstFailure to
|
||||
// false will cause no change in BuildInParallel
|
||||
// Verify build did build second project which has the message SecondProject
|
||||
logger.AssertLogContains("SecondProject");
|
||||
|
@ -1420,14 +1420,14 @@ namespace Microsoft.Build.UnitTests
|
|||
|
||||
try
|
||||
{
|
||||
// Test the various combinations of BuildInParallel and StopOnFirstFailure when the msbuild task is told there are multiple nodes
|
||||
// Test the various combinations of BuildInParallel and StopOnFirstFailure when the msbuild task is told there are multiple nodes
|
||||
// running in the system
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
bool buildInParallel = false;
|
||||
bool stopOnFirstFailure = false;
|
||||
|
||||
// first set up the project being built.
|
||||
// first set up the project being built.
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
|
@ -1477,7 +1477,7 @@ namespace Microsoft.Build.UnitTests
|
|||
logger.AssertLogDoesntContain(AssemblyResources.GetString("MSBuild.NotBuildingInParallel"));
|
||||
break;
|
||||
case 1:
|
||||
// Verify setting BuildInParallel to true and StopOnFirstFailure to
|
||||
// Verify setting BuildInParallel to true and StopOnFirstFailure to
|
||||
// false will cause no change in BuildInParallel
|
||||
// Verify build did build second project which has the message SecondProject
|
||||
logger.AssertLogContains("SecondProject");
|
||||
|
@ -1487,7 +1487,7 @@ namespace Microsoft.Build.UnitTests
|
|||
logger.AssertLogDoesntContain(AssemblyResources.GetString("MSBuild.NotBuildingInParallel"));
|
||||
break;
|
||||
case 2:
|
||||
// Verify setting BuildInParallel to false and StopOnFirstFailure to
|
||||
// Verify setting BuildInParallel to false and StopOnFirstFailure to
|
||||
// true will cause no change in BuildInParallel
|
||||
// Verify build did not build second project which has the message SecondProject
|
||||
logger.AssertLogDoesntContain("SecondProject");
|
||||
|
@ -1498,7 +1498,7 @@ namespace Microsoft.Build.UnitTests
|
|||
break;
|
||||
|
||||
case 3:
|
||||
// Verify setting BuildInParallel to false and StopOnFirstFailure to
|
||||
// Verify setting BuildInParallel to false and StopOnFirstFailure to
|
||||
// false will cause no change in BuildInParallel
|
||||
// Verify build did build second project which has the message SecondProject
|
||||
logger.AssertLogContains("SecondProject");
|
||||
|
@ -1772,12 +1772,12 @@ namespace Microsoft.Build.UnitTests
|
|||
<AdditionalProperties>C=$(CValues)%3BD=$(DValues)</AdditionalProperties>
|
||||
</ProjectFile>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Target Name=`Build` Outputs=`$(SomeOutputs)`>
|
||||
<MSBuild Projects=`@(ProjectFile)` Targets=`Build` Properties=`a=$(AValues)%3Bb=$(BValues)` TargetAndPropertyListSeparators=`%3B`>
|
||||
<Output TaskParameter=`TargetOutputs` PropertyName=`SomeOutputs`/>
|
||||
</MSBuild>
|
||||
</Target>
|
||||
</Target>
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
@ -1837,13 +1837,13 @@ namespace Microsoft.Build.UnitTests
|
|||
");
|
||||
|
||||
string projectFile2 = ObjectModelHelpers.CreateTempFileOnDisk(@"
|
||||
<Project DefaultTargets=`t` xmlns=`msbuildnamespace` ToolsVersion=`msbuilddefaulttoolsversion`>
|
||||
<Project DefaultTargets=`t` xmlns=`msbuildnamespace` ToolsVersion=`msbuilddefaulttoolsversion`>
|
||||
<Target Name=`t`>
|
||||
<MSBuild Projects=`" + projectFile1 + @"` Targets=`BUILD`>
|
||||
<Output TaskParameter=`TargetOutputs` ItemName=`out`/>
|
||||
</MSBuild>
|
||||
<Message Text=`[@(out)]`/>
|
||||
</Target>
|
||||
</Target>
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
@ -1873,13 +1873,13 @@ namespace Microsoft.Build.UnitTests
|
|||
");
|
||||
|
||||
string projectFile2 = ObjectModelHelpers.CreateTempFileOnDisk(@"
|
||||
<Project>
|
||||
<Project>
|
||||
<Target Name=`t`>
|
||||
<MSBuild Projects=`" + projectFile1 + @"` Targets=`Build`>
|
||||
<Output TaskParameter=`TargetOutputs` ItemName=`out`/>
|
||||
</MSBuild>
|
||||
<Message Text=`[@(out)]`/>
|
||||
</Target>
|
||||
</Target>
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft.Build.Engine.UnitTests.BackEnd
|
|||
{
|
||||
#if FEATURE_APPDOMAIN
|
||||
/// <summary>
|
||||
/// Test serialization / deserialization of the AppDomainSetup instance.
|
||||
/// Test serialization / deserialization of the AppDomainSetup instance.
|
||||
/// </summary>
|
||||
[Theory]
|
||||
[InlineData(new byte[] { 1, 2, 3 })]
|
||||
|
|
|
@ -17,7 +17,7 @@ using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
|
|||
namespace Microsoft.Build.UnitTests.BackEnd
|
||||
{
|
||||
/// <summary>
|
||||
/// Each packet is split up into a region, the region contains the tests for
|
||||
/// Each packet is split up into a region, the region contains the tests for
|
||||
/// a given packet type.
|
||||
/// </summary>
|
||||
public class NodePackets_Tests
|
||||
|
@ -326,7 +326,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
.RespectingRuntimeTypes()
|
||||
// Since we use struct DictionaryEntry of class TaskItemData, generated DictionaryEntry.Equals compare TaskItemData by references.
|
||||
// Bellow will instruct equivalency test to not use DictionaryEntry.Equals but its public members for equivalency tests.
|
||||
.ComparingByMembers<DictionaryEntry>()
|
||||
.ComparingByMembers<DictionaryEntry>()
|
||||
.WithTracing(), "Roundtrip deserialization of message type {0} should be equivalent", args.GetType().Name);
|
||||
}
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify the LoggingMessagePacket is properly created from a build event.
|
||||
/// Verify the LoggingMessagePacket is properly created from a build event.
|
||||
/// This includes the packet type and the event type depending on which build event arg is passed in.
|
||||
/// </summary>
|
||||
/// <param name="buildEvent">Build event to put into a packet, and verify after packet creation</param>
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='CleanUp'>
|
||||
<Message Text='CleanUp-was-called.'/>
|
||||
</Target>
|
||||
|
@ -89,9 +89,9 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
</root>");
|
||||
|
||||
Project project = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='Build'>
|
||||
|
||||
|
||||
<GenerateResource
|
||||
ExecuteAsTool='false'
|
||||
Sources='" + resx + @"'
|
||||
|
@ -99,11 +99,11 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
<Output TaskParameter='FilesWritten' ItemName='FilesWrittenItem'/>
|
||||
<Output TaskParameter='FilesWritten' PropertyName='FilesWrittenProperty'/>
|
||||
</GenerateResource>
|
||||
|
||||
|
||||
<OnError ExecuteTargets='ErrorTarget'/>
|
||||
</Target>
|
||||
|
||||
<Target Name='ErrorTarget'>
|
||||
<Target Name='ErrorTarget'>
|
||||
<Message Text='[@(fileswrittenitem)]'/>
|
||||
<Message Text='[$(fileswrittenproperty)]'/>
|
||||
</Target>
|
||||
|
@ -144,16 +144,16 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
|
||||
<Target Name='Build'>
|
||||
<!-- Create a bunch of items and properties -->
|
||||
<CreateItem Include='a1'>
|
||||
<Output ItemName='i1' TaskParameter='Include'/>
|
||||
</CreateItem>
|
||||
</CreateItem>
|
||||
<ItemGroup>
|
||||
<i1 Include='a2'/>
|
||||
</ItemGroup>
|
||||
</ItemGroup>
|
||||
<CreateProperty Value='v1'>
|
||||
<Output PropertyName='p1' TaskParameter='Value'/>
|
||||
</CreateProperty>
|
||||
|
@ -188,7 +188,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='CleanUp'>
|
||||
<Message Text='CleanUp-was-called.'/>
|
||||
</Target>
|
||||
|
@ -219,7 +219,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='CleanUp'>
|
||||
<Message Text='CleanUp-was-called.'/>
|
||||
</Target>
|
||||
|
@ -252,7 +252,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='CleanUp' DependsOnTargets='CleanUp2'>
|
||||
<Message Text='CleanUp-was-called.'/>
|
||||
</Target>
|
||||
|
@ -284,7 +284,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='CleanUp'>
|
||||
<Message Text='CleanUp-was-called.'/>
|
||||
</Target>
|
||||
|
@ -315,7 +315,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='Build'>
|
||||
<Error Text='This is an error.'/>
|
||||
<OnError ExecuteTargets='CleanUp'/>
|
||||
|
@ -339,7 +339,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='CleanUp'>
|
||||
<Message Text='CleanUp-was-called.'/>
|
||||
</Target>
|
||||
|
@ -366,7 +366,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='CleanUp'>
|
||||
<Message Text='CleanUp-was-called.'/>
|
||||
</Target>
|
||||
|
@ -394,7 +394,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<PropertyGroup>
|
||||
<Part1>Clean</Part1>
|
||||
<Part2>Up</Part2>
|
||||
|
@ -426,7 +426,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
MockLogger l = new MockLogger();
|
||||
Project p = new Project(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(@"
|
||||
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Project DefaultTargets='Build' ToolsVersion='msbuilddefaulttoolsversion' xmlns='msbuildnamespace'>
|
||||
<Target Name='CleanUp1'>
|
||||
<Message Text='CleanUp1-was-called.'/>
|
||||
<Error Text='Error in CleanUp1.'/>
|
||||
|
|
|
@ -166,7 +166,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// If a result had multiple targets associated with it and we only requested some of their
|
||||
/// If a result had multiple targets associated with it and we only requested some of their
|
||||
/// results, the returned result should only contain the targets we asked for, and the overall
|
||||
/// status of the result should reflect the targets we asked for as well.
|
||||
/// </summary>
|
||||
|
|
|
@ -131,7 +131,7 @@ namespace Microsoft.Build.Engine.UnitTests.BackEnd
|
|||
|
||||
[Fact]
|
||||
// Scenario: MockSdkResolverWithResolvableSdkPattern1 is a specific resolver, it is loaded but did not resolve sdk.
|
||||
// MockSdkResolver1 is a general resolver (i.e. resolver without pattern), it resolves sdk on a fallback.
|
||||
// MockSdkResolver1 is a general resolver (i.e. resolver without pattern), it resolves sdk on a fallback.
|
||||
public void AssertFirstResolverCanResolve()
|
||||
{
|
||||
SdkResolverService.Instance.InitializeForTests(new MockLoaderStrategy());
|
||||
|
|
|
@ -123,11 +123,11 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// Tests this case:
|
||||
///
|
||||
///
|
||||
/// <Target Name="x"
|
||||
/// Inputs="@(Items);c.cs"
|
||||
/// Outputs="@(Items->'%(Filename).dll')" />
|
||||
///
|
||||
///
|
||||
/// If Items = [a.cs;b.cs], and only b.cs is out of date w/r/t its
|
||||
/// correlated output b.dll, then we should only build "b" incrementally.
|
||||
/// </summary>
|
||||
|
@ -160,11 +160,11 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// Tests this case:
|
||||
///
|
||||
///
|
||||
/// <Target Name="x"
|
||||
/// Inputs="@(Items)"
|
||||
/// Outputs="@(Items->'%(Filename).dll');@(Items->'%(Filename).xml')" />
|
||||
///
|
||||
///
|
||||
/// If Items = [a.cs;b.cs;c.cs], and only b.cs is out of date w/r/t its
|
||||
/// correlated outputs (dll or xml), then we should only build "b" incrementally.
|
||||
/// </summary>
|
||||
|
@ -203,11 +203,11 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// Tests this case:
|
||||
///
|
||||
///
|
||||
/// <Target Name="x"
|
||||
/// Inputs="@(Items);@(MoreItems)"
|
||||
/// Outputs="@(Items->'%(Filename).dll');@(MoreItems->'%(Filename).xml')" />
|
||||
///
|
||||
///
|
||||
/// If Items = [a.cs;b.cs;c.cs], and only b.cs is out of date w/r/t its
|
||||
/// correlated outputs (dll or xml), then we should only build "b" incrementally.
|
||||
/// </summary>
|
||||
|
@ -443,24 +443,24 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
</Target>
|
||||
|
||||
<Target Name='Setup'>
|
||||
<WriteLinesToFile
|
||||
<WriteLinesToFile
|
||||
File='A'
|
||||
Lines='A'
|
||||
Overwrite='true'/>
|
||||
|
||||
<WriteLinesToFile
|
||||
|
||||
<WriteLinesToFile
|
||||
File='B.out'
|
||||
Lines='B.out'
|
||||
Overwrite='true'/>
|
||||
|
||||
<Exec Command='sleep.exe 1' />
|
||||
|
||||
<WriteLinesToFile
|
||||
<WriteLinesToFile
|
||||
File='B'
|
||||
Lines='B'
|
||||
Overwrite='true'/>
|
||||
|
||||
<WriteLinesToFile
|
||||
|
||||
<WriteLinesToFile
|
||||
File='A.out'
|
||||
Lines='A.out'
|
||||
Overwrite='true'/>
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
private bool _continueOnErrorDefault = true;
|
||||
|
||||
/// <summary>
|
||||
/// Test that an exception is thrown when the task name is null.
|
||||
/// Test that an exception is thrown when the task name is null.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ConstructorWithNullName()
|
||||
|
@ -67,7 +67,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Test that an exception is thrown when the task name is empty.
|
||||
/// Test that an exception is thrown when the task name is empty.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ConstructorWithEmptyName()
|
||||
|
@ -176,7 +176,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Test the valid constructors.
|
||||
/// Test the valid constructors.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestValidConstructors()
|
||||
|
@ -326,7 +326,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization / deserialization when the parameter dictionary is null.
|
||||
/// Test serialization / deserialization when the parameter dictionary is null.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestTranslationWithNullDictionary()
|
||||
|
@ -379,7 +379,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
|
||||
#if FEATURE_APPDOMAIN
|
||||
/// <summary>
|
||||
/// Test serialization / deserialization of the AppDomainSetup instance.
|
||||
/// Test serialization / deserialization of the AppDomainSetup instance.
|
||||
/// </summary>
|
||||
[Theory]
|
||||
[InlineData(new byte[] { 1, 2, 3 })]
|
||||
|
@ -429,7 +429,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization / deserialization when the parameter dictionary is empty.
|
||||
/// Test serialization / deserialization when the parameter dictionary is empty.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestTranslationWithEmptyDictionary()
|
||||
|
@ -477,7 +477,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization / deserialization when the parameter dictionary contains just value types.
|
||||
/// Test serialization / deserialization when the parameter dictionary contains just value types.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestTranslationWithValueTypesInDictionary()
|
||||
|
@ -527,7 +527,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization / deserialization when the parameter dictionary contains an ITaskItem.
|
||||
/// Test serialization / deserialization when the parameter dictionary contains an ITaskItem.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestTranslationWithITaskItemInDictionary()
|
||||
|
@ -575,7 +575,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization / deserialization when the parameter dictionary contains an ITaskItem array.
|
||||
/// Test serialization / deserialization when the parameter dictionary contains an ITaskItem array.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestTranslationWithITaskItemArrayInDictionary()
|
||||
|
@ -627,7 +627,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization / deserialization when the parameter dictionary contains an ITaskItem array.
|
||||
/// Test serialization / deserialization when the parameter dictionary contains an ITaskItem array.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestTranslationWithWarningsAsErrors()
|
||||
|
@ -723,7 +723,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper methods for testing the task host-related packets.
|
||||
/// Helper methods for testing the task host-related packets.
|
||||
/// </summary>
|
||||
internal static class TaskHostPacketHelpers
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
public class TaskHostTaskCancelled_Tests
|
||||
{
|
||||
/// <summary>
|
||||
/// Basic test of the constructor.
|
||||
/// Basic test of the constructor.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestConstructor()
|
||||
|
@ -24,7 +24,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Basic test of serialization / deserialization.
|
||||
/// Basic test of serialization / deserialization.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestTranslation()
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
public class TaskHostTaskComplete_Tests
|
||||
{
|
||||
/// <summary>
|
||||
/// Tests various valid ways to construct this packet.
|
||||
/// Tests various valid ways to construct this packet.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestConstructors()
|
||||
|
@ -90,7 +90,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test invalid constructor permutations.
|
||||
/// Test invalid constructor permutations.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestInvalidConstructors()
|
||||
|
@ -176,7 +176,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization / deserialization when the parameter dictionary contains an ITaskItem.
|
||||
/// Test serialization / deserialization when the parameter dictionary contains an ITaskItem.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestTranslationWithITaskItemInDictionary()
|
||||
|
@ -202,7 +202,7 @@ namespace Microsoft.Build.UnitTests.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test serialization / deserialization when the parameter dictionary contains an ITaskItem array.
|
||||
/// Test serialization / deserialization when the parameter dictionary contains an ITaskItem array.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestTranslationWithITaskItemArrayInDictionary()
|
||||
|
|
|
@ -422,7 +422,7 @@ namespace Microsoft.Build.UnitTests
|
|||
"Subcategory",
|
||||
"Code",
|
||||
"File",
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace Microsoft.Build.UnitTests.OM.Collections
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Null
|
||||
/// Null
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Null1()
|
||||
|
@ -66,7 +66,7 @@ namespace Microsoft.Build.UnitTests.OM.Collections
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Null
|
||||
/// Null
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Null2()
|
||||
|
@ -75,7 +75,7 @@ namespace Microsoft.Build.UnitTests.OM.Collections
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invalid start
|
||||
/// Invalid start
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void InvalidValue2()
|
||||
|
@ -86,7 +86,7 @@ namespace Microsoft.Build.UnitTests.OM.Collections
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Invalid small end
|
||||
/// Invalid small end
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void InvalidValue4()
|
||||
|
@ -97,7 +97,7 @@ namespace Microsoft.Build.UnitTests.OM.Collections
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// Invalid large end
|
||||
/// Invalid large end
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void InvalidValue5()
|
||||
|
@ -160,7 +160,7 @@ namespace Microsoft.Build.UnitTests.OM.Collections
|
|||
{
|
||||
Assert.True(0 == MSBuildNameIgnoreCaseComparer.Default.GetHashCode((string)null));
|
||||
|
||||
MSBuildNameIgnoreCaseComparer.Default.GetHashCode(""); // doesn't throw
|
||||
MSBuildNameIgnoreCaseComparer.Default.GetHashCode(""); // doesn't throw
|
||||
Assert.Equal(MSBuildNameIgnoreCaseComparer.Default.GetHashCode("aBc"), MSBuildNameIgnoreCaseComparer.Default.GetHashCode("AbC"));
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ bar", false)]
|
|||
var projectContents =
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' DefaultTargets='Build' xmlns='msbuildnamespace'>
|
||||
<!--Initial Comment-->
|
||||
|
||||
|
||||
<!--Ending Comment-->
|
||||
</Project>
|
||||
";
|
||||
|
@ -91,7 +91,7 @@ bar", false)]
|
|||
var projectContents =
|
||||
@"<Project ToolsVersion='msbuilddefaulttoolsversion' DefaultTargets='Build' xmlns='msbuildnamespace'>
|
||||
<!--Initial Comment-->
|
||||
|
||||
|
||||
<!--Ending Comment-->
|
||||
</Project>
|
||||
";
|
||||
|
|
|
@ -421,7 +421,7 @@ namespace Microsoft.Build.UnitTests.Construction
|
|||
string solutionFileContentsDev12Corrupted2 =
|
||||
@"
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
VisualStudioVersion =
|
||||
VisualStudioVersion =
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project('{FE3BBBB6-72D5-11D2-9ACE-00C04F79A2A4}') = 'someproj', 'someproj.etp', '{AD0F3D02-9925-4D57-9DAF-E0A9D936ABDB}'
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
|
@ -1050,20 +1050,20 @@ namespace Microsoft.Build.UnitTests.Construction
|
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
||||
|
||||
Release|Any CPU = Release|Any CPU
|
||||
|
||||
|
||||
|
||||
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
|
||||
{34E0D07D-CF8F-459D-9449-C4188D8C5564}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{34E0D07D-CF8F-459D-9449-C4188D8C5564}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
|
||||
|
||||
{34E0D07D-CF8F-459D-9449-C4188D8C5564}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{34E0D07D-CF8F-459D-9449-C4188D8C5564}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
|
||||
|
||||
|
||||
|
||||
{A5EE8128-B08E-4533-86C5-E46714981680}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A5EE8128-B08E-4533-86C5-E46714981680}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A5EE8128-B08E-4533-86C5-E46714981680}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -1072,17 +1072,17 @@ namespace Microsoft.Build.UnitTests.Construction
|
|||
{6DB98C35-FDCC-4818-B5D4-1F0A385FDFD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6DB98C35-FDCC-4818-B5D4-1F0A385FDFD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6DB98C35-FDCC-4818-B5D4-1F0A385FDFD4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
|
||||
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
|
||||
|
||||
{A5EE8128-B08E-4533-86C5-E46714981680} = {E0F97730-25D2-418A-A7BD-02CAFDC6E470}
|
||||
{2AE8D6C4-FB43-430C-8AEB-15E5EEDAAE4B} = {E0F97730-25D2-418A-A7BD-02CAFDC6E470}
|
||||
{6DB98C35-FDCC-4818-B5D4-1F0A385FDFD4} = {2AE8D6C4-FB43-430C-8AEB-15E5EEDAAE4B}
|
||||
|
||||
|
||||
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace Microsoft.Build.UnitTests.Definition
|
|||
|
||||
/// <summary>
|
||||
/// Get the item of type "i" using the item Xml fragment provided.
|
||||
/// If there is more than one, fail.
|
||||
/// If there is more than one, fail.
|
||||
/// </summary>
|
||||
private static ProjectItem GetOneItemFromFragment(string fragment)
|
||||
{
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace Microsoft.Build.UnitTests.Definition
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests if ToolsetConfigurationReaderTests is successfully initialized from the config file and that msbuildOVerrideTasksPath
|
||||
/// Tests if ToolsetConfigurationReaderTests is successfully initialized from the config file and that msbuildOVerrideTasksPath
|
||||
/// is correctly read in when the value is empty.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -194,7 +194,7 @@ namespace Microsoft.Build.UnitTests.Definition
|
|||
#region "Invalid cases (exception is expected to be thrown)"
|
||||
|
||||
/// <summary>
|
||||
/// name attribute is missing from toolset element
|
||||
/// name attribute is missing from toolset element
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ToolsVersionTest_NameNotSpecified()
|
||||
|
@ -250,7 +250,7 @@ namespace Microsoft.Build.UnitTests.Definition
|
|||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// empty toolset element
|
||||
/// empty toolset element
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ToolsVersionTest_EmptyElement()
|
||||
|
|
|
@ -188,8 +188,8 @@ namespace Microsoft.Build.UnitTests.Definition
|
|||
}
|
||||
else
|
||||
{
|
||||
// Otherwise, it's the highest one numerically. Since by definition if Dev10 isn't
|
||||
// installed and subtoolsets exists we must be at least Dev11, it should be "11.0"
|
||||
// Otherwise, it's the highest one numerically. Since by definition if Dev10 isn't
|
||||
// installed and subtoolsets exists we must be at least Dev11, it should be "11.0"
|
||||
Assert.Equal("11.0", t.DefaultSubToolsetVersion);
|
||||
}
|
||||
}
|
||||
|
@ -438,8 +438,8 @@ namespace Microsoft.Build.UnitTests.Definition
|
|||
Assert.Equal("12.0", t.GenerateSubToolsetVersion(null, 13));
|
||||
Assert.Equal("v13.0", t.GenerateSubToolsetVersion(null, 14));
|
||||
|
||||
// however, if there is no matching solution version, we just fall back to the
|
||||
// default sub-toolset.
|
||||
// however, if there is no matching solution version, we just fall back to the
|
||||
// default sub-toolset.
|
||||
Assert.Equal(t.DefaultSubToolsetVersion, t.GenerateSubToolsetVersion(null, 55));
|
||||
}
|
||||
finally
|
||||
|
@ -488,27 +488,27 @@ namespace Microsoft.Build.UnitTests.Definition
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a standard ProjectCollection and adds a fake toolset with the following contents to it:
|
||||
///
|
||||
/// Creates a standard ProjectCollection and adds a fake toolset with the following contents to it:
|
||||
///
|
||||
/// ToolsVersion = Fake
|
||||
/// Base Properties:
|
||||
/// Base Properties:
|
||||
/// a = a1
|
||||
/// b = b1
|
||||
///
|
||||
/// SubToolset "12.0":
|
||||
///
|
||||
/// SubToolset "12.0":
|
||||
/// d = d4
|
||||
/// e = e5
|
||||
///
|
||||
/// SubToolset "v11.0":
|
||||
///
|
||||
/// SubToolset "v11.0":
|
||||
/// b = b2
|
||||
/// c = c2
|
||||
///
|
||||
///
|
||||
/// SubToolset "FakeSubToolset":
|
||||
/// a = a3
|
||||
/// c = c3
|
||||
///
|
||||
///
|
||||
/// SubToolset "v13.0":
|
||||
/// f = f6
|
||||
/// f = f6
|
||||
/// g = g7
|
||||
/// </summary>
|
||||
private Toolset GetFakeToolset(IDictionary<string, string> globalPropertiesForProjectCollection)
|
||||
|
|
|
@ -1134,14 +1134,14 @@ namespace Microsoft.Build.UnitTests.Evaluation
|
|||
/// <summary>
|
||||
/// Looks through the parameters of the batchable object, and finds all references to item metadata
|
||||
/// (that aren't part of an item transform). Returns a Hashtable containing a bunch of MetadataReference
|
||||
/// structs. Each reference to item metadata may or may not be qualified with an item name (e.g.,
|
||||
/// structs. Each reference to item metadata may or may not be qualified with an item name (e.g.,
|
||||
/// %(Culture) vs. %(EmbeddedResource.Culture).
|
||||
/// </summary>
|
||||
/// <returns>Hashtable containing the metadata references.</returns>
|
||||
private static Dictionary<string, MetadataReference> GetConsumedMetadataReferences_OriginalImplementation(string expression)
|
||||
{
|
||||
// The keys in the hash table are the qualified metadata names (e.g. "EmbeddedResource.Culture"
|
||||
// or just "Culture"). The values are MetadataReference structs, which simply split out the item
|
||||
// or just "Culture"). The values are MetadataReference structs, which simply split out the item
|
||||
// name (possibly null) and the actual metadata name.
|
||||
Dictionary<string, MetadataReference> consumedMetadataReferences = new Dictionary<string, MetadataReference>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
|
@ -1153,7 +1153,7 @@ namespace Microsoft.Build.UnitTests.Evaluation
|
|||
/// <summary>
|
||||
/// Looks through a single parameter of the batchable object, and finds all references to item metadata
|
||||
/// (that aren't part of an item transform). Populates a Hashtable containing a bunch of MetadataReference
|
||||
/// structs. Each reference to item metadata may or may not be qualified with an item name (e.g.,
|
||||
/// structs. Each reference to item metadata may or may not be qualified with an item name (e.g.,
|
||||
/// %(Culture) vs. %(EmbeddedResource.Culture).
|
||||
/// </summary>
|
||||
/// <param name="batchableObjectParameter"></param>
|
||||
|
@ -1241,7 +1241,7 @@ namespace Microsoft.Build.UnitTests.Evaluation
|
|||
/// <summary>
|
||||
/// Looks through a single parameter of the batchable object, and finds all references to item metadata
|
||||
/// (that aren't part of an item transform). Populates a MatchCollection object with any regex matches
|
||||
/// found in the input. Each reference to item metadata may or may not be qualified with an item name (e.g.,
|
||||
/// found in the input. Each reference to item metadata may or may not be qualified with an item name (e.g.,
|
||||
/// %(Culture) vs. %(EmbeddedResource.Culture).
|
||||
/// </summary>
|
||||
/// <param name="batchableObjectParameter"></param>
|
||||
|
|
|
@ -1211,7 +1211,7 @@ namespace Microsoft.Build.UnitTests.Preprocessor
|
|||
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that the Preprocessor works when the import graph contains unevaluated duplicates. This can occur if two projects in
|
||||
/// Verifies that the Preprocessor works when the import graph contains unevaluated duplicates. This can occur if two projects in
|
||||
/// two different folders both import "..\dir.props" or "$(Property)". Those values will evaluate to different paths at run time
|
||||
/// but the preprocessor builds a map of the imports.
|
||||
/// </summary>
|
||||
|
|
|
@ -273,7 +273,7 @@ namespace Microsoft.Build.UnitTests.OM.Evaluation
|
|||
|
||||
string return2 = cache.Add(builder.ToString(), document);
|
||||
|
||||
// Content of string should be the same.
|
||||
// Content of string should be the same.
|
||||
Assert.Equal(builder.ToString(), return2);
|
||||
|
||||
// Returned references should be the same
|
||||
|
@ -285,7 +285,7 @@ namespace Microsoft.Build.UnitTests.OM.Evaluation
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a string equivalent to an existing instance but under a different document
|
||||
/// Adding a string equivalent to an existing instance but under a different document
|
||||
/// should return the existing instance.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
|
@ -334,7 +334,7 @@ namespace Microsoft.Build.UnitTests.OM.Evaluation
|
|||
/// WHITEBOX ASSUMPTION:
|
||||
/// The following method assumes knowledge of the ProjectStringCache internal implementation
|
||||
/// details, and may become invalid if those details change.
|
||||
/// </remarks>
|
||||
/// </remarks>
|
||||
[Fact]
|
||||
public void RemoveLastInstanceDeallocatesEntry()
|
||||
{
|
||||
|
@ -370,7 +370,7 @@ namespace Microsoft.Build.UnitTests.OM.Evaluation
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removing one document containing a string which already existed in the collection
|
||||
/// Removing one document containing a string which already existed in the collection
|
||||
/// should still leave a reference in the collection, so that a subsequent add will
|
||||
/// return the existing reference.
|
||||
/// </summary>
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace Microsoft.Build.UnitTests.Evaluation
|
|||
}
|
||||
|
||||
[Fact]
|
||||
// With ToolsetDefintionLocations set to ConfigurationFile (Which would only happen in net5.0 if the user decides to set it).
|
||||
// With ToolsetDefintionLocations set to ConfigurationFile (Which would only happen in net5.0 if the user decides to set it).
|
||||
// Most toolsets are available and the MsBuildTools and SDK paths are all in the net5.0 runtime.
|
||||
public void ToolsetDefinitionLocationsIsConfiguration()
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace Microsoft.Build.Graph.UnitTests
|
|||
</Target>
|
||||
|
||||
<Target Name='CallTarget'>
|
||||
<CallTarget Targets='SelfTarget'/>
|
||||
<CallTarget Targets='SelfTarget'/>
|
||||
</Target>
|
||||
|
||||
<Target Name='SelfTarget'>
|
||||
|
|
|
@ -408,7 +408,7 @@ namespace Microsoft.Build.Graph.UnitTests
|
|||
/// This method runs in two modes.
|
||||
/// When <param name="generateCacheFiles"></param> is true, the method will fill in the empty <param name="outputCaches"/> and <param name="expectedNodeBuildOutput"/>, simulating a build from scratch.
|
||||
/// When it is false, it uses the filled in <param name="outputCaches"/> and <param name="expectedNodeBuildOutput"/> to simulate a fully cached build.
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="env">The test environment under which to run.</param>
|
||||
/// <param name="topoSortedNodes"></param>
|
||||
|
@ -533,7 +533,7 @@ namespace Microsoft.Build.Graph.UnitTests
|
|||
? $"Targets='{explicitTargets}'"
|
||||
: string.Empty)}
|
||||
>
|
||||
<Output TaskParameter='TargetOutputs' ItemName='i' />
|
||||
<Output TaskParameter='TargetOutputs' ItemName='i' />
|
||||
</MSBuild>
|
||||
</Target>");
|
||||
|
||||
|
|
|
@ -143,8 +143,8 @@ namespace Microsoft.Build.UnitTests.OM.Instance
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make sure we get the default affinity when the affinity map exists, but the specific
|
||||
/// project we're requesting is not set.
|
||||
/// Make sure we get the default affinity when the affinity map exists, but the specific
|
||||
/// project we're requesting is not set.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestDefaultAffinityWhenProjectNotRegistered()
|
||||
|
|
|
@ -235,7 +235,7 @@ namespace Microsoft.Build.UnitTests.OM.Instance
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flushing an item through a task should not mess up special characters on the metadata.
|
||||
/// Flushing an item through a task should not mess up special characters on the metadata.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Escaping1()
|
||||
|
@ -287,7 +287,7 @@ namespace Microsoft.Build.UnitTests.OM.Instance
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flushing an item through a task run in the task host also should not mess up special characters on the metadata.
|
||||
/// Flushing an item through a task run in the task host also should not mess up special characters on the metadata.
|
||||
/// </summary>
|
||||
#if RUNTIME_TYPE_NETCORE || MONO
|
||||
[Fact(Skip = "FEATURE: TASKHOST")]
|
||||
|
@ -344,7 +344,7 @@ namespace Microsoft.Build.UnitTests.OM.Instance
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flushing an item through a task run in the task host also should not mess up the escaping of the itemspec either.
|
||||
/// Flushing an item through a task run in the task host also should not mess up the escaping of the itemspec either.
|
||||
/// </summary>
|
||||
#if RUNTIME_TYPE_NETCORE || MONO
|
||||
[Fact(Skip = "FEATURE: TASKHOST")]
|
||||
|
|
|
@ -582,7 +582,7 @@ namespace Microsoft.Build.UnitTests
|
|||
var metadatam = projectItem.GetMetadata("m");
|
||||
if (context)
|
||||
{
|
||||
// Go to when
|
||||
// Go to when
|
||||
Assert.Equal("m1", metadatam.EvaluatedValue);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1547,7 +1547,7 @@ namespace Microsoft.Build.Engine.UnitTests.ProjectCache
|
|||
// This test ensures that scheduling proxy builds on the inproc node works nicely within the Scheduler
|
||||
// if the BuildRequestConfigurations for those proxy builds have built before (or are still building) on
|
||||
// the out of proc node.
|
||||
// More details: https://github.com/dotnet/msbuild/pull/6635
|
||||
// More details: https://github.com/dotnet/msbuild/pull/6635
|
||||
public void ProxyCacheHitsOnPreviousCacheMissesShouldWork()
|
||||
{
|
||||
var cacheNotApplicableTarget = "NATarget";
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
|
|
|
@ -69,8 +69,8 @@ namespace Microsoft.Build.UnitTests
|
|||
#region 32bit preferred
|
||||
|
||||
/// <summary>
|
||||
/// Check that with an empty platformtarget (equivalent to anycpu), library type assemblies do not
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// Check that with an empty platformtarget (equivalent to anycpu), library type assemblies do not
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AnyCPULibraryProjectIsNot32BitPreferred()
|
||||
|
@ -118,8 +118,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check that with an explicit platform of anycpu, library type assemblies do not
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// Check that with an explicit platform of anycpu, library type assemblies do not
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExplicitAnyCPULibraryProjectIsNot32BitPreferred()
|
||||
|
@ -168,8 +168,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check that with an empty platformtarget (equivalent to anycpu), winmdobj type assemblies do not
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// Check that with an empty platformtarget (equivalent to anycpu), winmdobj type assemblies do not
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AnyCPUWinMDObjProjectIsNot32BitPreferred()
|
||||
|
@ -223,8 +223,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check that with an explicit platformtarget of anycpu, winmdobj type assemblies do not
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// Check that with an explicit platformtarget of anycpu, winmdobj type assemblies do not
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExplicitAnyCPUWinMDObjProjectIsNot32BitPreferred()
|
||||
|
@ -279,8 +279,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check that with an empty platformtarget (equivalent to anycpu), exe type assemblies
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// Check that with an empty platformtarget (equivalent to anycpu), exe type assemblies
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AnyCPUExeProjectIs32BitPreferred()
|
||||
|
@ -328,8 +328,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check that with an explicit platformtarget of anycpu, exe type assemblies
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// Check that with an explicit platformtarget of anycpu, exe type assemblies
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExplicitAnyCPUExeProjectIs32BitPreferred()
|
||||
|
@ -378,8 +378,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check that with an empty platformtarget (equivalent to anycpu), exe type assemblies
|
||||
/// that are targeting .NET 4.0 do not get forced to anycpu32bitpreferred by default.
|
||||
/// Check that with an empty platformtarget (equivalent to anycpu), exe type assemblies
|
||||
/// that are targeting .NET 4.0 do not get forced to anycpu32bitpreferred by default.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AnyCPU40ExeProjectIsNot32BitPreferred()
|
||||
|
@ -427,8 +427,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check that with an explicit platformtarget of anycpu, exe type assemblies that are
|
||||
/// targeting .NET 4.0+ do not get forced to anycpu32bitpreferred by default.
|
||||
/// Check that with an explicit platformtarget of anycpu, exe type assemblies that are
|
||||
/// targeting .NET 4.0+ do not get forced to anycpu32bitpreferred by default.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExplicitAnyCPUExeProjectIsNot32BitPreferred()
|
||||
|
@ -477,8 +477,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check that with an empty platformtarget (equivalent to anycpu), appcontainerexe type assemblies
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// Check that with an empty platformtarget (equivalent to anycpu), appcontainerexe type assemblies
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AnyCPUAppContainerExeProjectIs32BitPreferred()
|
||||
|
@ -532,8 +532,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check that with an explicit platformtarget of anycpu, appcontainerexe type assemblies
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// Check that with an explicit platformtarget of anycpu, appcontainerexe type assemblies
|
||||
/// get forced to anycpu32bitpreferred by default.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExplicitAnyCPUAppContainerExeProjectIs32BitPreferred()
|
||||
|
@ -588,8 +588,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Although AnyCPU library projects should not default to AnyCPU32BitPreferred, because that platform is
|
||||
/// not supported for library projects, if Prefer32Bit is explicitly set, we should still respect that.
|
||||
/// Although AnyCPU library projects should not default to AnyCPU32BitPreferred, because that platform is
|
||||
/// not supported for library projects, if Prefer32Bit is explicitly set, we should still respect that.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AnyCPULibraryProjectIs32BitPreferredIfPrefer32BitSet()
|
||||
|
@ -639,8 +639,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// A project with no explicit OutputType will end up defaulting its OutputType to exe,
|
||||
/// so it should also default to Prefer32Bit = true.
|
||||
/// A project with no explicit OutputType will end up defaulting its OutputType to exe,
|
||||
/// so it should also default to Prefer32Bit = true.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AnyCPUProjectWithNoExplicitOutputTypeIs32BitPreferred()
|
||||
|
@ -688,8 +688,8 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// A project with no explicit OutputType will end up defaulting its OutputType to exe,
|
||||
/// so it should also default to Prefer32Bit = true.
|
||||
/// A project with no explicit OutputType will end up defaulting its OutputType to exe,
|
||||
/// so it should also default to Prefer32Bit = true.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void AnyCPUJupiterProjectWithNoExplicitOutputTypeIs32BitPreferred()
|
||||
|
@ -740,7 +740,7 @@ namespace Microsoft.Build.UnitTests
|
|||
#endregion 32bit preferred
|
||||
|
||||
/// <summary>
|
||||
/// Validate that the GetFrameworkPaths target
|
||||
/// Validate that the GetFrameworkPaths target
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestGetFrameworkPaths()
|
||||
|
@ -774,7 +774,7 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate that the GetFrameworkPaths target
|
||||
/// Validate that the GetFrameworkPaths target
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestTargetFrameworkPaths()
|
||||
|
@ -837,7 +837,7 @@ namespace Microsoft.Build.UnitTests
|
|||
#region AssignLinkMetadata targets tests
|
||||
|
||||
/// <summary>
|
||||
/// Doesn't synthesize Link metadata if the items are defined in the project
|
||||
/// Doesn't synthesize Link metadata if the items are defined in the project
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NoLinkMetadataSynthesisWhenDefinedInProject()
|
||||
|
@ -1057,8 +1057,8 @@ namespace Microsoft.Build.UnitTests
|
|||
#if _NOT_YET_FULLY_CONVERTED_
|
||||
/// <summary>
|
||||
/// Tests that exercise the SplitResourcesByCulture Target in Microsoft.Common.targets.
|
||||
/// This target's job is to separate the items that need to run through resgen from
|
||||
/// those that need to go directly into CSC. Also, Culture and non-Culture resources
|
||||
/// This target's job is to separate the items that need to run through resgen from
|
||||
/// those that need to go directly into CSC. Also, Culture and non-Culture resources
|
||||
/// are split.
|
||||
/// </summary>
|
||||
[Test]
|
||||
|
@ -1080,11 +1080,11 @@ namespace Microsoft.Build.UnitTests
|
|||
</ItemGroup>
|
||||
<Import Project=`$(MSBuildBinPath)\Microsoft.CSharp.targets` />
|
||||
</Project>
|
||||
");
|
||||
");
|
||||
|
||||
p.Build(new string [] {"SplitResourcesByCulture"}, null);
|
||||
|
||||
ProjectItem[] items = p.GetItems("EmbeddedResource").ToArray();
|
||||
ProjectItem[] items = p.GetItems("EmbeddedResource").ToArray();
|
||||
|
||||
Assert.AreEqual("Resource2.resx", items[0].EvaluatedInclude);
|
||||
Assert.AreEqual("false", items[0].GetMetadataValue("WithCulture"));
|
||||
|
@ -1202,10 +1202,10 @@ namespace Microsoft.Build.UnitTests
|
|||
try
|
||||
{
|
||||
ResourceManager rm;
|
||||
|
||||
|
||||
rm = new ResourceManager(`ConsoleApplication37.Strings1`, Assembly.GetExecutingAssembly());
|
||||
Console.WriteLine(rm.GetString(`Usage`));
|
||||
|
||||
|
||||
rm = new ResourceManager(`MyStrings2`, Assembly.GetExecutingAssembly());
|
||||
Console.WriteLine(String.Format(rm.GetString(`InvalidChildElement`), `Foo`));
|
||||
|
||||
|
@ -1228,32 +1228,32 @@ namespace Microsoft.Build.UnitTests
|
|||
// ----------------------------------------------------------------------------
|
||||
// Strings1.restext
|
||||
// ----------------------------------------------------------------------------
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Strings1.restext",
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Strings1.restext",
|
||||
@"Usage=Hello world! Isn't it a beautiful day?");
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Strings2.restext
|
||||
// ----------------------------------------------------------------------------
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Strings2.restext",
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Strings2.restext",
|
||||
@"InvalidChildElement=The element {0} is not allowed here.");
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Subfolder\Strings3.restext
|
||||
// ----------------------------------------------------------------------------
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Subfolder\Strings3.restext",
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Subfolder\Strings3.restext",
|
||||
@"CopyrightMessage=Copyright (C) 2005, The MSBuild Team");
|
||||
|
||||
MockLogger logger = ObjectModelHelpers.BuildTempProjectFileExpectSuccess(@"ConsoleApplication37.csproj");
|
||||
|
||||
string stdout = ObjectModelHelpers.RunTempProjectBuiltApplication(@"bin\debug\ConsoleApplication37.exe");
|
||||
|
||||
Assert.IsTrue(@"ConsoleApplication37.exe did not emit Usage string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
Assert.IsTrue(@"ConsoleApplication37.exe did not emit Usage string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
stdout.Contains("Hello world! Isn't it a beautiful day?"));
|
||||
|
||||
Assert.IsTrue(@"ConsoleApplication37.exe did not emit InvalidChildElement string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
Assert.IsTrue(@"ConsoleApplication37.exe did not emit InvalidChildElement string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
stdout.Contains("The element Foo is not allowed here."));
|
||||
|
||||
Assert.IsTrue(@"ConsoleApplication37.exe did not emit CopyrightMessage string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
Assert.IsTrue(@"ConsoleApplication37.exe did not emit CopyrightMessage string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
stdout.Contains("Copyright (C) 2005, The MSBuild Team"));
|
||||
}
|
||||
|
||||
|
@ -1362,32 +1362,32 @@ namespace Microsoft.Build.UnitTests
|
|||
// ----------------------------------------------------------------------------
|
||||
// Strings1.restext
|
||||
// ----------------------------------------------------------------------------
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Strings1.restext",
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Strings1.restext",
|
||||
@"Usage=Hello world! Isn't it a beautiful day?");
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Strings2.restext
|
||||
// ----------------------------------------------------------------------------
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Strings2.restext",
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Strings2.restext",
|
||||
@"InvalidChildElement=The element {0} is not allowed here.");
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Subfolder\Strings3.restext
|
||||
// ----------------------------------------------------------------------------
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Subfolder\Strings3.restext",
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Subfolder\Strings3.restext",
|
||||
@"CopyrightMessage=Copyright (C) 2005, The MSBuild Team");
|
||||
|
||||
MockLogger logger = ObjectModelHelpers.BuildTempProjectFileExpectSuccess(@"ConsoleApplication38.vbproj");
|
||||
|
||||
string stdout = ObjectModelHelpers.RunTempProjectBuiltApplication(@"bin\debug\ConsoleApplication38.exe");
|
||||
|
||||
Assert.IsTrue(@"ConsoleApplication38.exe did not emit Usage string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
Assert.IsTrue(@"ConsoleApplication38.exe did not emit Usage string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
stdout.Contains("Hello world! Isn't it a beautiful day?"));
|
||||
|
||||
Assert.IsTrue(@"ConsoleApplication38.exe did not emit InvalidChildElement string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
Assert.IsTrue(@"ConsoleApplication38.exe did not emit InvalidChildElement string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
stdout.Contains("The element Foo is not allowed here."));
|
||||
|
||||
Assert.IsTrue(@"ConsoleApplication38.exe did not emit CopyrightMessage string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
Assert.IsTrue(@"ConsoleApplication38.exe did not emit CopyrightMessage string. See test output (Attachments in Azure Pipelines) for details.",
|
||||
stdout.Contains("Copyright (C) 2005, The MSBuild Team"));
|
||||
}
|
||||
}
|
||||
|
@ -1411,16 +1411,16 @@ namespace Microsoft.Build.UnitTests
|
|||
try
|
||||
{
|
||||
Project p0 = ObjectModelHelpers.CreateInMemoryProject(@"
|
||||
|
||||
<Project DefaultTargets=`Build` ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
|
||||
<Project DefaultTargets=`Build` ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<Import Project=`$(MSBuildBinPath)\Microsoft.CSharp.targets` />
|
||||
</Project>
|
||||
|
||||
");
|
||||
|
||||
Project p1 = ObjectModelHelpers.CreateInMemoryProject(@"
|
||||
|
||||
<Project DefaultTargets=`Build` ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
|
||||
<Project DefaultTargets=`Build` ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<Import Project=`$(MSBuildBinPath)\Microsoft.CSharp.targets` />
|
||||
</Project>
|
||||
|
||||
|
@ -1451,7 +1451,7 @@ namespace Microsoft.Build.UnitTests
|
|||
/// building) returning the name of the EXE or DLL that would be built.
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
sealed public class GetTargetPath
|
||||
sealed public class GetTargetPath
|
||||
{
|
||||
/// <summary>
|
||||
/// Try a basic workings.
|
||||
|
@ -1461,7 +1461,7 @@ namespace Microsoft.Build.UnitTests
|
|||
{
|
||||
Project p = ObjectModelHelpers.CreateInMemoryProject(@"
|
||||
|
||||
<Project DefaultTargets=`Build` ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<Project DefaultTargets=`Build` ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<PropertyGroup>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AssemblyName>MyAssembly</AssemblyName>
|
||||
|
@ -1473,23 +1473,23 @@ namespace Microsoft.Build.UnitTests
|
|||
</ItemGroup>
|
||||
<Import Project=`$(MSBuildBinPath)\Microsoft.CSharp.targets` />
|
||||
</Project>
|
||||
");
|
||||
|
||||
");
|
||||
|
||||
Hashtable h = new Hashtable();
|
||||
p.Build(new string[] {"GetTargetPath" }, h);
|
||||
ObjectModelHelpers.AssertSingleItemInDictionary(h, "<|proj|>bin\\Debug\\MyAssembly.exe");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests that exercise the PrepareResourceNames Target in
|
||||
/// Tests that exercise the PrepareResourceNames Target in
|
||||
/// Microsoft.VisualBasic.targets.
|
||||
///
|
||||
///
|
||||
/// This target's job is to create manifest resource names for each of
|
||||
/// the resource files.
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
sealed public class PrepareResourceNamesTarget
|
||||
sealed public class PrepareResourceNamesTarget
|
||||
{
|
||||
/// <summary>
|
||||
/// Basic test.
|
||||
|
@ -1499,7 +1499,7 @@ namespace Microsoft.Build.UnitTests
|
|||
{
|
||||
Project p = ObjectModelHelpers.CreateInMemoryProject(@"
|
||||
|
||||
<Project DefaultTargets=`Build` ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<Project DefaultTargets=`Build` ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<PropertyGroup>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<AssemblyName>MyAssembly</AssemblyName>
|
||||
|
@ -1516,11 +1516,11 @@ namespace Microsoft.Build.UnitTests
|
|||
</ItemGroup>
|
||||
<Import Project=`$(MSBuildBinPath)\Microsoft.VisualBasic.targets` />
|
||||
</Project>
|
||||
");
|
||||
");
|
||||
|
||||
p.Build(new string [] {"PrepareResourceNames"}, null);
|
||||
|
||||
ProjectItem[] items = p.GetItems("EmbeddedResource").ToArray();
|
||||
ProjectItem[] items = p.GetItems("EmbeddedResource").ToArray();
|
||||
|
||||
Assert.AreEqual("Resource2.resx", items[0].EvaluatedInclude);
|
||||
Assert.AreEqual("false", items[0].GetMetadataValue("WithCulture"));
|
||||
|
@ -1530,7 +1530,7 @@ namespace Microsoft.Build.UnitTests
|
|||
Assert.AreEqual("Resource2.fr.resx", items[1].EvaluatedInclude);
|
||||
Assert.AreEqual("true", items[1].GetMetadataValue("WithCulture"));
|
||||
Assert.AreEqual("Resx", items[1].GetMetadataValue("Type"));
|
||||
Assert.AreEqual("MyNamespace.Resource2.fr", items[1].GetMetadataValue("ManifestResourceName"));
|
||||
Assert.AreEqual("MyNamespace.Resource2.fr", items[1].GetMetadataValue("ManifestResourceName"));
|
||||
|
||||
Assert.AreEqual("Resource1.txt", items[2].EvaluatedInclude);
|
||||
Assert.AreEqual("false", items[2].GetMetadataValue("WithCulture"));
|
||||
|
@ -1597,7 +1597,7 @@ namespace Microsoft.Build.UnitTests
|
|||
<Folder Include=`Properties\` />
|
||||
</ItemGroup>
|
||||
<Import Project=`$(MSBuildBinPath)\Microsoft.CSharp.targets` />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name=`BeforeBuild`>
|
||||
</Target>
|
||||
|
@ -1606,7 +1606,7 @@ namespace Microsoft.Build.UnitTests
|
|||
-->
|
||||
</Project>
|
||||
");
|
||||
|
||||
|
||||
// ---------------------
|
||||
// Class1.cs
|
||||
// ---------------------
|
||||
|
@ -1618,7 +1618,7 @@ namespace Microsoft.Build.UnitTests
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle(`ClassLibrary16`)]
|
||||
|
@ -1630,8 +1630,8 @@ namespace Microsoft.Build.UnitTests
|
|||
[assembly: AssemblyTrademark(``)]
|
||||
[assembly: AssemblyCulture(``)]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
|
@ -1641,11 +1641,11 @@ namespace Microsoft.Build.UnitTests
|
|||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion(`1.0.0.0`)]
|
||||
[assembly: AssemblyFileVersion(`1.0.0.0`)]
|
||||
|
@ -1695,7 +1695,7 @@ namespace Microsoft.Build.UnitTests
|
|||
e.SetGlobalProperty("case", "0"); // Make project loadable
|
||||
Project p = ObjectModelHelpers.CreateInMemoryProject(e, @"
|
||||
|
||||
<Project ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<Project ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>foo</AssemblyName>
|
||||
|
@ -1728,7 +1728,7 @@ namespace Microsoft.Build.UnitTests
|
|||
p.Build(new string[] { "PrepareForBuild" });
|
||||
item = ObjectModelHelpers.AssertSingleItem(p, "AppConfigWithTargetPath", "app.config");
|
||||
Assert.AreEqual("foo.dll.config", item.GetMetadataValue("TargetPath"));
|
||||
|
||||
|
||||
/// (4) Choose @(None) App.Config in any subfolder in the project.
|
||||
p.SetGlobalProperty("case", "4");
|
||||
p.Build(new string[] { "PrepareForBuild" });
|
||||
|
@ -1758,7 +1758,7 @@ namespace Microsoft.Build.UnitTests
|
|||
ProjectCollection e = new ProjectCollection();
|
||||
Project p = ObjectModelHelpers.CreateInMemoryProject(e, @"
|
||||
|
||||
<Project ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<Project ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>foo</AssemblyName>
|
||||
|
@ -1786,7 +1786,7 @@ namespace Microsoft.Build.UnitTests
|
|||
ProjectCollection e = new ProjectCollection();
|
||||
Project p = ObjectModelHelpers.CreateInMemoryProject(e, @"
|
||||
|
||||
<Project ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<Project ToolsVersion=`4.0` xmlns=`msbuildnamespace`>
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>foo</AssemblyName>
|
||||
|
@ -1853,7 +1853,7 @@ namespace Microsoft.Build.UnitTests
|
|||
</ItemGroup>
|
||||
<Import Project=`$(MSBuildBinPath)\Microsoft.CSharp.targets` />
|
||||
</Project>
|
||||
");
|
||||
");
|
||||
|
||||
string[] configurations = p.GetConditionedProperties("Configuration");
|
||||
|
||||
|
@ -1944,7 +1944,7 @@ namespace Microsoft.Build.UnitTests
|
|||
<Import Project=`$(MSBuildBinPath)\Microsoft.VisualBasic.targets` />
|
||||
</Project>
|
||||
|
||||
");
|
||||
");
|
||||
|
||||
string[] configurations = p.GetConditionedProperties("Configuration");
|
||||
|
||||
|
@ -1954,10 +1954,10 @@ namespace Microsoft.Build.UnitTests
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is the infamous path-too-long problem. All absolute paths in question are within
|
||||
/// the 260 character limit that the filesystem imposes. However, when paths are accessed
|
||||
/// This is the infamous path-too-long problem. All absolute paths in question are within
|
||||
/// the 260 character limit that the filesystem imposes. However, when paths are accessed
|
||||
/// using relative paths, sometimes the simple concatenation of the current directory with the
|
||||
/// relative path can exceed 260 characters. MSBuild should solve this scenario by doing
|
||||
/// relative path can exceed 260 characters. MSBuild should solve this scenario by doing
|
||||
/// smarter path manipulation.
|
||||
/// </summary>
|
||||
[Test]
|
||||
|
@ -1972,7 +1972,7 @@ namespace Microsoft.Build.UnitTests
|
|||
// minus 55 to leave room for ConsoleApp\obj\debug\ResolveAssemblyReference.cache
|
||||
// div 4 because that's how much each subdir costs.
|
||||
int MAX_PATH = 260;
|
||||
int numberOfSubDirectoriesToCreate = (MAX_PATH - tempProjectRoot.Length - 55) / 4;
|
||||
int numberOfSubDirectoriesToCreate = (MAX_PATH - tempProjectRoot.Length - 55) / 4;
|
||||
StringBuilder deepRelativePath = new StringBuilder();
|
||||
for (int i = 0 ; i < numberOfSubDirectoriesToCreate ; i++)
|
||||
{
|
||||
|
@ -2087,7 +2087,7 @@ namespace Microsoft.Build.UnitTests
|
|||
</ItemGroup>
|
||||
<Import Project=`$(MSBuildBinPath)\Microsoft.CSharp.targets` />
|
||||
<!-- The old OM, which is what this solution is being built under, doesn't understand
|
||||
BeforeTargets, so this test was failing, because _AssignManagedMetadata was set
|
||||
BeforeTargets, so this test was failing, because _AssignManagedMetadata was set
|
||||
up as a BeforeTarget for Build. Copied here so that build will return the correct
|
||||
information again. -->
|
||||
<Target Name=`BeforeBuild`>
|
||||
|
@ -2133,7 +2133,7 @@ namespace Microsoft.Build.UnitTests
|
|||
// ==================================================================
|
||||
// SOLUTION1.SLN
|
||||
// ==================================================================
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory("Solution1.sln",
|
||||
ObjectModelHelpers.CreateFileInTempProjectDirectory("Solution1.sln",
|
||||
@"Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
Visual Studio 2005
|
||||
Project(`{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}`) = `CSharpClassLib`, `CSharpClassLib\CSharpClassLib.csproj`, `{9FB32A10-FA44-4DD3-ABA8-5215CF599BD6}`
|
||||
|
@ -2228,7 +2228,7 @@ namespace Microsoft.Build.UnitTests
|
|||
<Folder Include=`Properties\` />
|
||||
</ItemGroup>
|
||||
<Import Project=`$(MSBuildBinPath)\Microsoft.CSharp.targets` />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name=`BeforeBuild`>
|
||||
</Target>
|
||||
|
@ -2296,7 +2296,7 @@ namespace Microsoft.Build.UnitTests
|
|||
<Folder Include=`Properties\` />
|
||||
</ItemGroup>
|
||||
<Import Project=`$(MSBuildBinPath)\Microsoft.VisualJSharp.targets` />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name=`BeforeBuild`>
|
||||
</Target>
|
||||
|
@ -2417,7 +2417,7 @@ namespace Microsoft.Build.UnitTests
|
|||
l = ObjectModelHelpers.BuildTempProjectFileWithTargetsExpectSuccess(@"ConsoleApplication\ConsoleApplication.csproj", null, additionalProperties, true);
|
||||
l.AssertLogContains("/debug+");
|
||||
l.AssertLogContains("/debug:pdbonly");
|
||||
ObjectModelHelpers.AssertFileExistsInTempProjectDirectory(@"ConsoleApplication\bin\release\ConsoleApplication.pdb");
|
||||
ObjectModelHelpers.AssertFileExistsInTempProjectDirectory(@"ConsoleApplication\bin\release\ConsoleApplication.pdb");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -2670,7 +2670,7 @@ namespace Microsoft.Build.UnitTests
|
|||
<Compile Include=""Module1.vb"" />
|
||||
</ItemGroup>
|
||||
<Import Project=""$(MSBuildBinPath)\Microsoft.VisualBasic.targets"" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name=""BeforeBuild"">
|
||||
</Target>
|
||||
|
|
|
@ -218,7 +218,7 @@ public class TerminalLoggerConfiguration_Tests : IDisposable
|
|||
TerminalLoggerUserIntentSource = null,
|
||||
ConsoleLogger = true,
|
||||
ConsoleLoggerVerbosity = "minimal",
|
||||
ConsoleLoggerType = "parallel",
|
||||
ConsoleLoggerType = "parallel",
|
||||
FileLogger = false,
|
||||
};
|
||||
|
||||
|
|
|
@ -358,7 +358,7 @@ namespace Microsoft.Build.Engine.UnitTests
|
|||
logger.WarningCount.ShouldBe(2);
|
||||
logger.ErrorCount.ShouldBe(1);
|
||||
|
||||
// The build should STOP when a task logs an error, make sure ReturnFailureWithoutLoggingErrorTask doesn't run.
|
||||
// The build should STOP when a task logs an error, make sure ReturnFailureWithoutLoggingErrorTask doesn't run.
|
||||
logger.AssertLogDoesntContain("MSB1237");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@ namespace Microsoft.Build.Execution
|
|||
{
|
||||
#region Fields
|
||||
/// <summary>
|
||||
/// Store the pair of start/end events used by a particular submission to track their ownership
|
||||
/// of the legacy thread.
|
||||
/// Item1: Start event, tracks when the submission has permission to start building.
|
||||
/// Item2: End event, signalled when that submission is no longer using the legacy thread.
|
||||
/// Store the pair of start/end events used by a particular submission to track their ownership
|
||||
/// of the legacy thread.
|
||||
/// Item1: Start event, tracks when the submission has permission to start building.
|
||||
/// Item2: End event, signalled when that submission is no longer using the legacy thread.
|
||||
/// </summary>
|
||||
private readonly IDictionary<int, Tuple<AutoResetEvent, ManualResetEvent>> _legacyThreadingEventsById = new Dictionary<int, Tuple<AutoResetEvent, ManualResetEvent>>();
|
||||
|
||||
|
@ -37,8 +37,8 @@ namespace Microsoft.Build.Execution
|
|||
private RequestBuilder _instanceForMainThread;
|
||||
|
||||
/// <summary>
|
||||
/// Lock object for startNewRequestBuilderMainThreadEventsById, since it's possible for multiple submissions to be
|
||||
/// submitted at the same time.
|
||||
/// Lock object for startNewRequestBuilderMainThreadEventsById, since it's possible for multiple submissions to be
|
||||
/// submitted at the same time.
|
||||
/// </summary>
|
||||
private readonly Object _legacyThreadingEventsLock = new Object();
|
||||
#endregion
|
||||
|
@ -79,7 +79,7 @@ namespace Microsoft.Build.Execution
|
|||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Given a submission ID, assign it "start" and "finish" events to track its use of
|
||||
/// Given a submission ID, assign it "start" and "finish" events to track its use of
|
||||
/// the legacy thread.
|
||||
/// </summary>
|
||||
internal void RegisterSubmissionForLegacyThread(int submissionId)
|
||||
|
@ -95,8 +95,8 @@ namespace Microsoft.Build.Execution
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// This submission is completely done with the legacy thread, so unregister it
|
||||
/// from the dictionary so that we don't leave random events lying around.
|
||||
/// This submission is completely done with the legacy thread, so unregister it
|
||||
/// from the dictionary so that we don't leave random events lying around.
|
||||
/// </summary>
|
||||
internal void UnregisterSubmissionForLegacyThread(int submissionId)
|
||||
{
|
||||
|
@ -109,8 +109,8 @@ namespace Microsoft.Build.Execution
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a submission ID, return the event being used to track when that submission is ready
|
||||
/// to be executed on the legacy thread.
|
||||
/// Given a submission ID, return the event being used to track when that submission is ready
|
||||
/// to be executed on the legacy thread.
|
||||
/// </summary>
|
||||
internal WaitHandle GetStartRequestBuilderMainThreadEventForSubmission(int submissionId)
|
||||
{
|
||||
|
@ -127,8 +127,8 @@ namespace Microsoft.Build.Execution
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a submission ID, return the event being used to track when that submission is ready
|
||||
/// to be executed on the legacy thread.
|
||||
/// Given a submission ID, return the event being used to track when that submission is ready
|
||||
/// to be executed on the legacy thread.
|
||||
/// </summary>
|
||||
internal Task GetLegacyThreadInactiveTask(int submissionId)
|
||||
{
|
||||
|
|
|
@ -437,7 +437,7 @@ namespace Microsoft.Build.Experimental
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Launches MSBuild server.
|
||||
/// Launches MSBuild server.
|
||||
/// </summary>
|
||||
/// <returns> Whether MSBuild server was started successfully.</returns>
|
||||
private bool TryLaunchServer()
|
||||
|
@ -511,7 +511,7 @@ namespace Microsoft.Build.Experimental
|
|||
envVars[pair.Key] = pair.Value;
|
||||
}
|
||||
|
||||
// We remove env variable used to invoke MSBuild server as that might be equal to 1, so we do not get an infinite recursion here.
|
||||
// We remove env variable used to invoke MSBuild server as that might be equal to 1, so we do not get an infinite recursion here.
|
||||
envVars.Remove(Traits.UseMSBuildServerEnvVarName);
|
||||
|
||||
Debug.Assert(KnownTelemetry.PartialBuildTelemetry == null || KnownTelemetry.PartialBuildTelemetry.StartAt.HasValue, "BuildTelemetry.StartAt was not initialized!");
|
||||
|
|
|
@ -201,7 +201,7 @@ namespace Microsoft.Build.BackEnd.Client
|
|||
bool continueReading = true;
|
||||
do
|
||||
{
|
||||
// Ordering of the wait handles is important. The first signalled wait handle in the array
|
||||
// Ordering of the wait handles is important. The first signalled wait handle in the array
|
||||
// will be returned by WaitAny if multiple wait handles are signalled. We prefer to have the
|
||||
// terminate event triggered so that we cannot get into a situation where packets are being
|
||||
// spammed to the client and it never gets an opportunity to shutdown.
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shuts down all factories registered to this component factory collection.
|
||||
/// Shuts down all factories registered to this component factory collection.
|
||||
/// </summary>
|
||||
public void ShutdownComponents()
|
||||
{
|
||||
|
|
|
@ -31,8 +31,8 @@ namespace Microsoft.Build.BackEnd
|
|||
/// being actively built by the engine - i.e. it has a running task thread. All other requests
|
||||
/// must be in one of the other states. When in this state, the outstandingRequest and
|
||||
/// receivedResult members must be null.
|
||||
///
|
||||
/// Transitions:
|
||||
///
|
||||
/// Transitions:
|
||||
/// Waiting: When an msbuild callback is made the active build request needs to wait
|
||||
/// for the results in order to continue to process.
|
||||
/// Complete: The build request has generated all of the required results.
|
||||
|
@ -41,21 +41,21 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// This state means the node has received all of the results needed to continue processing this
|
||||
/// request. When this state is set, the receivedResult member of this entry must be non-null.
|
||||
/// request. When this state is set, the receivedResult member of this entry must be non-null.
|
||||
/// The request engine can continue it at some later point when it is no longer busy.
|
||||
/// Any number of entries may be in this state.
|
||||
///
|
||||
///
|
||||
/// Transitions:
|
||||
/// Active: The build request engine picks this ready request to process.
|
||||
/// </summary>
|
||||
Ready,
|
||||
|
||||
/// <summary>
|
||||
/// This state means the node is waiting for results from outstanding build requests. When this
|
||||
/// state is set, the outstandingRequest or outstandingConfiguration members of the entry
|
||||
/// This state means the node is waiting for results from outstanding build requests. When this
|
||||
/// state is set, the outstandingRequest or outstandingConfiguration members of the entry
|
||||
/// must be non-null.
|
||||
///
|
||||
/// Transitions:
|
||||
///
|
||||
/// Transitions:
|
||||
/// Ready: All of the results which caused the build request to wait have been received
|
||||
/// </summary>
|
||||
Waiting,
|
||||
|
@ -63,7 +63,7 @@ namespace Microsoft.Build.BackEnd
|
|||
/// <summary>
|
||||
/// This state means the request has completed and results are available. The engine will remove
|
||||
/// the request from the list and the results will be returned to the node for processing.
|
||||
///
|
||||
///
|
||||
/// Transitions: None, this is the final state of the build request
|
||||
/// </summary>
|
||||
Complete
|
||||
|
@ -342,7 +342,7 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
_outstandingRequests.Remove(result.NodeRequestId);
|
||||
|
||||
// If we wish to implement behavior where we stop building after the first failing request, then check for
|
||||
// If we wish to implement behavior where we stop building after the first failing request, then check for
|
||||
// overall results being failure rather than just circular dependency. Sync with BasicScheduler.ReportResult and
|
||||
// BasicScheduler.ReportRequestBlocked.
|
||||
if (result.CircularDependency || (_outstandingRequests.Count == 0 && (_unresolvedConfigurations == null || _unresolvedConfigurations.Count == 0)))
|
||||
|
@ -475,7 +475,7 @@ namespace Microsoft.Build.BackEnd
|
|||
ErrorUtilities.VerifyThrow(Result == null, "Entry already Completed.");
|
||||
|
||||
// If this request is determined to be a success, then all outstanding items must have been taken care of
|
||||
// and it must be in the correct state. It can complete unsuccessfully for a variety of reasons in a variety
|
||||
// and it must be in the correct state. It can complete unsuccessfully for a variety of reasons in a variety
|
||||
// of states.
|
||||
if (result.OverallResult == BuildResultCode.Success)
|
||||
{
|
||||
|
|
|
@ -139,7 +139,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// Prepares the engine for a new build and spins up the engine thread.
|
||||
/// Prepares the engine for a new build and spins up the engine thread.
|
||||
/// The engine must be in the Idle state, and not already be initialized.
|
||||
/// </summary>
|
||||
/// <param name="loggingContext">The logging context for the node.</param>
|
||||
|
@ -154,7 +154,7 @@ namespace Microsoft.Build.BackEnd
|
|||
void CleanupForBuild();
|
||||
|
||||
/// <summary>
|
||||
/// Submits the specified request to the build queue.
|
||||
/// Submits the specified request to the build queue.
|
||||
/// </summary>
|
||||
/// <param name="request">The request to build.</param>
|
||||
/// <remarks>It is only valid to call this method when the engine is in the Idle or
|
||||
|
|
|
@ -148,7 +148,7 @@ namespace Microsoft.Build.BackEnd
|
|||
else if (loadProject)
|
||||
{
|
||||
// We already had a configuration, load the project
|
||||
// If it exists but it cached, retrieve it
|
||||
// If it exists but it cached, retrieve it
|
||||
if (configuration.IsCached)
|
||||
{
|
||||
configuration.RetrieveFromCache();
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace Microsoft.Build.BackEnd
|
|||
void ClearConfigurations();
|
||||
|
||||
/// <summary>
|
||||
/// Clear non explicltly loaded configurations.
|
||||
/// Clear non explicltly loaded configurations.
|
||||
/// </summary>
|
||||
/// <returns>The configuration ids which have been cleared.</returns>
|
||||
List<int> ClearNonExplicitlyLoadedConfigurations();
|
||||
|
|
|
@ -49,9 +49,9 @@ namespace Microsoft.Build.BackEnd
|
|||
/// <param name="request">The request whose results we should return</param>
|
||||
/// <param name="configInitialTargets">The initial targets for the request's configuration.</param>
|
||||
/// <param name="configDefaultTargets">The default targets for the request's configuration.</param>
|
||||
/// <param name="skippedResultsDoNotCauseCacheMiss">If false, a cached skipped target will cause this method to return "NotSatisfied".
|
||||
/// If true, then as long as there is a result in the cache (regardless of whether it was skipped or not), this method
|
||||
/// will return "Satisfied". In most cases this should be false, but it may be set to true in a situation where there is no
|
||||
/// <param name="skippedResultsDoNotCauseCacheMiss">If false, a cached skipped target will cause this method to return "NotSatisfied".
|
||||
/// If true, then as long as there is a result in the cache (regardless of whether it was skipped or not), this method
|
||||
/// will return "Satisfied". In most cases this should be false, but it may be set to true in a situation where there is no
|
||||
/// chance of re-execution (which is the usual response to missing / skipped targets), and the caller just needs the data.</param>
|
||||
/// <returns>A response indicating the results, if any, and the targets needing to be built, if any.</returns>
|
||||
ResultsCacheResponse SatisfyRequest(BuildRequest request, List<string> configInitialTargets, List<string> configDefaultTargets, bool skippedResultsDoNotCauseCacheMiss);
|
||||
|
|
|
@ -148,9 +148,9 @@ namespace Microsoft.Build.BackEnd
|
|||
/// <param name="request">The request whose results we should return</param>
|
||||
/// <param name="configInitialTargets">The initial targets for the request's configuration.</param>
|
||||
/// <param name="configDefaultTargets">The default targets for the request's configuration.</param>
|
||||
/// <param name="skippedResultsDoNotCauseCacheMiss">If false, a cached skipped target will cause this method to return "NotSatisfied".
|
||||
/// If true, then as long as there is a result in the cache (regardless of whether it was skipped or not), this method
|
||||
/// will return "Satisfied". In most cases this should be false, but it may be set to true in a situation where there is no
|
||||
/// <param name="skippedResultsDoNotCauseCacheMiss">If false, a cached skipped target will cause this method to return "NotSatisfied".
|
||||
/// If true, then as long as there is a result in the cache (regardless of whether it was skipped or not), this method
|
||||
/// will return "Satisfied". In most cases this should be false, but it may be set to true in a situation where there is no
|
||||
/// chance of re-execution (which is the usual response to missing / skipped targets), and the caller just needs the data.</param>
|
||||
/// <returns>A response indicating the results, if any, and the targets needing to be built, if any.</returns>
|
||||
public ResultsCacheResponse SatisfyRequest(BuildRequest request, List<string> configInitialTargets, List<string> configDefaultTargets, bool skippedResultsDoNotCauseCacheMiss)
|
||||
|
@ -298,7 +298,7 @@ namespace Microsoft.Build.BackEnd
|
|||
/// <param name="result">The result to examine</param>
|
||||
/// <param name="targets">The targets to search for</param>
|
||||
/// <param name="targetsMissingResults">An optional list to be populated with missing targets</param>
|
||||
/// <param name="skippedResultsAreOK">If true, a status of "skipped" counts as having valid results
|
||||
/// <param name="skippedResultsAreOK">If true, a status of "skipped" counts as having valid results
|
||||
/// for that target. Otherwise, a skipped target is treated as equivalent to a missing target.</param>
|
||||
/// <returns>False if there were missing results, true otherwise.</returns>
|
||||
private static bool CheckResults(BuildResult result, List<string> targets, HashSet<string> targetsMissingResults, bool skippedResultsAreOK)
|
||||
|
@ -320,7 +320,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
else
|
||||
{
|
||||
// If the result was a failure and we have not seen any skipped targets up to this point, then we conclude we do
|
||||
// If the result was a failure and we have not seen any skipped targets up to this point, then we conclude we do
|
||||
// have results for this request, and they indicate failure.
|
||||
if (result[target].ResultCode == TargetResultCode.Failure && (targetsMissingResults == null || targetsMissingResults.Count == 0))
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// This interface represents a collection of nodes in the system. It provides methods to
|
||||
/// This interface represents a collection of nodes in the system. It provides methods to
|
||||
/// enumerate active nodes as well as send data and receive events from those nodes.
|
||||
/// </summary>
|
||||
internal interface INodeProvider : IBuildComponent
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// Set when a packet is available in the packet queue
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
private AutoResetEvent _packetAvailable;
|
||||
|
||||
/// <summary>
|
||||
|
@ -84,7 +84,7 @@ namespace Microsoft.Build.BackEnd
|
|||
private bool _peerConnected;
|
||||
|
||||
/// <summary>
|
||||
/// The asynchronous packet queue.
|
||||
/// The asynchronous packet queue.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Operations on this queue must be synchronized since it is accessible by multiple threads.
|
||||
|
@ -175,7 +175,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Causes this node to connect to the matched endpoint.
|
||||
/// Causes this node to connect to the matched endpoint.
|
||||
/// </summary>
|
||||
/// <param name="factory">Unused</param>
|
||||
public void Connect(INodePacketFactory factory)
|
||||
|
@ -266,7 +266,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
|
@ -416,7 +416,7 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
try
|
||||
{
|
||||
// Ordering of the wait handles is important. The first signalled wait handle in the array
|
||||
// Ordering of the wait handles is important. The first signalled wait handle in the array
|
||||
// will be returned by WaitAny if multiple wait handles are signalled. We prefer to have the
|
||||
// terminate event triggered so that we cannot get into a situation where packets are being
|
||||
// spammed to the endpoint and it never gets an opportunity to shutdown.
|
||||
|
|
|
@ -11,7 +11,7 @@ using Microsoft.Build.Shared;
|
|||
namespace Microsoft.Build.BackEnd
|
||||
{
|
||||
/// <summary>
|
||||
/// The NodeManager class is responsible for marshalling data to/from the NodeProviders and organizing the
|
||||
/// The NodeManager class is responsible for marshalling data to/from the NodeProviders and organizing the
|
||||
/// creation of new nodes on request.
|
||||
/// </summary>
|
||||
internal class NodeManager : INodeManager
|
||||
|
@ -23,7 +23,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// The node provider for out-of-proc nodes.
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
private INodeProvider? _outOfProcNodeProvider;
|
||||
|
||||
/// <summary>
|
||||
|
@ -56,9 +56,9 @@ namespace Microsoft.Build.BackEnd
|
|||
/// BUGBUG: This is a fix which corrects an RI blocking BVT failure. The real fix must be determined before RTM.
|
||||
/// This must be investigated and resolved before RTM. The apparent issue is that a design-time build has already called EndBuild
|
||||
/// through the BuildManagerAccessor, and the nodes are shut down. Shortly thereafter, the solution build manager comes through and calls EndBuild, which throws
|
||||
/// another Shutdown packet in the queue, and causes the following build to stop prematurely. This is all timing related - not every sequence of builds seems to
|
||||
/// another Shutdown packet in the queue, and causes the following build to stop prematurely. This is all timing related - not every sequence of builds seems to
|
||||
/// cause the problem, probably due to the order in which the packet queue gets serviced relative to other threads.
|
||||
///
|
||||
///
|
||||
/// It appears that the problem is that the BuildRequestEngine is being invoked in a way that causes a shutdown packet to appear to overlap with a build request packet.
|
||||
/// Interactions between the in-proc node communication thread and the shutdown mechanism must be investigated to determine how BuildManager.EndBuild is allowing itself
|
||||
/// to return before the node has indicated it is actually finished.
|
||||
|
@ -66,7 +66,7 @@ namespace Microsoft.Build.BackEnd
|
|||
private bool _nodesShutdown = true;
|
||||
|
||||
/// <summary>
|
||||
/// Tracks whether ShutdownComponent has been called.
|
||||
/// Tracks whether ShutdownComponent has been called.
|
||||
/// </summary>
|
||||
private bool _componentShutdown;
|
||||
|
||||
|
|
|
@ -12,13 +12,13 @@ using Microsoft.Build.Shared;
|
|||
namespace Microsoft.Build.BackEnd
|
||||
{
|
||||
/// <summary>
|
||||
/// The NodeManager class is responsible for marshalling data to/from the NodeProviders and organizing the
|
||||
/// The NodeManager class is responsible for marshalling data to/from the NodeProviders and organizing the
|
||||
/// creation of new nodes on request.
|
||||
/// </summary>
|
||||
internal class TaskHostNodeManager : INodeManager
|
||||
{
|
||||
/// <summary>
|
||||
/// The node provider for task hosts.
|
||||
/// The node provider for task hosts.
|
||||
/// </summary>
|
||||
private INodeProvider _outOfProcTaskHostNodeProvider;
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace Microsoft.Build.BackEnd
|
|||
private IBuildComponentHost _componentHost;
|
||||
|
||||
/// <summary>
|
||||
/// Tracks whether ShutdownComponent has been called.
|
||||
/// Tracks whether ShutdownComponent has been called.
|
||||
/// </summary>
|
||||
private bool _componentShutdown;
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ using Microsoft.Build.Shared;
|
|||
namespace Microsoft.Build.BackEnd
|
||||
{
|
||||
/// <summary>
|
||||
/// This class is responsible for serializing and deserializing anything that is not
|
||||
/// officially supported by ITranslator, but that we still want to do
|
||||
/// custom translation of.
|
||||
/// This class is responsible for serializing and deserializing anything that is not
|
||||
/// officially supported by ITranslator, but that we still want to do
|
||||
/// custom translation of.
|
||||
/// </summary>
|
||||
internal static class TranslatorExtensions
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Microsoft.Build.BackEnd
|
|||
/// <summary>
|
||||
/// Each component in the build system which is registered with the Build Manager or a Node must
|
||||
/// implement this interface.
|
||||
///
|
||||
///
|
||||
/// REFACTOR: Maybe these could all implement IDisposable.
|
||||
/// </summary>
|
||||
internal interface IBuildComponent
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Provide a friendly name for the sink to make it easier to differentiate during
|
||||
/// Provide a friendly name for the sink to make it easier to differentiate during
|
||||
/// debugging and display
|
||||
/// </summary>
|
||||
public string Name
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// An IEventRedirector which will redirect any events forwarded from the logger. The eventRedirector determines where the events will
|
||||
/// An IEventRedirector which will redirect any events forwarded from the logger. The eventRedirector determines where the events will
|
||||
/// be redirected.
|
||||
/// </summary>
|
||||
public IEventRedirector BuildEventRedirector
|
||||
|
@ -59,7 +59,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
#region Public
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the logger with an eventSource and a node count.
|
||||
/// Initialize the logger with an eventSource and a node count.
|
||||
/// The logger will register and listen to anyEvents on the eventSource.
|
||||
/// The node count is for informational purposes. The logger may want to take different
|
||||
/// actions depending on how many nodes there are in the system.
|
||||
|
@ -102,7 +102,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
#region Private
|
||||
|
||||
/// <summary>
|
||||
/// Forwards any event raised to the BuildEventRedirector, this redirector will send the event on a path which will
|
||||
/// Forwards any event raised to the BuildEventRedirector, this redirector will send the event on a path which will
|
||||
/// take it to a logger.
|
||||
/// </summary>
|
||||
/// <param name="sender">Who sent the message, this is not used</param>
|
||||
|
@ -110,7 +110,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
private void EventSource_AnyEventRaised(object sender, BuildEventArgs buildEvent)
|
||||
{
|
||||
// If no central logger was registered with the system
|
||||
// there will not be a build event redirector as there is
|
||||
// there will not be a build event redirector as there is
|
||||
// nowhere to forward the events to.
|
||||
BuildEventRedirector?.ForwardEvent(buildEvent);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
#region Constructors
|
||||
/// <summary>
|
||||
/// Initalize this class with a central logger id identifying the central logger to which
|
||||
/// these events should consumed by. The redirector will send the messages to the registered sink to
|
||||
/// these events should consumed by. The redirector will send the messages to the registered sink to
|
||||
/// be consumed
|
||||
/// </summary>
|
||||
/// <param name="loggerId">Id which will be attached to the build event arguments to indicate which logger the events came from</param>
|
||||
|
|
|
@ -83,8 +83,8 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
public event CustomBuildEventHandler CustomEventRaised;
|
||||
|
||||
/// <summary>
|
||||
/// this event is raised to log build status events, such as
|
||||
/// build/project/target/task started/stopped
|
||||
/// this event is raised to log build status events, such as
|
||||
/// build/project/target/task started/stopped
|
||||
/// </summary>
|
||||
public event BuildStatusEventHandler StatusEventRaised;
|
||||
|
||||
|
@ -102,7 +102,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Provide a friendly name for the sink to make it easier to differentiate during
|
||||
/// Provide a friendly name for the sink to make it easier to differentiate during
|
||||
/// debugging and display
|
||||
/// </summary>
|
||||
public string Name
|
||||
|
@ -313,7 +313,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
/// <param name="buildEvent">BuildMessageEventArgs</param>
|
||||
/// <exception cref="LoggerException">When EventHandler raises an logger exception the LoggerException is rethrown</exception>
|
||||
/// <exception cref="InternalLoggerException">Any exceptions which are not LoggerExceptions are wrapped in an InternalLoggerException</exception>
|
||||
/// <exception cref="Exception">ExceptionHandling.IsCriticalException exceptions will not be wrapped</exception>
|
||||
/// <exception cref="Exception">ExceptionHandling.IsCriticalException exceptions will not be wrapped</exception>
|
||||
private void RaiseMessageEvent(object sender, BuildMessageEventArgs buildEvent)
|
||||
{
|
||||
if (MessageRaised != null)
|
||||
|
@ -875,9 +875,9 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
// if a fellow logger is throwing in an event handler.
|
||||
this.UnregisterAllEventHandlers();
|
||||
|
||||
// We ought to dump this farther up the stack, but if for example a task is logging an event within a
|
||||
// catch(Exception) block and not rethrowing it, there's the possibility that this exception could
|
||||
// just get silently eaten. So better to have duplicates than to not log the problem at all. :)
|
||||
// We ought to dump this farther up the stack, but if for example a task is logging an event within a
|
||||
// catch(Exception) block and not rethrowing it, there's the possibility that this exception could
|
||||
// just get silently eaten. So better to have duplicates than to not log the problem at all. :)
|
||||
ExceptionHandling.DumpExceptionToFile(exception);
|
||||
|
||||
throw;
|
||||
|
@ -888,9 +888,9 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
// if a fellow logger is throwing in an event handler.
|
||||
this.UnregisterAllEventHandlers();
|
||||
|
||||
// We ought to dump this farther up the stack, but if for example a task is logging an event within a
|
||||
// catch(Exception) block and not rethrowing it, there's the possibility that this exception could
|
||||
// just get silently eaten. So better to have duplicates than to not log the problem at all. :)
|
||||
// We ought to dump this farther up the stack, but if for example a task is logging an event within a
|
||||
// catch(Exception) block and not rethrowing it, there's the possibility that this exception could
|
||||
// just get silently eaten. So better to have duplicates than to not log the problem at all. :)
|
||||
ExceptionHandling.DumpExceptionToFile(exception);
|
||||
|
||||
if (ExceptionHandling.IsCriticalException(exception))
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
|
||||
/// <summary>
|
||||
/// The list of descriptions which describe how to create forwarding loggers on a node.
|
||||
/// This is used by the node provider to get a list of registered descriptions so that
|
||||
/// This is used by the node provider to get a list of registered descriptions so that
|
||||
/// they can be transmitted to child nodes.
|
||||
/// </summary>
|
||||
ICollection<LoggerDescription> LoggerDescriptions
|
||||
|
@ -616,13 +616,13 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Acts as an endpoint for a buildEventArg. The objects which implement this interface are intended to consume the BuildEventArg.
|
||||
/// Acts as an endpoint for a buildEventArg. The objects which implement this interface are intended to consume the BuildEventArg.
|
||||
/// </summary>
|
||||
internal interface IBuildEventSink
|
||||
{
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Provide a the sink a friendly name which can be used to distinguish sinks in memory
|
||||
/// Provide a the sink a friendly name which can be used to distinguish sinks in memory
|
||||
/// and for display
|
||||
/// </summary>
|
||||
string Name
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
/// <summary>
|
||||
/// Retrieves the build event context
|
||||
/// UNDONE: (Refactor) We eventually want to remove this because all logging should go
|
||||
/// through a context object. This exists only so we can make certain
|
||||
/// through a context object. This exists only so we can make certain
|
||||
/// logging calls in code which has not yet been fully refactored.
|
||||
/// </summary>
|
||||
public BuildEventContext BuildEventContext
|
||||
|
|
|
@ -998,13 +998,13 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
|
||||
// Get the Id of the eventSourceSink which was created for the first logger.
|
||||
// We keep a reference to this Id so that all other central loggers registered on this logging service (from registerLogger)
|
||||
// will be attached to that eventSource sink so that they get all of the events forwarded by
|
||||
// will be attached to that eventSource sink so that they get all of the events forwarded by
|
||||
// forwarded by the CentralForwardingLogger
|
||||
_centralForwardingLoggerSinkId = centralForwardingLoggerDescription.LoggerId;
|
||||
}
|
||||
else
|
||||
{
|
||||
// We have already create a forwarding logger and have a single eventSink which
|
||||
// We have already create a forwarding logger and have a single eventSink which
|
||||
// a logger can listen to inorder to get all events in the system
|
||||
EventSourceSink eventSource = (EventSourceSink)_eventSinkDictionary[_centralForwardingLoggerSinkId];
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
}
|
||||
}
|
||||
|
||||
// UNDONE: (Logging) This should re-initialize this logging service.
|
||||
// UNDONE: (Logging) This should re-initialize this logging service.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1641,10 +1641,10 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
// them.
|
||||
_filterEventSource.Consume(eventArg);
|
||||
|
||||
// Now that the forwarding loggers have been given the chance to log the build started and finished events we need to check the
|
||||
// Now that the forwarding loggers have been given the chance to log the build started and finished events we need to check the
|
||||
// central logger sinks to see if they have received the events or not. If the sink has not received the event we need to send it to the
|
||||
// logger for backwards compatibility with orcas.
|
||||
// In addition we need to make sure we manually forward the events because in orcas the forwarding loggers were not allowed to
|
||||
// In addition we need to make sure we manually forward the events because in orcas the forwarding loggers were not allowed to
|
||||
// forward build started or build finished events. In the new OM we allow the loggers to forward the events. However since orcas did not forward them
|
||||
// we need to support loggers which cannot forward the events.
|
||||
if (eventArg is BuildStartedEventArgs)
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
/// Logs a comment (BuildMessageEventArgs) with a certain MessageImportance level
|
||||
/// </summary>
|
||||
/// <param name="buildEventContext">Event context information which describes who is logging the event</param>
|
||||
/// <param name="importance">How important is the message, this will determine which verbosities the message will show up on.
|
||||
/// <param name="importance">How important is the message, this will determine which verbosities the message will show up on.
|
||||
/// The higher the importance the lower the verbosity needs to be for the message to be seen</param>
|
||||
/// <param name="messageResourceName">String which identifies the message in the string resx</param>
|
||||
/// <param name="messageArgs">Arguments for the format string indexed by messageResourceName</param>
|
||||
|
@ -45,7 +45,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
/// Log a comment
|
||||
/// </summary>
|
||||
/// <param name="buildEventContext">Event context information which describes who is logging the event</param>
|
||||
/// <param name="importance">How important is the message, this will determine which verbosities the message will show up on.
|
||||
/// <param name="importance">How important is the message, this will determine which verbosities the message will show up on.
|
||||
/// The higher the importance the lower the verbosity needs to be for the message to be seen</param>
|
||||
/// <param name="message">Message to log</param>
|
||||
/// <exception cref="InternalErrorException">BuildEventContext is null</exception>
|
||||
|
@ -59,7 +59,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
/// Log a comment
|
||||
/// </summary>
|
||||
/// <param name="buildEventContext">Event context information which describes who is logging the event</param>
|
||||
/// <param name="importance">How important is the message, this will determine which verbosities the message will show up on.
|
||||
/// <param name="importance">How important is the message, this will determine which verbosities the message will show up on.
|
||||
/// The higher the importance the lower the verbosity needs to be for the message to be seen</param>
|
||||
/// <param name="message">Message to log</param>
|
||||
/// <param name="messageArgs">Message formatting arguments</param>
|
||||
|
@ -368,7 +368,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
#region Log status
|
||||
|
||||
/// <summary>
|
||||
/// Logs that the build has started
|
||||
/// Logs that the build has started
|
||||
/// </summary>
|
||||
public void LogBuildStarted()
|
||||
{
|
||||
|
|
|
@ -121,7 +121,7 @@ namespace Microsoft.Build.BackEnd.Logging
|
|||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class is designed to be passed to loggers.
|
||||
/// The expense of copying items is only incurred if and when
|
||||
/// The expense of copying items is only incurred if and when
|
||||
/// a logger chooses to enumerate over it.
|
||||
/// </remarks>
|
||||
internal class TargetOutputItemsInstanceEnumeratorProxy : IEnumerable<TaskItem>
|
||||
|
|
|
@ -19,26 +19,26 @@ namespace Microsoft.Build.BackEnd
|
|||
/// </summary>
|
||||
/// <remarks>
|
||||
/// What batching does
|
||||
///
|
||||
/// Batching partitions the items consumed by the batchable object into buckets, where each bucket
|
||||
/// contains a set of items that have the same value set on all item metadata consumed by the object.
|
||||
/// Metadata consumed may be unqualified, for example %(m), or qualified by the item list to which it
|
||||
///
|
||||
/// Batching partitions the items consumed by the batchable object into buckets, where each bucket
|
||||
/// contains a set of items that have the same value set on all item metadata consumed by the object.
|
||||
/// Metadata consumed may be unqualified, for example %(m), or qualified by the item list to which it
|
||||
/// refers, for example %(a.m).
|
||||
///
|
||||
/// If metadata is qualified, for example %(a.m), then this is considered distinct to metadata with the
|
||||
/// same name on a different item type. For example, %(a.m) is distinct to %(b.m), and items of type ‘b’
|
||||
/// are considered to always have a blank value for %(a.m). This means items of type ‘b’ will only be
|
||||
///
|
||||
/// If metadata is qualified, for example %(a.m), then this is considered distinct to metadata with the
|
||||
/// same name on a different item type. For example, %(a.m) is distinct to %(b.m), and items of type ‘b’
|
||||
/// are considered to always have a blank value for %(a.m). This means items of type ‘b’ will only be
|
||||
/// placed in buckets where %(a.m) is blank. However %(a.m) is equivalent to %(m) on items of type ‘a’.
|
||||
///
|
||||
/// There is an extra ambiguity rule: every items consumed by the object must have an explicit value for
|
||||
/// every piece of unqualified metadata. For example, if @(a), %(m), and %(a.n) are consumed, every item
|
||||
/// of type ‘a’ must have a value for the metadata ‘m’ but need not all necessarily have a value for the
|
||||
/// metadata ‘n’. This rule eliminates ambiguity about whether items that do not define values for an
|
||||
/// unqualified metadata should go in all buckets, or just into buckets with a blank value for
|
||||
///
|
||||
/// There is an extra ambiguity rule: every items consumed by the object must have an explicit value for
|
||||
/// every piece of unqualified metadata. For example, if @(a), %(m), and %(a.n) are consumed, every item
|
||||
/// of type ‘a’ must have a value for the metadata ‘m’ but need not all necessarily have a value for the
|
||||
/// metadata ‘n’. This rule eliminates ambiguity about whether items that do not define values for an
|
||||
/// unqualified metadata should go in all buckets, or just into buckets with a blank value for
|
||||
/// that metadata.
|
||||
///
|
||||
/// For example
|
||||
///
|
||||
///
|
||||
/// For example
|
||||
///
|
||||
/// <ItemGroup>
|
||||
/// <a Include='a1;a2'>
|
||||
/// <n>m0</n>
|
||||
|
@ -54,19 +54,19 @@ namespace Microsoft.Build.BackEnd
|
|||
/// </b>
|
||||
/// <b Include='b4'/>
|
||||
/// </ItemGroup>
|
||||
///
|
||||
///
|
||||
/// <Target Name="t" >
|
||||
/// <Message Text="a={@(a).%(a.n)} b={@(b).%(b.n)}" />
|
||||
/// </Target>
|
||||
///
|
||||
/// Will produce 5 buckets:
|
||||
///
|
||||
///
|
||||
/// Will produce 5 buckets:
|
||||
///
|
||||
/// a={a1;a2.m0} b={.}
|
||||
/// a={a3.m1} b={.}
|
||||
/// a={.} b={b1.n0}
|
||||
/// a={.} b={b2;b3.n1}
|
||||
/// a={.} b={b4.}
|
||||
///
|
||||
///
|
||||
/// </remarks>
|
||||
internal static class BatchingEngine
|
||||
{
|
||||
|
@ -113,14 +113,14 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
ItemsAndMetadataPair pair = ExpressionShredder.GetReferencedItemNamesAndMetadata(batchableObjectParameters);
|
||||
|
||||
// All the @(itemname) item list references in the tag, including transforms, etc.
|
||||
// All the @(itemname) item list references in the tag, including transforms, etc.
|
||||
HashSet<string> consumedItemReferences = pair.Items;
|
||||
|
||||
// All the %(itemname.metadataname) references in the tag (not counting those embedded
|
||||
// All the %(itemname.metadataname) references in the tag (not counting those embedded
|
||||
// inside item transforms), and note that the itemname portion is optional.
|
||||
// The keys in the returned hash table are the qualified metadata names (e.g. "EmbeddedResource.Culture"
|
||||
// or just "Culture"). The values are MetadataReference structs, which simply split out the item
|
||||
// name (possibly null) and the actual metadata name.
|
||||
// or just "Culture"). The values are MetadataReference structs, which simply split out the item
|
||||
// name (possibly null) and the actual metadata name.
|
||||
Dictionary<string, MetadataReference> consumedMetadataReferences = pair.Metadata;
|
||||
|
||||
List<ItemBucket> buckets = null;
|
||||
|
@ -136,14 +136,14 @@ namespace Microsoft.Build.BackEnd
|
|||
// This method goes through all the item list references and figures out which ones
|
||||
// will be participating in batching, and which ones won't. We get back a hashtable
|
||||
// where the key is the item name that will be participating in batching. The values
|
||||
// are all String.Empty (not used). This method may return additional item names
|
||||
// are all String.Empty (not used). This method may return additional item names
|
||||
// that weren't represented in "consumedItemReferences"... this would happen if there
|
||||
// were qualified metadata references in the consumedMetadataReferences table, such as
|
||||
// were qualified metadata references in the consumedMetadataReferences table, such as
|
||||
// %(EmbeddedResource.Culture).
|
||||
Dictionary<string, ICollection<ProjectItemInstance>> itemListsToBeBatched = GetItemListsToBeBatched(consumedMetadataReferences, consumedItemReferences, lookup, elementLocation);
|
||||
|
||||
// At this point, if there were any metadata references in the tag, but no item
|
||||
// references to batch on, we've got a problem because we can't figure out which
|
||||
// At this point, if there were any metadata references in the tag, but no item
|
||||
// references to batch on, we've got a problem because we can't figure out which
|
||||
// item lists the user wants us to batch.
|
||||
if (itemListsToBeBatched.Count == 0)
|
||||
{
|
||||
|
@ -178,16 +178,16 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// Of all the item lists that are referenced in this batchable object, which ones should we
|
||||
/// batch on, and which ones should we just pass in wholesale to every invocation of the
|
||||
/// batch on, and which ones should we just pass in wholesale to every invocation of the
|
||||
/// target/task?
|
||||
///
|
||||
///
|
||||
/// Rule #1. If the user has referenced any *qualified* item metadata such as %(EmbeddedResource.Culture),
|
||||
/// then that item list "EmbeddedResource" will definitely get batched.
|
||||
///
|
||||
/// Rule #2. For all the unqualified item metadata such as %(Culture), we make sure that
|
||||
///
|
||||
/// Rule #2. For all the unqualified item metadata such as %(Culture), we make sure that
|
||||
/// every single item in every single item list being passed into the task contains a value
|
||||
/// for that metadata. If not, it's an error. If so, we batch all of those item lists.
|
||||
///
|
||||
///
|
||||
/// All other item lists will not be batched, and instead will be passed in wholesale to all buckets.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary containing the item names that should be batched. If the items match unqualified metadata,
|
||||
|
@ -212,11 +212,11 @@ namespace Microsoft.Build.BackEnd
|
|||
if (consumedMetadataReference.ItemName != null)
|
||||
{
|
||||
// Rule #1. Qualified metadata reference.
|
||||
// For metadata references that are qualified with an item name
|
||||
// (e.g., %(EmbeddedResource.Culture) ), we add that item name to the list of
|
||||
// For metadata references that are qualified with an item name
|
||||
// (e.g., %(EmbeddedResource.Culture) ), we add that item name to the list of
|
||||
// consumed item names, even if the item name wasn't otherwise referenced via
|
||||
// @(...) syntax, and even if every item in the list doesn't necessary contain
|
||||
// a value for this metadata. This is the special power that you get by qualifying
|
||||
// a value for this metadata. This is the special power that you get by qualifying
|
||||
// the metadata reference with an item name.
|
||||
itemListsToBeBatched[consumedMetadataReference.ItemName] = null;
|
||||
|
||||
|
@ -224,7 +224,7 @@ namespace Microsoft.Build.BackEnd
|
|||
// %(EmbeddedResource.Culture) effectively means that @(EmbeddedResource) is
|
||||
// being consumed, even though we may not see literally "@(EmbeddedResource)"
|
||||
// in the tag anywhere. Adding it to this list allows us (down below in this
|
||||
// method) to check that every item in this list has a value for each
|
||||
// method) to check that every item in this list has a value for each
|
||||
// unqualified metadata reference.
|
||||
consumedItemReferenceNames ??= new HashSet<string>(MSBuildNameIgnoreCaseComparer.Default);
|
||||
consumedItemReferenceNames.Add(consumedMetadataReference.ItemName);
|
||||
|
@ -364,7 +364,7 @@ namespace Microsoft.Build.BackEnd
|
|||
/// <summary>
|
||||
/// Gets the values of the specified metadata for the given item.
|
||||
/// The keys in the dictionary returned may be qualified and/or unqualified, exactly
|
||||
/// as they are found in the metadata reference.
|
||||
/// as they are found in the metadata reference.
|
||||
/// For example if %(x) is found, the key is "x", if %(z.x) is found, the key is "z.x".
|
||||
/// This dictionary in each bucket is used by Expander to expand exactly the same metadata references, so
|
||||
/// %(x) is expanded using the key "x", and %(z.x) is expanded using the key "z.x".
|
||||
|
@ -393,7 +393,7 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
try
|
||||
{
|
||||
// This returns String.Empty for both metadata that is undefined and metadata that has
|
||||
// This returns String.Empty for both metadata that is undefined and metadata that has
|
||||
// an empty value; they are treated the same.
|
||||
itemMetadataValues[metadataQualifiedName] = ((IItem)item).GetMetadataValueEscaped(metadataName);
|
||||
}
|
||||
|
|
|
@ -15,14 +15,14 @@ namespace Microsoft.Build.BackEnd
|
|||
internal interface ITargetBuilderCallback : IRequestBuilderCallback
|
||||
{
|
||||
/// <summary>
|
||||
/// Invokes the specified targets using Dev9 behavior.
|
||||
/// Invokes the specified targets using Dev9 behavior.
|
||||
/// </summary>
|
||||
/// <param name="targets">The targets to build.</param>
|
||||
/// <param name="continueOnError">True to continue building the remaining targets if one fails.</param>
|
||||
/// <param name="referenceLocation">The <see cref="ElementLocation"/> of the reference.</param>
|
||||
/// <returns>The results for each target.</returns>
|
||||
/// <remarks>
|
||||
/// The target is run using the data context of the Project, rather than the data context
|
||||
/// The target is run using the data context of the Project, rather than the data context
|
||||
/// of the current target. This has the following effects:
|
||||
/// 1. Data visible to the CALLING target at the time it was first invoked is the only
|
||||
/// data which the CALLED target can see. No changes made between the time the CALLING
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace Microsoft.Build.BackEnd
|
|||
internal enum TaskExecutionMode
|
||||
{
|
||||
/// <summary>
|
||||
/// This entry is necessary to use the enum with binary math. It is never used outside
|
||||
/// This entry is necessary to use the enum with binary math. It is never used outside
|
||||
/// intermediate calculations.
|
||||
/// </summary>
|
||||
Invalid = 0,
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called to execute a task within a target. This method instantiates the task, sets its parameters, and executes it.
|
||||
/// Called to execute a task within a target. This method instantiates the task, sets its parameters, and executes it.
|
||||
/// </summary>
|
||||
/// <param name="lookup">The lookup used for expansion and to receive created items and properties.</param>
|
||||
internal abstract void ExecuteTask(Lookup lookup);
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Microsoft.Build.BackEnd
|
|||
private readonly List<ITaskItem> _targetOutputs = new List<ITaskItem>();
|
||||
|
||||
/// <summary>
|
||||
/// A list of targets to build. This is a required parameter. If you want to build the
|
||||
/// A list of targets to build. This is a required parameter. If you want to build the
|
||||
/// default targets, use the <see cref="MSBuild"/> task and pass in Projects=$(MSBuildProjectFile).
|
||||
/// </summary>
|
||||
/// <value>Array of target names.</value>
|
||||
|
@ -92,8 +92,8 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
// This is a list of string[]. That is, each element in the list is a string[]. Each
|
||||
// string[] represents a set of target names to build. Depending on the value
|
||||
// of the RunEachTargetSeparately parameter, we each just call the engine to run all
|
||||
// string[] represents a set of target names to build. Depending on the value
|
||||
// of the RunEachTargetSeparately parameter, we each just call the engine to run all
|
||||
// the targets together, or we call the engine separately for each target.
|
||||
List<string[]> targetLists = MSBuild.CreateTargetLists(Targets, RunEachTargetSeparately);
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ namespace Microsoft.Build.BackEnd
|
|||
// Second, expand the item include and exclude, and filter existing metadata as appropriate.
|
||||
List<ProjectItemInstance> itemsToAdd = ExpandItemIntoItems(child, bucket.Expander, keepMetadata, removeMetadata, loggingContext);
|
||||
|
||||
// Third, expand the metadata.
|
||||
// Third, expand the metadata.
|
||||
foreach (ProjectItemGroupTaskMetadataInstance metadataInstance in child.Metadata)
|
||||
{
|
||||
bool condition = ConditionEvaluator.EvaluateCondition(
|
||||
|
@ -196,7 +196,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
string evaluatedValue = bucket.Expander.ExpandIntoStringLeaveEscaped(metadataInstance.Value, expanderOptions, metadataInstance.Location, loggingContext);
|
||||
|
||||
// This both stores the metadata so we can add it to all the items we just created later, and
|
||||
// This both stores the metadata so we can add it to all the items we just created later, and
|
||||
// exposes this metadata to further metadata evaluations in subsequent loop iterations.
|
||||
metadataTable.SetValue(metadataInstance.Name, evaluatedValue);
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove items from the world. Removes to items that are part of the project manifest are backed up, so
|
||||
/// Remove items from the world. Removes to items that are part of the project manifest are backed up, so
|
||||
/// they can be reverted when the project is reset after the end of the build.
|
||||
/// </summary>
|
||||
/// <param name="child">The item specification to evaluate and remove.</param>
|
||||
|
@ -280,7 +280,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifies items in the world - specifically, changes their metadata. Changes to items that are part of the project manifest are backed up, so
|
||||
/// Modifies items in the world - specifically, changes their metadata. Changes to items that are part of the project manifest are backed up, so
|
||||
/// they can be reverted when the project is reset after the end of the build.
|
||||
/// </summary>
|
||||
/// <param name="child">The item specification to evaluate and modify.</param>
|
||||
|
@ -681,7 +681,7 @@ namespace Microsoft.Build.BackEnd
|
|||
#region IMetadataTable Members
|
||||
// NOTE: Leaving these methods public so as to avoid having to explicitly define them
|
||||
// through the IMetadataTable interface and then cast everywhere they're used. This class
|
||||
// is private, so it ultimately doesn't matter.
|
||||
// is private, so it ultimately doesn't matter.
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified metadata value. Returns an empty string if none is set.
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace Microsoft.Build.BackEnd
|
|||
// If the parameterName is not specified, no need to have an extra indent.
|
||||
// Without parameterName:
|
||||
//
|
||||
// Input files:
|
||||
// Input files:
|
||||
// a.txt
|
||||
// b.txt
|
||||
//
|
||||
|
|
|
@ -78,8 +78,8 @@ namespace Microsoft.Build.BackEnd
|
|||
public ITaskHost HostObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of property name/value pairs to apply as global properties to
|
||||
/// the child project.
|
||||
/// A list of property name/value pairs to apply as global properties to
|
||||
/// the child project.
|
||||
/// A typical input: "propname1=propvalue1", "propname2=propvalue2", "propname3=propvalue3".
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
|
@ -87,7 +87,7 @@ namespace Microsoft.Build.BackEnd
|
|||
/// <MSBuild
|
||||
/// Properties="TargetPath=@(OutputPathItem)" />
|
||||
/// The engine fails on this because it doesn't like item lists being concatenated with string
|
||||
/// constants when the data is being passed into an array parameter. So the workaround is to
|
||||
/// constants when the data is being passed into an array parameter. So the workaround is to
|
||||
/// write this in the project file:
|
||||
/// <MSBuild
|
||||
/// Properties="@(OutputPathItem->'TargetPath=%(Identity)')" />
|
||||
|
@ -144,7 +144,7 @@ namespace Microsoft.Build.BackEnd
|
|||
public string ToolsVersion { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// When this is true we call the engine with all the projects at once instead of
|
||||
/// When this is true we call the engine with all the projects at once instead of
|
||||
/// calling the engine once per project
|
||||
/// </summary>
|
||||
public bool BuildInParallel { get; set; }
|
||||
|
@ -201,7 +201,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// Un-escape Targets, Properties (including Properties and AdditionalProperties as Project item metadata)
|
||||
/// will be un-escaped before processing. e.g. %3B (an escaped ';') in the string for any of them will
|
||||
/// will be un-escaped before processing. e.g. %3B (an escaped ';') in the string for any of them will
|
||||
/// be treated as if it were an un-escaped ';'
|
||||
/// </summary>
|
||||
public string[] TargetAndPropertyListSeparators { get; set; } = null;
|
||||
|
@ -211,7 +211,7 @@ namespace Microsoft.Build.BackEnd
|
|||
/// <see cref="Projects"/> to build. This only applies to this build request (if another target calls the
|
||||
/// "missing target" later this will still result in an error).
|
||||
/// <remarks>
|
||||
/// This could be useful when implementing a breaking protocol change between projects or stubbing behavior
|
||||
/// This could be useful when implementing a breaking protocol change between projects or stubbing behavior
|
||||
/// which may not make sense in all project types (e.g. Restore).
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
|
@ -264,7 +264,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
bool isRunningMultipleNodes = BuildEngine2.IsRunningMultipleNodes;
|
||||
// If we are in single proc mode and stopOnFirstFailure is true, we cannot build in parallel because
|
||||
// If we are in single proc mode and stopOnFirstFailure is true, we cannot build in parallel because
|
||||
// building in parallel sends all of the projects to the engine at once preventing us from not sending
|
||||
// any more projects after the first failure. Therefore, to preserve compatibility with whidbey if we are in this situation disable buildInParallel.
|
||||
if (!isRunningMultipleNodes && StopOnFirstFailure && BuildInParallel)
|
||||
|
@ -284,8 +284,8 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
// This is a list of string[]. That is, each element in the list is a string[]. Each
|
||||
// string[] represents a set of target names to build. Depending on the value
|
||||
// of the RunEachTargetSeparately parameter, we each just call the engine to run all
|
||||
// string[] represents a set of target names to build. Depending on the value
|
||||
// of the RunEachTargetSeparately parameter, we each just call the engine to run all
|
||||
// the targets together, or we call the engine separately for each target.
|
||||
List<string[]> targetLists = CreateTargetLists(Targets, RunEachTargetSeparately);
|
||||
|
||||
|
@ -321,7 +321,7 @@ namespace Microsoft.Build.BackEnd
|
|||
// Inform the user that we skipped the remaining projects because StopOnFirstFailure=true.
|
||||
Log.LogMessageFromResources(MessageImportance.Low, "MSBuild.SkippingRemainingProjects");
|
||||
|
||||
// We have encountered a failure. Caller has requested that we not
|
||||
// We have encountered a failure. Caller has requested that we not
|
||||
// continue with remaining projects.
|
||||
break;
|
||||
}
|
||||
|
@ -495,8 +495,8 @@ namespace Microsoft.Build.BackEnd
|
|||
bool runEachTargetSeparately)
|
||||
{
|
||||
// This is a list of string[]. That is, each element in the list is a string[]. Each
|
||||
// string[] represents a set of target names to build. Depending on the value
|
||||
// of the RunEachTargetSeparately parameter, we each just call the engine to run all
|
||||
// string[] represents a set of target names to build. Depending on the value
|
||||
// of the RunEachTargetSeparately parameter, we each just call the engine to run all
|
||||
// the targets together, or we call the engine separately for each target.
|
||||
var targetLists = new List<string[]>();
|
||||
if (runEachTargetSeparately && targets?.Length > 0)
|
||||
|
@ -648,12 +648,12 @@ namespace Microsoft.Build.BackEnd
|
|||
// Inform the user that we skipped the remaining targets StopOnFirstFailure=true.
|
||||
log.LogMessageFromResources(MessageImportance.Low, "MSBuild.SkippingRemainingTargets");
|
||||
|
||||
// We have encountered a failure. Caller has requested that we not
|
||||
// We have encountered a failure. Caller has requested that we not
|
||||
// continue with remaining targets.
|
||||
break;
|
||||
}
|
||||
|
||||
// Send the project off to the build engine. By passing in null to the
|
||||
// Send the project off to the build engine. By passing in null to the
|
||||
// first param, we are indicating that the project to build is the same
|
||||
// as the *calling* project file.
|
||||
|
||||
|
@ -677,7 +677,7 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
foreach (ITaskItem outputItemFromTarget in outputItemsFromTarget)
|
||||
{
|
||||
// No need to rebase if the calling project is the same as the callee project
|
||||
// No need to rebase if the calling project is the same as the callee project
|
||||
// (project == null). Also no point in trying to copy item metadata either,
|
||||
// because no items were passed into the Projects parameter!
|
||||
if (projects[i] != null)
|
||||
|
|
|
@ -38,10 +38,10 @@ namespace Microsoft.Build.BackEnd
|
|||
private Lookup _lookup;
|
||||
|
||||
/// <summary>
|
||||
/// When buckets are being created for batching purposes, this indicates which order the
|
||||
/// When buckets are being created for batching purposes, this indicates which order the
|
||||
/// buckets were created in, so that the target/task being batched gets called with the items
|
||||
/// in the same order as they were declared in the project file. For example, the first
|
||||
/// bucket created gets bucketSequenceNumber=0, the second bucket created gets
|
||||
/// bucket created gets bucketSequenceNumber=0, the second bucket created gets
|
||||
/// bucketSequenceNumber=1, etc.
|
||||
/// </summary>
|
||||
private int _bucketSequenceNumber;
|
||||
|
@ -153,10 +153,10 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
|
||||
/// <summary>
|
||||
/// When buckets are being created for batching purposes, this indicates which order the
|
||||
/// When buckets are being created for batching purposes, this indicates which order the
|
||||
/// buckets were created in, so that the target/task being batched gets called with the items
|
||||
/// in the same order as they were declared in the project file. For example, the first
|
||||
/// bucket created gets bucketSequenceNumber=0, the second bucket created gets
|
||||
/// bucket created gets bucketSequenceNumber=0, the second bucket created gets
|
||||
/// bucketSequenceNumber=1, etc.
|
||||
/// </summary>
|
||||
internal int BucketSequenceNumber
|
||||
|
|
|
@ -24,33 +24,33 @@ namespace Microsoft.Build.BackEnd
|
|||
/// - quick lookups
|
||||
/// - scoping down of item subsets in nested scopes (useful for batches)
|
||||
/// - isolation of adds, removes, modifies, and property sets inside nested scopes
|
||||
///
|
||||
///
|
||||
/// When retrieving the item group for an item type, each table is consulted in turn,
|
||||
/// starting with the primary table (the "top" or "innermost" table), until a table is found that has an entry for that type.
|
||||
/// When an entry is found, it is returned without looking deeper.
|
||||
/// This makes it possible to let callers see only a subset of items without affecting or cloning the original item groups,
|
||||
/// by populating a scope with item groups that are empty or contain subsets of items in lower scopes.
|
||||
///
|
||||
///
|
||||
/// Instances of this class can be cloned with Clone() to share between batches.
|
||||
///
|
||||
///
|
||||
/// When EnterScope() is called, a fresh primary table is inserted, and all adds and removes will be invisible to
|
||||
/// any clones made before the scope was entered and anyone who has access to item groups in lower tables.
|
||||
///
|
||||
///
|
||||
/// When LeaveScope() is called, the primary tables are merged into the secondary tables, and the primary tables are discarded.
|
||||
/// This makes the adds and removes in the primary tables visible to clones made during the previous scope.
|
||||
///
|
||||
///
|
||||
/// Scopes can be populated (before Adds, Removes, and Lookups) using PopulateWithItem(). This reduces the set of items of a particular
|
||||
/// type that are visible in a scope, because lookups of items of this type will stop at this level and see the subset, rather than the
|
||||
/// larger set in a scope below.
|
||||
///
|
||||
///
|
||||
/// Items can be added or removed by calling AddNewItem() and RemoveItem(). Only the primary level is modified.
|
||||
/// When items are added or removed they enter into a primary table exclusively for adds or removes, instead of the main primary table.
|
||||
/// This allows the adds and removes to be applied to the scope below on LeaveScope(). Even when LeaveScope() is called, the adds and removes
|
||||
/// stay in their separate add and remove tables: if they were applied to a main table, they could truncate the downward traversal performed by lookups
|
||||
/// and hide items in a lower main table. Only on the final call of LeaveScope() can all adds and removes be applied to the outermost table, i.e., the project.
|
||||
///
|
||||
///
|
||||
/// Much the same applies to properties.
|
||||
///
|
||||
///
|
||||
/// For sensible semantics, only the current primary scope can be modified at any point.
|
||||
/// </summary>
|
||||
internal class Lookup : IPropertyProvider<ProjectPropertyInstance>, IItemProvider<ProjectItemInstance>
|
||||
|
@ -221,7 +221,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
// Set the value of the hash to the new property value
|
||||
// PERF: we store the EvaluatedValueEscaped here to avoid unnecessary unescaping (the value is stored
|
||||
// PERF: we store the EvaluatedValueEscaped here to avoid unnecessary unescaping (the value is stored
|
||||
// escaped in the property)
|
||||
lookupHash[propertyName] = ((IProperty)property).EvaluatedValueEscaped;
|
||||
}
|
||||
|
@ -262,8 +262,8 @@ namespace Microsoft.Build.BackEnd
|
|||
ErrorUtilities.VerifyThrow(_lookupScopes.Count >= 2, "Too many calls to Leave().");
|
||||
ErrorUtilities.VerifyThrow(Object.ReferenceEquals(scopeToLeave, _lookupScopes.First.Value), "Attempting to leave with scope '{0}' but scope '{1}' is on top of the stack.", scopeToLeave.Description, _lookupScopes.First.Value.Description);
|
||||
|
||||
// Our lookup works by stopping the first time it finds an item group of the appropriate type.
|
||||
// So we can't apply an add directly into the table below because that could create a new group
|
||||
// Our lookup works by stopping the first time it finds an item group of the appropriate type.
|
||||
// So we can't apply an add directly into the table below because that could create a new group
|
||||
// of that type, which would cause the next lookup to stop there and miss any existing items in a table below.
|
||||
// Instead we keep adds stored separately until we're leaving the very last scope. Until then
|
||||
// we only move adds down into the next add table below, and when we lookup we consider both tables.
|
||||
|
@ -279,7 +279,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
// Let go of our pointer into the clone table; we assume we won't need it after leaving scope and want to save memory.
|
||||
// This is an assumption on IntrinsicTask, that it won't ask to remove or modify a clone in a higher scope than it was handed out in.
|
||||
// We mustn't call cloneTable.Clear() because other clones of this lookup may still be using it. When the last lookup clone leaves scope,
|
||||
// We mustn't call cloneTable.Clear() because other clones of this lookup may still be using it. When the last lookup clone leaves scope,
|
||||
// the table will be collected.
|
||||
_cloneTable = null;
|
||||
|
||||
|
@ -413,7 +413,7 @@ namespace Microsoft.Build.BackEnd
|
|||
/// </summary>
|
||||
public ProjectPropertyInstance GetProperty(string name, int startIndex, int endIndex)
|
||||
{
|
||||
// Walk down the tables and stop when the first
|
||||
// Walk down the tables and stop when the first
|
||||
// property with this name is found
|
||||
foreach (Scope scope in _lookupScopes)
|
||||
{
|
||||
|
@ -716,8 +716,8 @@ namespace Microsoft.Build.BackEnd
|
|||
PrimaryRemoveTable ??= new ItemDictionary<ProjectItemInstance>();
|
||||
PrimaryRemoveTable.Add(item);
|
||||
|
||||
// No need to remove this item from the primary add table if it's
|
||||
// already there -- we always apply removes after adds, so that add
|
||||
// No need to remove this item from the primary add table if it's
|
||||
// already there -- we always apply removes after adds, so that add
|
||||
// will be reversed anyway.
|
||||
}
|
||||
|
||||
|
@ -731,7 +731,7 @@ namespace Microsoft.Build.BackEnd
|
|||
MustNotBeOuterScope();
|
||||
|
||||
#if DEBUG
|
||||
// This item should not already be in any remove table; there is no way a project can
|
||||
// This item should not already be in any remove table; there is no way a project can
|
||||
// modify items that were already removed
|
||||
// Obviously, do this only in debug, as it's a slow check for bugs.
|
||||
LinkedListNode<Scope> node = _lookupScopes.First;
|
||||
|
@ -912,7 +912,7 @@ namespace Microsoft.Build.BackEnd
|
|||
foreach (var metadataChange in modify.Value.ExplicitModifications)
|
||||
{
|
||||
// If the existing metadata change list has an entry for this metadata, ignore this change.
|
||||
// We continue to allow changes made when KeepOnlySpecified is set because it is assumed that explicit metadata changes
|
||||
// We continue to allow changes made when KeepOnlySpecified is set because it is assumed that explicit metadata changes
|
||||
// always trump implicit ones.
|
||||
if (!existingMetadataChanges.ContainsExplicitModification(metadataChange.Key))
|
||||
{
|
||||
|
@ -960,7 +960,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// Verify item is not in any table in any scope
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
private void MustNotBeInAnyTables(ProjectItemInstance item)
|
||||
{
|
||||
// This item should not already be in any table; there is no way a project can
|
||||
|
@ -1360,8 +1360,8 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// The main table, populated with items that
|
||||
/// are initially visible in this scope. Does not
|
||||
/// include adds or removes unless it's the table in
|
||||
/// are initially visible in this scope. Does not
|
||||
/// include adds or removes unless it's the table in
|
||||
/// the outermost scope.
|
||||
/// </summary>
|
||||
internal ItemDictionary<ProjectItemInstance> Items
|
||||
|
|
|
@ -292,7 +292,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
catch (AggregateException e) when (InnerExceptionsAreAllCancelledExceptions(e))
|
||||
{
|
||||
// ignore -- just indicates that the task finished cancelling before we got a chance to wait on it.
|
||||
// ignore -- just indicates that the task finished cancelling before we got a chance to wait on it.
|
||||
taskCleanedUp = true;
|
||||
}
|
||||
|
||||
|
@ -608,7 +608,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
finally
|
||||
{
|
||||
// If this was the top level submission doing the waiting, we are done with this submission and it's
|
||||
// If this was the top level submission doing the waiting, we are done with this submission and it's
|
||||
// main thread building context
|
||||
if (!recursive)
|
||||
{
|
||||
|
@ -638,10 +638,10 @@ namespace Microsoft.Build.BackEnd
|
|||
_cancellationTokenSource = new CancellationTokenSource();
|
||||
|
||||
// IMPLEMENTATION NOTE: It may look strange that we are creating new tasks here which immediately turn around and create
|
||||
// more tasks that look async. The reason for this is that while these methods are technically async, they really only
|
||||
// more tasks that look async. The reason for this is that while these methods are technically async, they really only
|
||||
// unwind at very specific times according to the needs of MSBuild, in particular when we are waiting for results from
|
||||
// another project or when we are Yielding the Build Engine while running certain tasks. Essentially, the Request Builder
|
||||
// and related components form a giant state machine and the tasks are used to implement one very deep co-routine.
|
||||
// and related components form a giant state machine and the tasks are used to implement one very deep co-routine.
|
||||
if (IsBuilderUsingLegacyThreadingSemantics(_componentHost, _requestEntry))
|
||||
{
|
||||
// Create a task which completes when the legacy threading task thread is finished.
|
||||
|
@ -650,13 +650,13 @@ namespace Microsoft.Build.BackEnd
|
|||
_requestTask = Task.Factory.StartNew(
|
||||
() =>
|
||||
{
|
||||
// If this is a very quick-running request, it is possible that the request will have built and completed in
|
||||
// If this is a very quick-running request, it is possible that the request will have built and completed in
|
||||
// the time between when StartBuilderThread is called, and when the threadpool gets around to actually servicing
|
||||
// this request. If that's the case, it's also possible that ShutdownComponent() could have already been called,
|
||||
// in which case the componentHost will be null.
|
||||
// this request. If that's the case, it's also possible that ShutdownComponent() could have already been called,
|
||||
// in which case the componentHost will be null.
|
||||
|
||||
// In that circumstance, by definition we don't have anyone who will want to wait on the LegacyThreadInactiveEvent
|
||||
// task, so we can safely just return. Take a snapshot so that we don't fall victim to componentHost being set
|
||||
// In that circumstance, by definition we don't have anyone who will want to wait on the LegacyThreadInactiveEvent
|
||||
// task, so we can safely just return. Take a snapshot so that we don't fall victim to componentHost being set
|
||||
// to null between the null check and asking the LegacyThreadingData for the Task.
|
||||
IBuildComponentHost componentHostSnapshot = _componentHost;
|
||||
|
||||
|
@ -678,9 +678,9 @@ namespace Microsoft.Build.BackEnd
|
|||
ErrorUtilities.VerifyThrow(_componentHost.LegacyThreadingData.MainThreadSubmissionId != _requestEntry.Request.SubmissionId, "Can't start builder thread when we are using legacy threading semantics for this request.");
|
||||
|
||||
// We do not run in STA by default. Most code does not
|
||||
// require the STA apartment and the .Net default is to
|
||||
// require the STA apartment and the .Net default is to
|
||||
// create threads with MTA semantics. We provide this
|
||||
// switch so that those few tasks which may require it
|
||||
// switch so that those few tasks which may require it
|
||||
// can be made to work.
|
||||
if (Environment.GetEnvironmentVariable("MSBUILDFORCESTA") == "1")
|
||||
{
|
||||
|
@ -804,7 +804,7 @@ namespace Microsoft.Build.BackEnd
|
|||
BuildResult result = null;
|
||||
VerifyEntryInActiveState();
|
||||
|
||||
// Start the build request
|
||||
// Start the build request
|
||||
try
|
||||
{
|
||||
result = await BuildProject();
|
||||
|
@ -896,7 +896,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
}
|
||||
|
||||
// Clear out our state now in case any of these callbacks cause the engine to try and immediately
|
||||
// Clear out our state now in case any of these callbacks cause the engine to try and immediately
|
||||
// reuse this builder.
|
||||
BuildRequestEntry entryToComplete = _requestEntry;
|
||||
_nodeLoggingContext = null;
|
||||
|
@ -946,13 +946,13 @@ namespace Microsoft.Build.BackEnd
|
|||
SaveOperatingEnvironment();
|
||||
}
|
||||
|
||||
// Issue the requests to the engine
|
||||
// Issue the requests to the engine
|
||||
RaiseOnNewBuildRequests(requests);
|
||||
|
||||
// TODO: OPTIMIZATION: By returning null here, we commit to having to unwind the stack all the
|
||||
// way back to RequestThreadProc and then shutting down the thread before we can receive the
|
||||
// results and continue with them. It is not always the case that this will be desirable, however,
|
||||
// particularly if the results we need are immediately available. In those cases, it would be
|
||||
// particularly if the results we need are immediately available. In those cases, it would be
|
||||
// useful to wait here for a short period in case those results become available - one second
|
||||
// might be enough. This means we may occasionally get more than one builder thread lying around
|
||||
// waiting for something to happen, but that would be short lived. At the same time it would
|
||||
|
@ -1111,8 +1111,8 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
ErrorUtilities.VerifyThrow(_targetBuilder != null, "Target builder is null");
|
||||
|
||||
// Make sure it is null before loading the configuration into the request, because if there is a problem
|
||||
// we do not wand to have an invalid projectLoggingContext floating around. Also if this is null the error will be
|
||||
// Make sure it is null before loading the configuration into the request, because if there is a problem
|
||||
// we do not wand to have an invalid projectLoggingContext floating around. Also if this is null the error will be
|
||||
// logged with the node logging context
|
||||
_projectLoggingContext = null;
|
||||
|
||||
|
|
|
@ -419,8 +419,8 @@ namespace Microsoft.Build.BackEnd
|
|||
"TargetDoesNotExist",
|
||||
currentTargetEntry.Name);
|
||||
|
||||
// If we already have results for this target which were not skipped, we can ignore it. In
|
||||
// addition, we can also ignore its before and after targets -- if this target has already run,
|
||||
// If we already have results for this target which were not skipped, we can ignore it. In
|
||||
// addition, we can also ignore its before and after targets -- if this target has already run,
|
||||
// then so have they.
|
||||
if (!CheckSkipTarget(ref stopProcessingStack, currentTargetEntry))
|
||||
{
|
||||
|
@ -446,7 +446,7 @@ namespace Microsoft.Build.BackEnd
|
|||
IList<TargetSpecification> dependencies = currentTargetEntry.GetDependencies(_projectLoggingContext);
|
||||
|
||||
// Push our before targets now, unconditionally. If we have marked that we should stop processing the stack here, which can only
|
||||
// happen if our current target was supposed to stop processing AND we had no after targets, then our last before target should
|
||||
// happen if our current target was supposed to stop processing AND we had no after targets, then our last before target should
|
||||
// inherit the stop processing flag and we will reset it.
|
||||
// Our parent is the target before which we run, just like a depends-on target.
|
||||
IList<TargetSpecification> beforeTargets = _requestEntry.RequestConfiguration.Project.GetTargetsWhichRunBefore(currentTargetEntry.Name);
|
||||
|
@ -584,11 +584,11 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
TargetEntry topEntry = _targetsToBuild.Pop();
|
||||
|
||||
// If this is a skip because of target failure, we should behave in the same way as we
|
||||
// would if this target actually failed -- remove all its dependencies from the stack as
|
||||
// well. Otherwise, we could encounter a situation where a failure target happens in the
|
||||
// If this is a skip because of target failure, we should behave in the same way as we
|
||||
// would if this target actually failed -- remove all its dependencies from the stack as
|
||||
// well. Otherwise, we could encounter a situation where a failure target happens in the
|
||||
// middle of execution once, then exits, then a request comes through to build the same
|
||||
// targets, reaches that target, skips-already-failed, and then continues building.
|
||||
// targets, reaches that target, skips-already-failed, and then continues building.
|
||||
PopDependencyTargetsOnTargetFailure(topEntry, targetResult, ref stopProcessingStack);
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
if (buildReason == TargetBuiltReason.BeforeTargets || buildReason == TargetBuiltReason.AfterTargets)
|
||||
{
|
||||
// Don't build any Before or After targets for which we already have results. Unlike other targets,
|
||||
// Don't build any Before or After targets for which we already have results. Unlike other targets,
|
||||
// we don't explicitly log a skipped-with-results message because it is not interesting.
|
||||
if (_buildResult.HasResultsForTarget(targetSpecification.TargetName))
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ using ProjectLoggingContext = Microsoft.Build.BackEnd.Logging.ProjectLoggingCont
|
|||
using TargetLoggingContext = Microsoft.Build.BackEnd.Logging.TargetLoggingContext;
|
||||
using TaskItem = Microsoft.Build.Execution.ProjectItemInstance.TaskItem;
|
||||
|
||||
#if MSBUILDENABLEVSPROFILING
|
||||
#if MSBUILDENABLEVSPROFILING
|
||||
using Microsoft.VisualStudio.Profiler;
|
||||
#endif
|
||||
#nullable disable
|
||||
|
@ -507,7 +507,7 @@ namespace Microsoft.Build.BackEnd
|
|||
// We either have some work to do or at least we need to infer outputs from inputs.
|
||||
bucketResult = await ProcessBucket(taskBuilder, targetLoggingContext, GetTaskExecutionMode(dependencyResult), lookupForInference, lookupForExecution);
|
||||
|
||||
// Now aggregate the result with the existing known results. There are four rules, assuming the target was not
|
||||
// Now aggregate the result with the existing known results. There are four rules, assuming the target was not
|
||||
// skipped due to being up-to-date:
|
||||
// 1. If this bucket failed or was cancelled, the aggregate result is failure.
|
||||
// 2. If this bucket Succeeded and we have not previously failed, the aggregate result is a success.
|
||||
|
@ -525,7 +525,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
}
|
||||
|
||||
// Pop the lookup scopes, causing them to collapse their values back down into the
|
||||
// Pop the lookup scopes, causing them to collapse their values back down into the
|
||||
// bucket's lookup.
|
||||
// NOTE: this order is important because when we infer outputs, we are trying
|
||||
// to produce the same results as would be produced from a full build; as such
|
||||
|
@ -557,7 +557,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
finally
|
||||
{
|
||||
// Don't log the last target finished event until we can process the target outputs as we want to attach them to the
|
||||
// Don't log the last target finished event until we can process the target outputs as we want to attach them to the
|
||||
// last target batch.
|
||||
if (targetLoggingContext != null && i < numberOfBuckets - 1)
|
||||
{
|
||||
|
@ -585,13 +585,13 @@ namespace Microsoft.Build.BackEnd
|
|||
string targetReturns = _target.Returns;
|
||||
ElementLocation targetReturnsLocation = _target.ReturnsLocation;
|
||||
|
||||
// If there are no targets in the project file that use the "Returns" attribute, that means that we
|
||||
// If there are no targets in the project file that use the "Returns" attribute, that means that we
|
||||
// revert to the legacy behavior in the case where Returns is not specified (null, rather
|
||||
// than the empty string, which indicates no returns). Legacy behavior is for all
|
||||
// of the target's Outputs to be returned.
|
||||
// On the other hand, if there is at least one target in the file that uses the Returns attribute,
|
||||
// than the empty string, which indicates no returns). Legacy behavior is for all
|
||||
// of the target's Outputs to be returned.
|
||||
// On the other hand, if there is at least one target in the file that uses the Returns attribute,
|
||||
// then all targets in the file are run according to the new behaviour (return nothing unless otherwise
|
||||
// specified by the Returns attribute).
|
||||
// specified by the Returns attribute).
|
||||
if (targetReturns == null)
|
||||
{
|
||||
if (!_target.ParentProjectSupportsReturnsAttribute)
|
||||
|
@ -616,7 +616,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
// NOTE: we need to gather the outputs in batches, because the output specification may reference item metadata
|
||||
// Also, we are using the baseLookup, which has possibly had changes made to it since the project started. Because of this, the
|
||||
// set of outputs calculated here may differ from those which would have been calculated at the beginning of the target. It is
|
||||
// set of outputs calculated here may differ from those which would have been calculated at the beginning of the target. It is
|
||||
// assumed the user intended this.
|
||||
List<ItemBucket> batchingBuckets = BatchingEngine.PrepareBatchingBuckets(GetBatchableParametersForTarget(), _baseLookup, _target.Location);
|
||||
|
||||
|
@ -648,7 +648,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
finally
|
||||
{
|
||||
// log the last target finished since we now have the target outputs.
|
||||
// log the last target finished since we now have the target outputs.
|
||||
targetLoggingContext?.LogTargetBatchFinished(projectFullPath, targetSuccess, targetOutputItems?.Count > 0 ? targetOutputItems : null);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the target name
|
||||
/// Gets or sets the target name
|
||||
/// </summary>
|
||||
public string TargetName => _targetName;
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@ namespace Microsoft.Build.BackEnd
|
|||
using ILoggingService = Microsoft.Build.BackEnd.Logging.ILoggingService;
|
||||
using ItemVectorPartition = System.Collections.Generic.Dictionary<string, System.Collections.Generic.IList<Microsoft.Build.Execution.ProjectItemInstance>>;
|
||||
// ItemVectorPartitionCollection is designed to contains a set of project items which have possibly undergone transforms.
|
||||
// The outer dictionary it usually keyed by item type, so if items originally came from
|
||||
// The outer dictionary it usually keyed by item type, so if items originally came from
|
||||
// an expression like @(Foo), the outer dictionary would have a key of "Foo" in it.
|
||||
// Under that is a dictionary of expressions to items resulting from the expression.
|
||||
// For instance, if items were generated from an expression @(Foo->'%(Filename).obj'), then
|
||||
// the inner dictionary would have a key of "@(Foo->'%(Filename).obj')", in which would be
|
||||
// contained a list of the items which were created/transformed using that pattern.
|
||||
// the inner dictionary would have a key of "@(Foo->'%(Filename).obj')", in which would be
|
||||
// contained a list of the items which were created/transformed using that pattern.
|
||||
using ItemVectorPartitionCollection = System.Collections.Generic.Dictionary<string, System.Collections.Generic.Dictionary<string, System.Collections.Generic.IList<Microsoft.Build.Execution.ProjectItemInstance>>>;
|
||||
|
||||
/// <summary>
|
||||
|
@ -192,14 +192,14 @@ namespace Microsoft.Build.BackEnd
|
|||
* At this point, we know the following:
|
||||
* 1) the target has outputs
|
||||
* 2) the target has NO discrete outputs
|
||||
*
|
||||
*
|
||||
* This implies:
|
||||
* 1) the target only references vectors (incl. transforms) in its outputs
|
||||
* 2) all vectors referenced in the outputs are also referenced in the inputs
|
||||
* 3) the referenced vectors are not empty
|
||||
*
|
||||
*
|
||||
* We can thus conclude: the target MUST have (non-discrete) inputs
|
||||
*
|
||||
*
|
||||
*/
|
||||
ErrorUtilities.VerifyThrow(itemVectorsReferencedInBothTargetInputsAndOutputs.Count > 0, "The target must have inputs.");
|
||||
ErrorUtilities.VerifyThrow(!IsItemVectorEmpty(itemVectorsInTargetInputs), "The target must have inputs.");
|
||||
|
@ -970,7 +970,7 @@ namespace Microsoft.Build.BackEnd
|
|||
// Algorithm: walk through all the outputs to find the oldest output
|
||||
// walk through the inputs as far as we need to until we find one that's newer (if any)
|
||||
|
||||
// PERF -- we could change this to ensure that we walk the shortest list first (because we walk that one entirely):
|
||||
// PERF -- we could change this to ensure that we walk the shortest list first (because we walk that one entirely):
|
||||
// possibly the outputs list isn't actually the shortest list. However it always is the shortest
|
||||
// in the cases I've seen, and adding this optimization would make the code hard to read.
|
||||
|
||||
|
|
|
@ -347,7 +347,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
taskHost?.MarkAsInactive();
|
||||
|
||||
// Now all task batches are done, apply all item adds to the outer
|
||||
// Now all task batches are done, apply all item adds to the outer
|
||||
// target batch; we do this even if the task wasn't found (in that case,
|
||||
// no items or properties will have been added to the scope)
|
||||
if (buckets != null)
|
||||
|
@ -414,14 +414,14 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
// Change to the project root directory.
|
||||
// If that directory does not exist, do nothing. (Do not check first as it is almost always there and it is slow)
|
||||
// This is because if the project has not been saved, this directory may not exist, yet it is often useful to still be able to build the project.
|
||||
// This is because if the project has not been saved, this directory may not exist, yet it is often useful to still be able to build the project.
|
||||
// No errors are masked by doing this: errors loading the project from disk are reported at load time, if necessary.
|
||||
NativeMethodsShared.SetCurrentDirectory(_buildRequestEntry.ProjectRootDirectory);
|
||||
}
|
||||
|
||||
if (howToExecuteTask == TaskExecutionMode.ExecuteTaskAndGatherOutputs)
|
||||
{
|
||||
// We need to find the task before logging the task started event so that the using task statement comes before the task started event
|
||||
// We need to find the task before logging the task started event so that the using task statement comes before the task started event
|
||||
IDictionary<string, string> taskIdentityParameters = GatherTaskIdentityParameters(bucket.Expander);
|
||||
TaskRequirements? requirements = _taskExecutionHost.FindTask(taskIdentityParameters);
|
||||
if (requirements != null)
|
||||
|
@ -519,15 +519,15 @@ namespace Microsoft.Build.BackEnd
|
|||
/// </summary>
|
||||
private IDictionary<string, string> GatherTaskIdentityParameters(Expander<ProjectPropertyInstance, ProjectItemInstance> expander)
|
||||
{
|
||||
ErrorUtilities.VerifyThrowInternalNull(_taskNode, "taskNode"); // taskNode should never be null when we're calling this method.
|
||||
ErrorUtilities.VerifyThrowInternalNull(_taskNode, "taskNode"); // taskNode should never be null when we're calling this method.
|
||||
|
||||
string msbuildArchitecture = expander.ExpandIntoStringAndUnescape(_taskNode.MSBuildArchitecture ?? String.Empty, ExpanderOptions.ExpandAll, _taskNode.MSBuildArchitectureLocation ?? ElementLocation.EmptyLocation);
|
||||
string msbuildRuntime = expander.ExpandIntoStringAndUnescape(_taskNode.MSBuildRuntime ?? String.Empty, ExpanderOptions.ExpandAll, _taskNode.MSBuildRuntimeLocation ?? ElementLocation.EmptyLocation);
|
||||
|
||||
IDictionary<string, string> taskIdentityParameters = null;
|
||||
|
||||
// only bother to create a task identity parameter set if we're putting anything in there -- otherwise,
|
||||
// a null set will be treated as equivalent to all parameters being "don't care".
|
||||
// only bother to create a task identity parameter set if we're putting anything in there -- otherwise,
|
||||
// a null set will be treated as equivalent to all parameters being "don't care".
|
||||
if (msbuildRuntime != String.Empty || msbuildArchitecture != String.Empty)
|
||||
{
|
||||
taskIdentityParameters = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
@ -825,7 +825,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
// Set the property "MSBuildLastTaskResult" to reflect whether the task succeeded or not.
|
||||
// The main use of this is if ContinueOnError is true -- so that the next task can consult the result.
|
||||
// So we want it to be "false" even if ContinueOnError is true.
|
||||
// So we want it to be "false" even if ContinueOnError is true.
|
||||
// The constants "true" and "false" should NOT be localized. They become property values.
|
||||
bucket.Lookup.SetProperty(ProjectPropertyInstance.Create(ReservedPropertyNames.lastTaskResult, taskResult ? "true" : "false", true/* may be reserved */, _buildRequestEntry.RequestConfiguration.Project.IsImmutable));
|
||||
}
|
||||
|
@ -894,7 +894,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
else if (type == typeof(Exception) || type.GetTypeInfo().IsSubclassOf(typeof(Exception)))
|
||||
{
|
||||
// Occasionally, when debugging a very uncommon task exception, it is useful to loop the build with
|
||||
// Occasionally, when debugging a very uncommon task exception, it is useful to loop the build with
|
||||
// a debugger attached to break on 2nd chance exceptions.
|
||||
// That requires that there needs to be a way to not catch here, by setting an environment variable.
|
||||
if (ExceptionHandling.IsCriticalException(taskException) || (Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1"))
|
||||
|
|
|
@ -427,8 +427,8 @@ namespace Microsoft.Build.BackEnd
|
|||
return;
|
||||
}
|
||||
|
||||
// If we are in building across process we need the events to be serializable. This method will
|
||||
// check to see if we are building with multiple process and if the event is serializable. It will
|
||||
// If we are in building across process we need the events to be serializable. This method will
|
||||
// check to see if we are building with multiple process and if the event is serializable. It will
|
||||
// also log a warning if the event is not serializable and drop the logging message.
|
||||
if (IsRunningMultipleNodes && !IsEventSerializable(e))
|
||||
{
|
||||
|
@ -437,7 +437,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
if (_convertErrorsToWarnings)
|
||||
{
|
||||
// Convert the error into a warning. We do this because the whole point of
|
||||
// Convert the error into a warning. We do this because the whole point of
|
||||
// ContinueOnError is that a project author expects that the task might fail,
|
||||
// but wants to ignore the failures. This implies that we shouldn't be logging
|
||||
// errors either, because you should never have a successful build with errors.
|
||||
|
@ -497,8 +497,8 @@ namespace Microsoft.Build.BackEnd
|
|||
return;
|
||||
}
|
||||
|
||||
// If we are in building across process we need the events to be serializable. This method will
|
||||
// check to see if we are building with multiple process and if the event is serializable. It will
|
||||
// If we are in building across process we need the events to be serializable. This method will
|
||||
// check to see if we are building with multiple process and if the event is serializable. It will
|
||||
// also log a warning if the event is not serializable and drop the logging message.
|
||||
if (IsRunningMultipleNodes && !IsEventSerializable(e))
|
||||
{
|
||||
|
@ -538,8 +538,8 @@ namespace Microsoft.Build.BackEnd
|
|||
return;
|
||||
}
|
||||
|
||||
// If we are in building across process we need the events to be serializable. This method will
|
||||
// check to see if we are building with multiple process and if the event is serializable. It will
|
||||
// If we are in building across process we need the events to be serializable. This method will
|
||||
// check to see if we are building with multiple process and if the event is serializable. It will
|
||||
// also log a warning if the event is not serializable and drop the logging message.
|
||||
if (IsRunningMultipleNodes && !IsEventSerializable(e))
|
||||
{
|
||||
|
@ -579,8 +579,8 @@ namespace Microsoft.Build.BackEnd
|
|||
return;
|
||||
}
|
||||
|
||||
// If we are in building across process we need the events to be serializable. This method will
|
||||
// check to see if we are building with multiple process and if the event is serializable. It will
|
||||
// If we are in building across process we need the events to be serializable. This method will
|
||||
// check to see if we are building with multiple process and if the event is serializable. It will
|
||||
// also log a warning if the event is not serializable and drop the logging message.
|
||||
if (IsRunningMultipleNodes && !IsEventSerializable(e))
|
||||
{
|
||||
|
@ -1023,7 +1023,7 @@ namespace Microsoft.Build.BackEnd
|
|||
ILease lease = (ILease)base.InitializeLifetimeService();
|
||||
|
||||
// Set how long a lease should be initially. Once a lease expires
|
||||
// the remote object will be disconnected and it will be marked as being availiable
|
||||
// the remote object will be disconnected and it will be marked as being availiable
|
||||
// for garbage collection
|
||||
int initialLeaseTime = 1;
|
||||
|
||||
|
@ -1045,7 +1045,7 @@ namespace Microsoft.Build.BackEnd
|
|||
// increase the lease time allowing the object to stay in memory
|
||||
_sponsor = new ClientSponsor();
|
||||
|
||||
// When a new lease is requested lets make it last 1 minutes longer.
|
||||
// When a new lease is requested lets make it last 1 minutes longer.
|
||||
int leaseExtensionTime = 1;
|
||||
|
||||
string leaseExtensionTimeFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDENGINEPROXYLEASEEXTENSIONTIME");
|
||||
|
@ -1082,7 +1082,7 @@ namespace Microsoft.Build.BackEnd
|
|||
ReleaseAllCores();
|
||||
|
||||
// Since the task has a pointer to this class it may store it in a static field. Null out
|
||||
// internal data so the leak of this object doesn't lead to a major memory leak.
|
||||
// internal data so the leak of this object doesn't lead to a major memory leak.
|
||||
_host = null;
|
||||
_requestEntry = null;
|
||||
|
||||
|
@ -1174,7 +1174,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
else
|
||||
{
|
||||
// UNDONE: (Refactor) Investigate making this a ReadOnly collection of some sort.
|
||||
// UNDONE: (Refactor) Investigate making this a ReadOnly collection of some sort.
|
||||
PropertyDictionary<ProjectPropertyInstance>[] propertyDictionaries = new PropertyDictionary<ProjectPropertyInstance>[projectFileNames.Length];
|
||||
|
||||
for (int i = 0; i < projectFileNames.Length; i++)
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace Microsoft.Build.BackEnd
|
|||
Blocked,
|
||||
|
||||
/// <summary>
|
||||
/// This request has yielded control of the node while it is running a long-running out-of-process program. Any number of tasks on a
|
||||
/// This request has yielded control of the node while it is running a long-running out-of-process program. Any number of tasks on a
|
||||
/// node may be in the yielding state.
|
||||
/// </summary>
|
||||
Yielding,
|
||||
|
@ -506,15 +506,15 @@ namespace Microsoft.Build.BackEnd
|
|||
/// of it having been previously scheduled in a multiproc scenario, but before this request was able to execute.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Let A be 'this' project and B be 'blockingRequest' (the request which is going to block A.)
|
||||
/// An indirect circular dependency exists if there is a dependency path from B to A. If there is no
|
||||
/// existing blocked request B' with the same global request id as B, then there can be no path from B to A because B is a brand new
|
||||
/// request with no other dependencies. If there is an existing blocked request B' with the same global request ID as B, then we
|
||||
/// Let A be 'this' project and B be 'blockingRequest' (the request which is going to block A.)
|
||||
/// An indirect circular dependency exists if there is a dependency path from B to A. If there is no
|
||||
/// existing blocked request B' with the same global request id as B, then there can be no path from B to A because B is a brand new
|
||||
/// request with no other dependencies. If there is an existing blocked request B' with the same global request ID as B, then we
|
||||
/// walk the set of dependencies recursively searching for A. If A is found, we have a circular dependency.
|
||||
/// </remarks>
|
||||
private void DetectIndirectCircularDependency(SchedulableRequest blockingRequest)
|
||||
{
|
||||
// If there is already a blocked request which has the same configuration id as the blocking request and that blocked request is (recursively)
|
||||
// If there is already a blocked request which has the same configuration id as the blocking request and that blocked request is (recursively)
|
||||
// waiting on this request, then that is an indirect circular dependency.
|
||||
SchedulableRequest alternateRequest = _schedulingData.GetBlockedRequestIfAny(blockingRequest.BuildRequest.GlobalRequestId);
|
||||
if (alternateRequest == null)
|
||||
|
@ -539,7 +539,7 @@ namespace Microsoft.Build.BackEnd
|
|||
evaluatedRequests.Add(requestToEvaluate);
|
||||
|
||||
// If the request is not scheduled, it's possible that is because it's been scheduled elsewhere and is blocked.
|
||||
// Follow that path if it exists.
|
||||
// Follow that path if it exists.
|
||||
if (requestToEvaluate.State == SchedulableRequestState.Unscheduled)
|
||||
{
|
||||
requestToEvaluate = _schedulingData.GetBlockedRequestIfAny(requestToEvaluate.BuildRequest.GlobalRequestId);
|
||||
|
@ -567,7 +567,7 @@ namespace Microsoft.Build.BackEnd
|
|||
/// </summary>
|
||||
private void ThrowIndirectCircularDependency(SchedulableRequest blockingRequest, SchedulableRequest requestToEvaluate)
|
||||
{
|
||||
// We found a request which has the same global request ID as us in a chain which leads from the (already blocked) request
|
||||
// We found a request which has the same global request ID as us in a chain which leads from the (already blocked) request
|
||||
// which is trying to block us. Calculate its list of ancestors by walking up the parent list.
|
||||
List<SchedulableRequest> ancestors = new List<SchedulableRequest>(16);
|
||||
while (requestToEvaluate.Parent != null)
|
||||
|
@ -585,7 +585,7 @@ namespace Microsoft.Build.BackEnd
|
|||
/// </summary>
|
||||
private void DetectDirectCircularDependency(SchedulableRequest blockingRequest)
|
||||
{
|
||||
// A circular dependency occurs when this project (or any of its ancestors) has the same global request id as the
|
||||
// A circular dependency occurs when this project (or any of its ancestors) has the same global request id as the
|
||||
// blocking request.
|
||||
List<SchedulableRequest> ancestors = new List<SchedulableRequest>(16);
|
||||
SchedulableRequest currentRequest = this;
|
||||
|
@ -644,7 +644,7 @@ namespace Microsoft.Build.BackEnd
|
|||
_requestsWeAreBlockedBy.Remove(blockingRequestKey);
|
||||
unblockingRequest._requestsWeAreBlocking.Remove(this);
|
||||
|
||||
// If the request we are blocked by also happens to be unscheduled, remove it as well so we don't try to run it later. This is
|
||||
// If the request we are blocked by also happens to be unscheduled, remove it as well so we don't try to run it later. This is
|
||||
// because circular dependency errors cause us to fail all outstanding requests on the current request. See BuildRequsetEntry.ReportResult.
|
||||
if (unblockingRequest.State == SchedulableRequestState.Unscheduled)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace Microsoft.Build.BackEnd
|
|||
Schedule,
|
||||
|
||||
/// <summary>
|
||||
/// The response indicates that the request should be send to the specified node,
|
||||
/// The response indicates that the request should be send to the specified node,
|
||||
/// along with the configuration for the request.
|
||||
/// </summary>
|
||||
ScheduleWithConfiguration,
|
||||
|
|
|
@ -332,7 +332,7 @@ namespace Microsoft.Build.BackEnd
|
|||
else if ((blocker.BlockingRequestId == blocker.BlockedRequestId) && blocker.BlockingRequestId != BuildRequest.InvalidGlobalRequestId)
|
||||
{
|
||||
ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target");
|
||||
// We are blocked waiting for a transfer of results.
|
||||
// We are blocked waiting for a transfer of results.
|
||||
HandleRequestBlockedOnResultsTransfer(parentRequest, responses);
|
||||
}
|
||||
else if (blocker.BlockingRequestId != BuildRequest.InvalidGlobalRequestId)
|
||||
|
@ -363,7 +363,7 @@ namespace Microsoft.Build.BackEnd
|
|||
responses.Add(ScheduleResponse.CreateCircularDependencyResponse(nodeId, parentRequest.BuildRequest, ex.Request));
|
||||
}
|
||||
|
||||
// Now see if we can schedule requests somewhere since we
|
||||
// Now see if we can schedule requests somewhere since we
|
||||
// a) have a new request; and
|
||||
// b) have a node which is now waiting and not doing anything.
|
||||
ScheduleUnassignedRequests(responses);
|
||||
|
@ -382,7 +382,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
if (result.NodeRequestId == BuildRequest.ResultsTransferNodeRequestId)
|
||||
{
|
||||
// We are transferring results. The node to which they should be sent has already been recorded by the
|
||||
// We are transferring results. The node to which they should be sent has already been recorded by the
|
||||
// HandleRequestBlockedOnResultsTransfer method in the configuration.
|
||||
BuildRequestConfiguration config = _configCache[result.ConfigurationId];
|
||||
ScheduleResponse response = ScheduleResponse.CreateReportResultResponse(config.ResultsNodeId, result);
|
||||
|
@ -394,7 +394,7 @@ namespace Microsoft.Build.BackEnd
|
|||
SchedulableRequest request = _schedulingData.GetExecutingRequest(result.GlobalRequestId);
|
||||
request.Complete(result);
|
||||
|
||||
// Report results to our parent, or report submission complete as necessary.
|
||||
// Report results to our parent, or report submission complete as necessary.
|
||||
if (request.Parent != null)
|
||||
{
|
||||
// responses.Add(new ScheduleResponse(request.Parent.AssignedNode, new BuildRequestUnblocker(request.Parent.BuildRequest.GlobalRequestId, result)));
|
||||
|
@ -402,10 +402,10 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
// When adding the result to the cache we merge the result with what ever is already in the cache this may cause
|
||||
// the result to have more target outputs in it than was was requested. To fix this we can ask the cache itself for the result we just added.
|
||||
// When results are returned from the cache we filter them based on the targets we requested. This causes our result to only
|
||||
// When results are returned from the cache we filter them based on the targets we requested. This causes our result to only
|
||||
// include the targets we requested rather than the merged result.
|
||||
|
||||
// Note: In this case we do not need to log that we got the results from the cache because we are only using the cache
|
||||
// Note: In this case we do not need to log that we got the results from the cache because we are only using the cache
|
||||
// for filtering the targets for the result instead rather than using the cache as the location where this result came from.
|
||||
ScheduleResponse response = TrySatisfyRequestFromCache(request.Parent.AssignedNode, request.BuildRequest, skippedResultsDoNotCauseCacheMiss: _componentHost.BuildParameters.SkippedResultsDoNotCauseCacheMiss());
|
||||
|
||||
|
@ -443,13 +443,13 @@ namespace Microsoft.Build.BackEnd
|
|||
int parentNode = (unscheduledRequest.Parent == null) ? InvalidNodeId : unscheduledRequest.Parent.AssignedNode;
|
||||
|
||||
// There are other requests which we can satisfy based on this result, lets pull the result out of the cache
|
||||
// and satisfy those requests. Normally a skipped result would lead to the cache refusing to satisfy the
|
||||
// request, because the correct response in that case would be to attempt to rebuild the target in case there
|
||||
// and satisfy those requests. Normally a skipped result would lead to the cache refusing to satisfy the
|
||||
// request, because the correct response in that case would be to attempt to rebuild the target in case there
|
||||
// are state changes that would cause it to now excute. At this point, however, we already know that the parent
|
||||
// request has completed, and we already know that this request has the same global request ID, which means that
|
||||
// its configuration and set of targets are identical -- from MSBuild's perspective, it's the same. So since
|
||||
// we're not going to attempt to re-execute it, if there are skipped targets in the result, that's fine. We just
|
||||
// need to know what the target results are so that we can log them.
|
||||
// request has completed, and we already know that this request has the same global request ID, which means that
|
||||
// its configuration and set of targets are identical -- from MSBuild's perspective, it's the same. So since
|
||||
// we're not going to attempt to re-execute it, if there are skipped targets in the result, that's fine. We just
|
||||
// need to know what the target results are so that we can log them.
|
||||
ScheduleResponse response = TrySatisfyRequestFromCache(parentNode, unscheduledRequest.BuildRequest, skippedResultsDoNotCauseCacheMiss: true);
|
||||
|
||||
// If we have a response we need to tell the loggers that we satisified that request from the cache.
|
||||
|
@ -459,8 +459,8 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
else
|
||||
{
|
||||
// Response may be null if the result was never added to the cache. This can happen if the result has
|
||||
// an exception in it. If that is the case, we should report the result directly so that the
|
||||
// Response may be null if the result was never added to the cache. This can happen if the result has
|
||||
// an exception in it. If that is the case, we should report the result directly so that the
|
||||
// build manager knows that it needs to shut down logging manually.
|
||||
response = GetResponseForResult(parentNode, unscheduledRequest.BuildRequest, newResult.Clone());
|
||||
}
|
||||
|
@ -521,7 +521,7 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
_schedulingData.EventTime = DateTime.UtcNow;
|
||||
|
||||
// Get the list of build requests currently assigned to the node and report aborted results for them.
|
||||
// Get the list of build requests currently assigned to the node and report aborted results for them.
|
||||
TraceScheduler("Build aborted by node {0}", nodeId);
|
||||
|
||||
foreach (SchedulableRequest request in _schedulingData.GetScheduledRequestsByNode(nodeId))
|
||||
|
@ -741,15 +741,15 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
else if (_schedulingData.BlockedRequestsCount != 0)
|
||||
{
|
||||
// It is legitimate to have blocked requests with none executing if none of the requests can
|
||||
// be serviced by any currently existing node, or if they are blocked by requests, none of
|
||||
// which can be serviced by any currently existing node. However, in that case, we had better
|
||||
// be requesting the creation of a node that can service them.
|
||||
// It is legitimate to have blocked requests with none executing if none of the requests can
|
||||
// be serviced by any currently existing node, or if they are blocked by requests, none of
|
||||
// which can be serviced by any currently existing node. However, in that case, we had better
|
||||
// be requesting the creation of a node that can service them.
|
||||
//
|
||||
// Note: This is O(# nodes * closure of requests blocking current set of blocked requests),
|
||||
// but all three numbers should usually be fairly small and, more importantly, this situation
|
||||
// should occur at most once per build, since it requires a situation where all blocked requests
|
||||
// are blocked on the creation of a node that can service them.
|
||||
// Note: This is O(# nodes * closure of requests blocking current set of blocked requests),
|
||||
// but all three numbers should usually be fairly small and, more importantly, this situation
|
||||
// should occur at most once per build, since it requires a situation where all blocked requests
|
||||
// are blocked on the creation of a node that can service them.
|
||||
foreach (SchedulableRequest request in _schedulingData.BlockedRequests)
|
||||
{
|
||||
if (RequestOrAnyItIsBlockedByCanBeServiced(request))
|
||||
|
@ -857,7 +857,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
if (!String.IsNullOrEmpty(customScheduler))
|
||||
{
|
||||
// Assign to the delegate
|
||||
// Assign to the delegate
|
||||
if (customScheduler.Equals("WithPlanByMostImmediateReferences", StringComparison.OrdinalIgnoreCase) && _schedulingPlan.IsPlanValid)
|
||||
{
|
||||
_customRequestSchedulingAlgorithm = AssignUnscheduledRequestsWithPlanByMostImmediateReferences;
|
||||
|
@ -1156,7 +1156,7 @@ namespace Microsoft.Build.BackEnd
|
|||
BuildRequest currentRequest = currentSchedulableRequest.BuildRequest;
|
||||
int requiredNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(currentRequest.ConfigurationId);
|
||||
|
||||
// This performs the depth-first traversal, assuming that the unassigned build requests has been populated such that the
|
||||
// This performs the depth-first traversal, assuming that the unassigned build requests has been populated such that the
|
||||
// top-most requests are the ones most recently issued. We schedule the first request which can be scheduled to this node.
|
||||
if (requiredNodeId == InvalidNodeId || requiredNodeId == nodeId)
|
||||
{
|
||||
|
@ -1290,7 +1290,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
Dictionary<int, int> configurationCountsByNode = new Dictionary<int, int>(_availableNodes.Count);
|
||||
|
||||
// The configuration count limit will be the average configuration count * X (to allow for some wiggle room) where
|
||||
// The configuration count limit will be the average configuration count * X (to allow for some wiggle room) where
|
||||
// the default value of X is 1.1 (+ 10%)
|
||||
int configurationCountLimit = 0;
|
||||
|
||||
|
@ -1329,8 +1329,8 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
int requiredNodeId = _schedulingData.GetAssignedNodeForRequestConfiguration(request.BuildRequest.ConfigurationId);
|
||||
|
||||
// Only schedule an entirely new configuration (one not already tied to this node) to this node if we're
|
||||
// not already over the limit needed to keep a reasonable balance.
|
||||
// Only schedule an entirely new configuration (one not already tied to this node) to this node if we're
|
||||
// not already over the limit needed to keep a reasonable balance.
|
||||
if (request.AssignedNode == nodeId || requiredNodeId == nodeId || configurationCountsByNode[nodeId] <= configurationCountLimit)
|
||||
{
|
||||
AssignUnscheduledRequestToNode(request, nodeId, responses);
|
||||
|
@ -1345,8 +1345,8 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
}
|
||||
|
||||
// at this point, we may still have work left unassigned, but that's OK -- we're deliberately choosing to delay assigning all available
|
||||
// requests in order to avoid overloading certain nodes with excess numbers of requests.
|
||||
// at this point, we may still have work left unassigned, but that's OK -- we're deliberately choosing to delay assigning all available
|
||||
// requests in order to avoid overloading certain nodes with excess numbers of requests.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1423,7 +1423,7 @@ namespace Microsoft.Build.BackEnd
|
|||
return false;
|
||||
}
|
||||
|
||||
// We're at our limit of schedulable requests if:
|
||||
// We're at our limit of schedulable requests if:
|
||||
// (1) MaxNodeCount requests are currently executing
|
||||
if (_schedulingData.ExecutingRequestsCount >= _componentHost.BuildParameters.MaxNodeCount)
|
||||
{
|
||||
|
@ -1485,9 +1485,9 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
int assignedNodeForConfiguration = _schedulingData.GetAssignedNodeForRequestConfiguration(request.BuildRequest.ConfigurationId);
|
||||
|
||||
// Although this request has not been scheduled, this configuration may previously have been
|
||||
// scheduled to an existing node. If so, we shouldn't count it in our checks for new node
|
||||
// creation, because it'll only eventually get assigned to its existing node anyway.
|
||||
// Although this request has not been scheduled, this configuration may previously have been
|
||||
// scheduled to an existing node. If so, we shouldn't count it in our checks for new node
|
||||
// creation, because it'll only eventually get assigned to its existing node anyway.
|
||||
if (assignedNodeForConfiguration != Scheduler.InvalidNodeId)
|
||||
{
|
||||
continue;
|
||||
|
@ -1500,9 +1500,9 @@ namespace Microsoft.Build.BackEnd
|
|||
case NodeAffinity.InProc:
|
||||
inProcNodesToCreate++;
|
||||
|
||||
// If we've previously seen "Any"-affinitized requests, now that there are some
|
||||
// genuine inproc requests, they get to play with the inproc node first, so
|
||||
// push the "Any" requests to the out-of-proc nodes.
|
||||
// If we've previously seen "Any"-affinitized requests, now that there are some
|
||||
// genuine inproc requests, they get to play with the inproc node first, so
|
||||
// push the "Any" requests to the out-of-proc nodes.
|
||||
if (requestsWithAnyAffinityOnInProcNodes > 0)
|
||||
{
|
||||
requestsWithAnyAffinityOnInProcNodes--;
|
||||
|
@ -1539,7 +1539,7 @@ namespace Microsoft.Build.BackEnd
|
|||
break;
|
||||
}
|
||||
|
||||
// We've already hit the limit of the number of nodes we'll be allowed to create, so just quit counting now.
|
||||
// We've already hit the limit of the number of nodes we'll be allowed to create, so just quit counting now.
|
||||
if (inProcNodesToCreate >= availableNodesWithInProcAffinity && outOfProcNodesToCreate >= availableNodesWithOutOfProcAffinity)
|
||||
{
|
||||
break;
|
||||
|
@ -1549,7 +1549,7 @@ namespace Microsoft.Build.BackEnd
|
|||
// If we think we want to create inproc nodes
|
||||
if (inProcNodesToCreate > 0)
|
||||
{
|
||||
// In-proc node determination is simple: we want as many as are available.
|
||||
// In-proc node determination is simple: we want as many as are available.
|
||||
inProcNodesToCreate = Math.Min(availableNodesWithInProcAffinity, inProcNodesToCreate);
|
||||
|
||||
// If we still want to create one, go ahead
|
||||
|
@ -1559,8 +1559,8 @@ namespace Microsoft.Build.BackEnd
|
|||
TraceScheduler("Requesting creation of new node satisfying affinity {0}", NodeAffinity.InProc);
|
||||
responses.Add(ScheduleResponse.CreateNewNodeResponse(NodeAffinity.InProc, 1));
|
||||
|
||||
// We only want to submit one node creation request at a time -- as part of node creation we recursively re-request the scheduler
|
||||
// to do more scheduling, so the other request will be dealt with soon enough.
|
||||
// We only want to submit one node creation request at a time -- as part of node creation we recursively re-request the scheduler
|
||||
// to do more scheduling, so the other request will be dealt with soon enough.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1568,17 +1568,17 @@ namespace Microsoft.Build.BackEnd
|
|||
// If we think we want to create out-of-proc nodes
|
||||
if (outOfProcNodesToCreate > 0)
|
||||
{
|
||||
// Out-of-proc node determination is a bit more complicated. If we have N out-of-proc requests, we want to
|
||||
// fill up to N out-of-proc nodes. However, if we have N "any" requests, we must assume that at least some of them
|
||||
// will be fulfilled by the inproc node, in which case we only want to launch up to N-1 out-of-proc nodes, for a
|
||||
// total of N nodes overall -- the scheduler will only schedule to N nodes at a time, so launching any more than that
|
||||
// is ultimately pointless.
|
||||
// Out-of-proc node determination is a bit more complicated. If we have N out-of-proc requests, we want to
|
||||
// fill up to N out-of-proc nodes. However, if we have N "any" requests, we must assume that at least some of them
|
||||
// will be fulfilled by the inproc node, in which case we only want to launch up to N-1 out-of-proc nodes, for a
|
||||
// total of N nodes overall -- the scheduler will only schedule to N nodes at a time, so launching any more than that
|
||||
// is ultimately pointless.
|
||||
int maxCreatableOutOfProcNodes = availableNodesWithOutOfProcAffinity;
|
||||
|
||||
if (requestsWithOutOfProcAffinity < availableNodesWithOutOfProcAffinity)
|
||||
{
|
||||
// We don't have enough explicitly out-of-proc requests to justify creating every technically allowed
|
||||
// out-of-proc node, so our max is actually one less than the absolute max for the reasons explained above.
|
||||
// We don't have enough explicitly out-of-proc requests to justify creating every technically allowed
|
||||
// out-of-proc node, so our max is actually one less than the absolute max for the reasons explained above.
|
||||
maxCreatableOutOfProcNodes--;
|
||||
}
|
||||
|
||||
|
@ -1591,12 +1591,12 @@ namespace Microsoft.Build.BackEnd
|
|||
responses.Add(ScheduleResponse.CreateNewNodeResponse(NodeAffinity.OutOfProc, outOfProcNodesToCreate));
|
||||
}
|
||||
|
||||
// We only want to submit one node creation request at a time -- as part of node creation we recursively re-request the scheduler
|
||||
// to do more scheduling, so the other request will be dealt with soon enough.
|
||||
// We only want to submit one node creation request at a time -- as part of node creation we recursively re-request the scheduler
|
||||
// to do more scheduling, so the other request will be dealt with soon enough.
|
||||
return true;
|
||||
}
|
||||
|
||||
// If we haven't returned before now, we haven't asked that any new nodes be created.
|
||||
// If we haven't returned before now, we haven't asked that any new nodes be created.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1661,14 +1661,14 @@ namespace Microsoft.Build.BackEnd
|
|||
// we will update the storage location in the configuration. This is doing a bit of a run around the scheduler - we don't
|
||||
// create a new formal request, so we treat the blocked request as if it is still executing - this prevents any other requests
|
||||
// from getting onto that node and also means we don't have to do additional work to get the scheduler to understand the bizarre
|
||||
// case of sending a request for results from a project's own configuration (which it believes reside on the very node which
|
||||
// case of sending a request for results from a project's own configuration (which it believes reside on the very node which
|
||||
// is actually requesting the results in the first place.)
|
||||
BuildRequestConfiguration configuration = _configCache[parentRequest.BuildRequest.ConfigurationId];
|
||||
responses.Add(ScheduleResponse.CreateScheduleResponse(configuration.ResultsNodeId, newRequest, false));
|
||||
|
||||
TraceScheduler("Created request {0} (node request {1}) for transfer of configuration {2}'s results from node {3} to node {4}", newRequest.GlobalRequestId, newRequest.NodeRequestId, configuration.ConfigurationId, configuration.ResultsNodeId, parentRequest.AssignedNode);
|
||||
|
||||
// The configuration's results will now be homed at the new location (once they have come back from the
|
||||
// The configuration's results will now be homed at the new location (once they have come back from the
|
||||
// original node.)
|
||||
configuration.ResultsNodeId = parentRequest.AssignedNode;
|
||||
}
|
||||
|
@ -1870,7 +1870,7 @@ namespace Microsoft.Build.BackEnd
|
|||
responses.Add(response);
|
||||
}
|
||||
|
||||
// Is the node we are reporting to idle? If so, does reporting this result allow it to proceed with work?
|
||||
// Is the node we are reporting to idle? If so, does reporting this result allow it to proceed with work?
|
||||
if (!_schedulingData.IsNodeWorking(response.NodeId))
|
||||
{
|
||||
ResumeReadyRequestIfAny(response.NodeId, responses);
|
||||
|
@ -2104,7 +2104,7 @@ namespace Microsoft.Build.BackEnd
|
|||
/// </summary>
|
||||
private ScheduleResponse GetResponseForResult(int parentRequestNode, BuildRequest requestWhichGeneratedResult, BuildResult result)
|
||||
{
|
||||
// We have results, return them to the originating node, or if it is a root request, mark the submission complete.
|
||||
// We have results, return them to the originating node, or if it is a root request, mark the submission complete.
|
||||
if (requestWhichGeneratedResult.IsRootRequest)
|
||||
{
|
||||
// return new ScheduleResponse(result);
|
||||
|
@ -2223,9 +2223,9 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
}
|
||||
|
||||
// if none of the requests we are blocked by can be serviced, it doesn't matter
|
||||
// whether we can be serviced or not -- the reason we're blocked is because none
|
||||
// of the requests we are blocked by can be serviced.
|
||||
// if none of the requests we are blocked by can be serviced, it doesn't matter
|
||||
// whether we can be serviced or not -- the reason we're blocked is because none
|
||||
// of the requests we are blocked by can be serviced.
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -605,7 +605,7 @@ namespace Microsoft.Build.BackEnd
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a set of build requests which have the specified parent. If root is null, this will retrieve all of the
|
||||
/// Retrieves a set of build requests which have the specified parent. If root is null, this will retrieve all of the
|
||||
/// top-level requests.
|
||||
/// </summary>
|
||||
public IEnumerable<SchedulableRequest> GetRequestsByHierarchy(SchedulableRequest root)
|
||||
|
|
|
@ -462,7 +462,7 @@ namespace Microsoft.Build.BackEnd
|
|||
{
|
||||
double accumulatedTime;
|
||||
|
||||
// NOTE: Do we want to count it each time the config appears in the hierarchy? This will inflate the
|
||||
// NOTE: Do we want to count it each time the config appears in the hierarchy? This will inflate the
|
||||
// cost of frequently referenced configurations.
|
||||
accumulatedTimeByConfiguration.TryGetValue(request.BuildRequest.ConfigurationId, out accumulatedTime);
|
||||
accumulatedTimeByConfiguration[request.BuildRequest.ConfigurationId] = accumulatedTime + request.GetTimeSpentInState(SchedulableRequestState.Executing).TotalMilliseconds;
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Microsoft.Build.BackEnd.SdkResolution
|
|||
/// sends requests to the main node that SDK resolution is handled in a central location. This instance is registered in <see cref="Microsoft.Build.Execution.OutOfProcNode"/>
|
||||
/// using a factory so that parameters can be passed to the constructor. This service caches responses for a given build so that it can avoid sending
|
||||
/// a packet where possible. The cache is always in effect here because the out-of-proc node is only used for builds.
|
||||
///
|
||||
///
|
||||
/// Since this object is a registered <see cref="IBuildComponent"/>, it is a singleton for the main process. To get an instance of it, you
|
||||
/// must have access to an <see cref="IBuildComponentHost"/> and call <see cref="IBuildComponentHost.GetComponent"/> and pass <see cref="BuildComponentType.SdkResolverService"/>.
|
||||
/// </summary>
|
||||
|
|
|
@ -8,7 +8,7 @@ using System;
|
|||
namespace Microsoft.Build.BackEnd.SdkResolution
|
||||
{
|
||||
/// <summary>
|
||||
/// A factory used when creating a <see cref="OutOfProcNodeSdkResolverService"/> which can pass parameters to its constructor. Our
|
||||
/// A factory used when creating a <see cref="OutOfProcNodeSdkResolverService"/> which can pass parameters to its constructor. Our
|
||||
/// dependency inject cannot pass parameters to constructors so this factory is used as a middle man.
|
||||
/// </summary>
|
||||
internal sealed class OutOfProcNodeSdkResolverServiceFactory
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace Microsoft.Build.BackEnd.SdkResolution
|
|||
public string Path { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Regex which matches all the sdk names that could be resolved by the resolvers associated with given manifest.
|
||||
/// Regex which matches all the sdk names that could be resolved by the resolvers associated with given manifest.
|
||||
/// </summary>
|
||||
public Regex ResolvableSdkRegex { get; private set; }
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ namespace Microsoft.Build.BackEnd.SdkResolution
|
|||
warnings.AddRange(firstWarnings);
|
||||
}
|
||||
|
||||
// Second pass: fallback to general resolvers.
|
||||
// Second pass: fallback to general resolvers.
|
||||
resolvers = GetResolvers(
|
||||
_generalResolversManifestsRegistry,
|
||||
loggingContext,
|
||||
|
|
|
@ -86,8 +86,8 @@ namespace Microsoft.Build.BackEnd
|
|||
internal string lpDesktop;
|
||||
|
||||
/// <summary>
|
||||
/// For console processes, this is the title displayed in the title bar if a new console window is created.
|
||||
/// If NULL, the name of the executable file is used as the window title instead.
|
||||
/// For console processes, this is the title displayed in the title bar if a new console window is created.
|
||||
/// If NULL, the name of the executable file is used as the window title instead.
|
||||
/// This parameter must be NULL for GUI or console processes that do not create a new console window
|
||||
/// </summary>
|
||||
internal string lpTitle;
|
||||
|
@ -103,7 +103,7 @@ namespace Microsoft.Build.BackEnd
|
|||
internal Int32 dwY;
|
||||
|
||||
/// <summary>
|
||||
/// If dwFlags specifies STARTF_USESIZE, this member is the width of the window if a new window is created, in pixels. Otherwise, this member is ignored.
|
||||
/// If dwFlags specifies STARTF_USESIZE, this member is the width of the window if a new window is created, in pixels. Otherwise, this member is ignored.
|
||||
/// </summary>
|
||||
internal Int32 dwXSize;
|
||||
|
||||
|
@ -118,12 +118,12 @@ namespace Microsoft.Build.BackEnd
|
|||
internal Int32 dwXCountChars;
|
||||
|
||||
/// <summary>
|
||||
/// If dwFlags specifies STARTF_USECOUNTCHARS, if a new console window is created in a console process, this member specifies the screen buffer height, in character rows. Otherwise, this member is ignored.dwFillAttribute
|
||||
/// If dwFlags specifies STARTF_USECOUNTCHARS, if a new console window is created in a console process, this member specifies the screen buffer height, in character rows. Otherwise, this member is ignored.dwFillAttribute
|
||||
/// </summary>
|
||||
internal Int32 dwYCountChars;
|
||||
|
||||
/// <summary>
|
||||
/// If dwFlags specifies STARTF_USEFILLATTRIBUTE, this member is the initial text and background colors if a new console window is created in a console application. Otherwise, this member is ignored.
|
||||
/// If dwFlags specifies STARTF_USEFILLATTRIBUTE, this member is the initial text and background colors if a new console window is created in a console application. Otherwise, this member is ignored.
|
||||
/// </summary>
|
||||
internal Int32 dwFillAttribute;
|
||||
|
||||
|
@ -177,12 +177,12 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// A pointer to a security descriptor for the object that controls the sharing of it.
|
||||
/// If NULL is specified for this member, the object is assigned the default security descriptor of the calling process.
|
||||
/// This is not the same as granting access to everyone by assigning a NULL discretionary access control list (DACL).
|
||||
/// If NULL is specified for this member, the object is assigned the default security descriptor of the calling process.
|
||||
/// This is not the same as granting access to everyone by assigning a NULL discretionary access control list (DACL).
|
||||
/// The default security descriptor is based on the default DACL of the access token belonging to the calling process.
|
||||
/// By default, the default DACL in the access token of a process allows access only to the user represented by the access token.
|
||||
/// If other users must access the object, you can either create a security descriptor with the appropriate access,
|
||||
/// or add ACEs to the DACL that grants access to a group of users.
|
||||
/// By default, the default DACL in the access token of a process allows access only to the user represented by the access token.
|
||||
/// If other users must access the object, you can either create a security descriptor with the appropriate access,
|
||||
/// or add ACEs to the DACL that grants access to a group of users.
|
||||
/// </summary>
|
||||
public IntPtr lpSecurityDescriptor;
|
||||
|
||||
|
@ -212,7 +212,7 @@ namespace Microsoft.Build.BackEnd
|
|||
|
||||
/// <summary>
|
||||
/// A value that can be used to identify a process.
|
||||
/// The value is valid from the time the process is created until all handles to the process are closed and
|
||||
/// The value is valid from the time the process is created until all handles to the process are closed and
|
||||
/// the process object is freed; at this point, the identifier may be reused.
|
||||
/// </summary>
|
||||
public int dwProcessId;
|
||||
|
|
|
@ -586,7 +586,7 @@ namespace Microsoft.Build.Execution
|
|||
{
|
||||
#if RUNTIME_TYPE_NETCORE
|
||||
if (packet is LogMessagePacketBase logMessage
|
||||
&& logMessage.EventType == LoggingEventType.CustomEvent
|
||||
&& logMessage.EventType == LoggingEventType.CustomEvent
|
||||
&&
|
||||
(ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_8) || !Traits.Instance.EscapeHatches.IsBinaryFormatterSerializationAllowed)
|
||||
&& Traits.Instance.EscapeHatches.EnableWarningOnCustomBuildEvent)
|
||||
|
@ -729,7 +729,7 @@ namespace Microsoft.Build.Execution
|
|||
}
|
||||
|
||||
// We want to make sure the global project collection has the toolsets which were defined on the parent
|
||||
// so that any custom toolsets defined can be picked up by tasks who may use the global project collection but are
|
||||
// so that any custom toolsets defined can be picked up by tasks who may use the global project collection but are
|
||||
// executed on the child node.
|
||||
ICollection<Toolset> parentToolSets = _buildParameters.ToolsetProvider.Toolsets;
|
||||
if (parentToolSets != null)
|
||||
|
|
|
@ -16,7 +16,7 @@ using Microsoft.Build.Shared;
|
|||
namespace Microsoft.Build.Experimental
|
||||
{
|
||||
/// <summary>
|
||||
/// This class represents an implementation of INode for out-of-proc server nodes aka MSBuild server
|
||||
/// This class represents an implementation of INode for out-of-proc server nodes aka MSBuild server
|
||||
/// </summary>
|
||||
public sealed class OutOfProcServerNode : INode, INodePacketFactory, INodePacketHandler
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ namespace Microsoft.Build.Experimental
|
|||
|
||||
/// <summary>
|
||||
/// Indicate that cancel has been requested and initiated.
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
private bool _cancelRequested = false;
|
||||
private string _serverBusyMutexName = default!;
|
||||
|
||||
|
@ -92,7 +92,7 @@ namespace Microsoft.Build.Experimental
|
|||
/// <summary>
|
||||
/// Starts up the server node and processes all build requests until the server is requested to shut down.
|
||||
/// </summary>
|
||||
/// <param name="shutdownException">The exception which caused shutdown, if any.</param>
|
||||
/// <param name="shutdownException">The exception which caused shutdown, if any.</param>
|
||||
/// <returns>The reason for shutting down.</returns>
|
||||
public NodeEngineShutdownReason Run(out Exception? shutdownException)
|
||||
{
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace Microsoft.Build.Exceptions
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Protected constructor used for (de)serialization.
|
||||
/// Protected constructor used for (de)serialization.
|
||||
/// If we ever add new members to this class, we'll need to update this.
|
||||
/// </summary>
|
||||
#if NET8_0_OR_GREATER
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче