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