152 references to TargetBuiltReason
Microsoft.Build (45)
BackEnd\Components\Logging\ILoggingService.cs (1)
590
BuildEventContext LogTargetStarted(BuildEventContext projectBuildEventContext, string targetName, string projectFile, string projectFileOfTargetElement, string parentTargetName,
TargetBuiltReason
buildReason);
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (1)
636
public BuildEventContext LogTargetStarted(BuildEventContext projectBuildEventContext, string targetName, string projectFile, string projectFileOfTargetElement, string parentTargetName,
TargetBuiltReason
buildReason)
BackEnd\Components\Logging\NodeLoggingContext.cs (1)
100
foreach ((string name,
TargetBuiltReason
reason) target in configuration.GetTargetsUsedToBuildRequest(request))
BackEnd\Components\Logging\ProjectLoggingContext.cs (1)
271
internal TargetLoggingContext LogTargetBatchStarted(string projectFullPath, ProjectTargetInstance target, string parentTargetName,
TargetBuiltReason
buildReason)
BackEnd\Components\Logging\TargetLoggingContext.cs (2)
39
internal TargetLoggingContext(ProjectLoggingContext projectLoggingContext, string projectFullPath, ProjectTargetInstance target, string parentTargetName,
TargetBuiltReason
buildReason)
50
TargetBuiltReason
buildReason)
BackEnd\Components\RequestBuilder\ITargetBuilder.cs (1)
29
Task<BuildResult> BuildTargets(ProjectLoggingContext projectLoggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, (string name,
TargetBuiltReason
reason)[] targets, Lookup baseLookup, CancellationToken cancellationToken);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
1179
(string name,
TargetBuiltReason
reason)[] allTargets = _requestEntry.RequestConfiguration
BackEnd\Components\RequestBuilder\TargetBuilder.cs (19)
103
public async Task<BuildResult> BuildTargets(ProjectLoggingContext loggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, (string name,
TargetBuiltReason
reason)[] targetNames, Lookup baseLookup, CancellationToken cancellationToken)
146
foreach ((string name,
TargetBuiltReason
reason) targetName in targetNames)
162
await PushTargets(targets, null, baseLookup, false, false,
TargetBuiltReason
.None);
279
bool pushed = await PushTargets(targetToPush, currentTargetEntry, callTargetLookup, false, true,
TargetBuiltReason
.None);
432
bool didPushTargets = await PushTargets(afterTargets, currentTargetEntry.ParentEntry, currentTargetEntry.Lookup, currentTargetEntry.ErrorTarget, currentTargetEntry.StopProcessingOnCompletion,
TargetBuiltReason
.AfterTargets);
453
bool pushedTargets = await PushTargets(beforeTargets, currentTargetEntry, currentTargetEntry.Lookup, currentTargetEntry.ErrorTarget, stopProcessingStack,
TargetBuiltReason
.BeforeTargets);
462
await PushTargets(dependencies, currentTargetEntry, currentTargetEntry.Lookup, false, false,
TargetBuiltReason
.DependsOn);
501
false,
TargetBuiltReason
.None);
655
private async Task<bool> PushTargets(IList<TargetSpecification> targets, TargetEntry parentTargetEntry, Lookup baseLookup, bool addAsErrorTarget, bool stopProcessingOnCompletion,
TargetBuiltReason
buildReason)
664
if (buildReason ==
TargetBuiltReason
.BeforeTargets || buildReason ==
TargetBuiltReason
.AfterTargets)
697
if (buildReason ==
TargetBuiltReason
.AfterTargets)
710
if (buildReason ==
TargetBuiltReason
.BeforeTargets || buildReason ==
TargetBuiltReason
.DependsOn || buildReason ==
TargetBuiltReason
.None)
740
TargetBuiltReason
entryReason = buildReason ==
TargetBuiltReason
.None ? targetSpecification._targetBuiltReason : buildReason;
780
private void ComputeAfterTargetFailures((string name,
TargetBuiltReason
reason)[] targetNames)
782
foreach ((string name,
TargetBuiltReason
reason) targetName in targetNames)
BackEnd\Components\RequestBuilder\TargetEntry.cs (3)
114
private
TargetBuiltReason
_buildReason;
173
TargetBuiltReason
buildReason,
310
internal
TargetBuiltReason
BuildReason
BackEnd\Components\RequestBuilder\TargetSpecification.cs (4)
22
internal
TargetBuiltReason
_targetBuiltReason;
30
internal TargetSpecification(string targetName, ElementLocation referenceLocation,
TargetBuiltReason
targetBuiltReason =
TargetBuiltReason
.None)
49
public
TargetBuiltReason
TargetBuiltReason => _targetBuiltReason;
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (1)
241
BuildReason =
TargetBuiltReason
.None,
BackEnd\Shared\BuildRequestConfiguration.cs (5)
765
public List<(string name,
TargetBuiltReason
reason)> GetTargetsUsedToBuildRequest(BuildRequest request)
780
List<(string name,
TargetBuiltReason
reason)> allTargets = new(
786
allTargets.Add((target,
TargetBuiltReason
.InitialTargets));
793
allTargets.Add((target,
TargetBuiltReason
.EntryTargets));
800
allTargets.Add((target,
TargetBuiltReason
.DefaultTargets));
Logging\BinaryLogger\BuildEventArgsReader.cs (5)
580
var
buildReason = (
TargetBuiltReason
)ReadInt32();
801
var
buildReason = _fileFormatVersion > 3 ? (
TargetBuiltReason
)ReadInt32() :
TargetBuiltReason
.None;
Microsoft.Build.CommandLine.UnitTests (1)
TerminalLogger_Tests.cs (1)
152
return new TargetStartedEventArgs("", "", targetName, projectFile, targetFile: projectFile, String.Empty,
TargetBuiltReason
.None, _targetStartTime)
Microsoft.Build.Engine.UnitTests (93)
BackEnd\IntrinsicTask_Tests.cs (2)
3962
nodeContext.LogProjectStarted(entry).LogTargetBatchStarted(projectInstance.FullPath, projectInstance.Targets["t"], null,
TargetBuiltReason
.None),
3997
nodeContext.LogProjectStarted(entry).LogTargetBatchStarted(projectInstance.FullPath, projectInstance.Targets["t"], null,
TargetBuiltReason
.None),
BackEnd\LoggingServicesLogMethod_Tests.cs (6)
1172
service.LogTargetStarted(null, "MyTarget", "ProjectFile", "ProjectFileOfTarget", null,
TargetBuiltReason
.None);
1525
service.LogTargetStarted(s_targetBuildEventContext, targetName, projectFile, projectFileOfTarget, String.Empty,
TargetBuiltReason
.None);
1531
service.LogTargetStarted(s_targetBuildEventContext, targetName, projectFile, projectFileOfTarget, null,
TargetBuiltReason
.None);
1552
service.LogTargetStarted(s_targetBuildEventContext, targetName, projectFile, projectFileOfTarget, parentTargetName,
TargetBuiltReason
.AfterTargets);
1558
service.LogTargetStarted(s_targetBuildEventContext, targetName, projectFile, projectFileOfTarget, parentTargetName,
TargetBuiltReason
.BeforeTargets);
1603
TargetBuiltReason
.None,
BackEnd\MockLoggingService.cs (1)
597
public BuildEventContext LogTargetStarted(BuildEventContext projectBuildEventContext, string targetName, string projectFile, string projectFileOfTargetElement, string parentTargetName,
TargetBuiltReason
buildReason)
BackEnd\NodePackets_Tests.cs (1)
225
BuildReason =
TargetBuiltReason
.DependsOn,
BackEnd\RequestBuilder_Tests.cs (3)
359
public Task<BuildResult> BuildTargets(ProjectLoggingContext loggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, (string name,
TargetBuiltReason
reason)[] targets, Lookup baseLookup, CancellationToken cancellationToken)
366
foreach ((string name,
TargetBuiltReason
reason) target in targets)
391
foreach ((string name,
TargetBuiltReason
reason) target in targets)
BackEnd\TargetBuilder_Tests.cs (70)
104
(string name,
TargetBuiltReason
reason)[] target = { ("Empty",
TargetBuiltReason
.None) };
125
(string name,
TargetBuiltReason
reason)[] target = { ("Baz",
TargetBuiltReason
.None) };
151
(string name,
TargetBuiltReason
reason)[] target = { ("DepSkip",
TargetBuiltReason
.None) };
180
(string name,
TargetBuiltReason
reason)[] target = { ("DepError",
TargetBuiltReason
.None) };
365
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
505
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
531
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
557
(string name,
TargetBuiltReason
reason)[] target = { ("Build;Me",
TargetBuiltReason
.None) };
587
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
622
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
654
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
685
(string name,
TargetBuiltReason
reason)[] target = { ("Foo",
TargetBuiltReason
.None) };
711
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
747
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
773
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
800
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
830
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
874
(string name,
TargetBuiltReason
reason)[] target = { ("PostBuild",
TargetBuiltReason
.None) };
901
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
928
(string name,
TargetBuiltReason
reason)[] target = { ("Build;Me",
TargetBuiltReason
.None) };
960
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
984
BuildResult result = BuildSimpleProject(projectBody, new (string name,
TargetBuiltReason
reason)[] { ("Build",
TargetBuiltReason
.None) }, failTaskNumber: 2 /* Fail on After */);
1009
BuildResult result = BuildSimpleProject(projectBody, new (string name,
TargetBuiltReason
reason)[] { ("Build",
TargetBuiltReason
.None) }, failTaskNumber: 3 /* Fail on After2 */);
1028
BuildResult result = BuildSimpleProject(projectBody, new (string name,
TargetBuiltReason
reason)[] { ("Build",
TargetBuiltReason
.None) }, failTaskNumber: int.MaxValue /* no task failure needed here */);
1058
(string name,
TargetBuiltReason
reason)[] target = { ("Foo",
TargetBuiltReason
.None) };
1093
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
1144
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
1204
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
1246
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
1292
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
1323
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
1397
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
1430
(string name,
TargetBuiltReason
reason)[] target = { ("Build",
TargetBuiltReason
.None) };
1457
(string name,
TargetBuiltReason
reason)[] target = { ("NotFound",
TargetBuiltReason
.None) };
1560
private BuildRequest CreateNewBuildRequest(int configurationId, (string name,
TargetBuiltReason
reason)[] targets, BuildRequestDataFlags flags = BuildRequestDataFlags.None)
1703
private BuildResult BuildSimpleProject(string projectBody, (string name,
TargetBuiltReason
reason)[] targets, int failTaskNumber)
BackEnd\TargetEntry_Tests.cs (5)
86
TargetEntry entry = new TargetEntry(requestEntry, this, null, lookup, null,
TargetBuiltReason
.None, _host, null, false);
100
TargetEntry entry = new TargetEntry(requestEntry, this, new TargetSpecification("Empty", null), null, null,
TargetBuiltReason
.None, _host, null, false);
116
TargetEntry entry = new TargetEntry(requestEntry, this, new TargetSpecification("Empty", null), lookup, null,
TargetBuiltReason
.None, null, null, false);
1031
TargetEntry entry = new TargetEntry(requestEntry, this, new TargetSpecification(targetName, project.Targets[targetName].Location), lookup, null,
TargetBuiltReason
.None, _host, null, false);
1047
TargetEntry entry = new TargetEntry(requestEntry, this, new TargetSpecification(target, project.Targets[target].Location), baseEntry.Lookup, baseEntry,
TargetBuiltReason
.None, _host, null, false);
BackEnd\TaskBuilderTestTask.cs (2)
1181
public
TargetBuiltReason
EnumOutput =>
TargetBuiltReason
.BeforeTargets;
BackEnd\TaskHostFactory_Tests.cs (1)
207
projectInstance.GetPropertyValue("EnumOutput").ShouldBe(
TargetBuiltReason
.BeforeTargets.ToString());
BuildEventArgsSerialization_Tests.cs (2)
207
TargetBuiltReason
.AfterTargets,
850
BuildReason =
TargetBuiltReason
.DependsOn,
Microsoft.Build.Framework (7)
TargetSkippedEventArgs.cs (2)
103
public
TargetBuiltReason
BuildReason { get; set; }
149
BuildReason = (
TargetBuiltReason
)reader.Read7BitEncodedInt();
TargetStartedEventArgs.cs (5)
48
: this(message, helpKeyword, targetName, projectFile, targetFile, String.Empty,
TargetBuiltReason
.None, DateTime.UtcNow)
96
TargetBuiltReason
buildReason,
111
private
TargetBuiltReason
buildReason;
145
buildReason = (
TargetBuiltReason
)reader.ReadInt32();
173
public
TargetBuiltReason
BuildReason => buildReason;
Microsoft.Build.Framework.UnitTests (6)
CustomEventArgSerialization_Tests.cs (4)
720
TargetStartedEventArgs genericEvent = new TargetStartedEventArgs("Message", "HelpKeyword", "TargetName", "ProjectFile", "TargetFile", "ParentTargetStartedEvent",
TargetBuiltReason
.AfterTargets, DateTime.UtcNow);
738
genericEvent = new TargetStartedEventArgs(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty,
TargetBuiltReason
.AfterTargets, DateTime.Now);
756
genericEvent = new TargetStartedEventArgs(null, null, null, null, null, null,
TargetBuiltReason
.AfterTargets, DateTime.Now);
763
newGenericEvent = new TargetStartedEventArgs("Something", "Something", "Something", "Something", "Something", "Something",
TargetBuiltReason
.AfterTargets, DateTime.Now);
TargetStartedEventArgs_Tests.cs (2)
27
targetStartedEvent = new TargetStartedEventArgs("Message", "HelpKeyword", "TargetName", "ProjectFile", "TargetFile", "ParentTarget",
TargetBuiltReason
.AfterTargets, DateTime.Now);
30
targetStartedEvent = new TargetStartedEventArgs(null, null, null, null, null, null,
TargetBuiltReason
.AfterTargets, DateTime.Now);