77 references to Targets
Microsoft.Build (17)
BackEnd\BuildManager\BuildManager.cs (1)
1950
ProjectErrorUtilities.VerifyThrowInvalidProject(entryPointNode.ProjectInstance.
Targets
.Count > 0, entryPointNode.ProjectInstance.ProjectFileLocation, "NoTargetSpecified");
BackEnd\Components\RequestBuilder\TargetBuilder.cs (2)
148
var targetExists = _projectInstance.
Targets
.TryGetValue(targetName.name, out ProjectTargetInstance targetInstance);
417
_requestEntry.RequestConfiguration.Project.
Targets
.ContainsKey(currentTargetEntry.Name),
BackEnd\Components\RequestBuilder\TargetEntry.cs (1)
936
_requestEntry.RequestConfiguration.Project.
Targets
.TryGetValue(_targetSpecification.TargetName, out _target);
BackEnd\Shared\BuildRequestConfiguration.cs (3)
186
_projectTargets = GetProjectTargets(data.ProjectInstance.
Targets
);
223
_projectTargets = GetProjectTargets(instance.
Targets
);
418
ProjectTargets = GetProjectTargets(_project.
Targets
);
Construction\Solution\SolutionProjectGenerator.cs (8)
817
foreach (string targetName in _targetNames.Where(i => !traversalInstance.
Targets
.ContainsKey(i)))
831
foreach (string targetName in _targetNames.Where(i => !traversalInstance.
Targets
.ContainsKey(i)))
1017
if (traversalInstance.
Targets
[targetName].Location.File == traversalProject.FullPath)
1237
foreach (string targetName in _targetNames.Where(i => !metaprojectInstance.
Targets
.ContainsKey(i)))
1257
foreach (string targetName in _targetNames.Where(i => !metaprojectInstance.
Targets
.ContainsKey(i)))
1269
foreach (string targetName in _targetNames.Where(i => !metaprojectInstance.
Targets
.ContainsKey(i)))
1803
if (metaprojectInstance.
Targets
.ContainsKey("GetFrameworkPathAndRedistList"))
2027
if (traversalProject.
Targets
.ContainsKey(actualTargetName))
Graph\ProjectInterpretation.cs (1)
531
.Where(t => !t.SkipIfNonexistent || projectGraphNode.ProjectInstance.
Targets
.ContainsKey(t.Target))
Instance\ProjectInstance.cs (1)
2318
foreach (ProjectTargetInstance target in
Targets
.Values)
Microsoft.Build.Engine.OM.UnitTests (8)
Instance\ProjectOnErrorInstance_Tests.cs (1)
49
ProjectOnErrorInstance onError = (ProjectOnErrorInstance)instance.
Targets
["t"].OnErrorChildren[0];
Instance\ProjectTargetInstance_Tests.cs (4)
59
ProjectTargetInstance target = instance.
Targets
["t"];
79
ProjectTargetInstance target = instance.
Targets
["t;"];
99
ProjectTargetInstance target = instance.
Targets
["t;"];
149
ProjectTargetInstance target = instance.
Targets
["t"];
Instance\ProjectTaskInstance_Tests.cs (1)
79
ProjectTaskInstance task = (ProjectTaskInstance)(instance.
Targets
["t"].Children[0]);
Instance\ProjectTaskOutputItemInstance_Tests.cs (1)
52
ProjectTaskInstance task = (ProjectTaskInstance)instance.
Targets
["t"].Children[0];
Instance\ProjectTaskOutputPropertyInstance_Tests.cs (1)
52
ProjectTaskInstance task = (ProjectTaskInstance)instance.
Targets
["t"].Children[0];
Microsoft.Build.Engine.UnitTests (50)
BackEnd\IntrinsicTask_Tests.cs (4)
3955
ProjectTargetInstanceChild targetChild = projectInstance.
Targets
["t"].Children.First();
3962
nodeContext.LogProjectStarted(entry).LogTargetBatchStarted(projectInstance.FullPath, projectInstance.
Targets
["t"], null, TargetBuiltReason.None),
3990
var targetChild = projectInstance.
Targets
["t"].Children.First();
3997
nodeContext.LogProjectStarted(entry).LogTargetBatchStarted(projectInstance.FullPath, projectInstance.
Targets
["t"], null, TargetBuiltReason.None),
BackEnd\TargetEntry_Tests.cs (2)
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\TargetUpToDateChecker_Tests.cs (1)
614
TargetUpToDateChecker analyzer = new TargetUpToDateChecker(p, p.
Targets
["Build"], _mockHost, BuildEventContext.Invalid);
BackEnd\TaskExecutionHost_Tests.cs (1)
1268
ProjectTaskInstance taskInstance = project.
Targets
["foo"].Tasks.First();
Construction\SolutionProjectGenerator_Tests.cs (29)
80
instances[0].
Targets
["Build"].AfterTargets.ShouldBe(string.Empty);
1054
Assert.DoesNotContain(projectBravoMetaProject.
Targets
, kvp => kvp.Value.Outputs.Equals("@()")); // "The outputItem parameter can be null; the Target element should not have an Outputs attribute in that case."
1352
foreach (ProjectTargetInstance target in instance.
Targets
.Values)
1529
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Build", StringComparison.OrdinalIgnoreCase)));
1530
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Clean", StringComparison.OrdinalIgnoreCase)));
1531
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Rebuild", StringComparison.OrdinalIgnoreCase)));
1532
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Publish", StringComparison.OrdinalIgnoreCase)));
1534
ProjectTargetInstance buildTarget = instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Build", StringComparison.OrdinalIgnoreCase)).First().Value;
1535
ProjectTargetInstance cleanTarget = instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Clean", StringComparison.OrdinalIgnoreCase)).First().Value;
1536
ProjectTargetInstance rebuildTarget = instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Rebuild", StringComparison.OrdinalIgnoreCase)).First().Value;
1537
ProjectTargetInstance publishTarget = instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Publish", StringComparison.OrdinalIgnoreCase)).First().Value;
1676
Assert.Contains("'$(Configuration)' == 'Release'", msbuildProject.
Targets
["Build"].Condition);
1677
Assert.Contains("'$(Configuration)' == 'Debug'", msbuildProject.
Targets
["Build"].Condition);
2355
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "One", StringComparison.OrdinalIgnoreCase)));
2359
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Two", StringComparison.OrdinalIgnoreCase)));
2360
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Three", StringComparison.OrdinalIgnoreCase)));
2361
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Four", StringComparison.OrdinalIgnoreCase)));
2365
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Build", StringComparison.OrdinalIgnoreCase)));
2369
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Five", StringComparison.OrdinalIgnoreCase)));
2370
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Rebuild", StringComparison.OrdinalIgnoreCase)));
2374
Assert.Single(instances[0].
Targets
.Where(target => String.Equals(target.Value.Name, "Six", StringComparison.OrdinalIgnoreCase)));
2413
Assert.True(instances[0].
Targets
.ContainsKey(targetName));
2420
Assert.True(instances[0].
Targets
.ContainsKey(traversalTargetName));
2547
Assert.True(projectInstance.
Targets
.ContainsKey("MyTarget"));
2549
Assert.Single(projectInstance.
Targets
["MyTarget"].Children);
2551
ProjectTaskInstance task = Assert.IsType<ProjectTaskInstance>(projectInstance.
Targets
["MyTarget"].Children[0]);
2608
projectInstance.
Targets
.ShouldContainKey("MyTarget");
2610
projectInstance.
Targets
["MyTarget"].Children
2615
projectInstance.
Targets
["MyTarget"].BeforeTargets.ShouldBe("DynamicTraversalTarget");
Evaluation\Evaluator_Tests.cs (1)
1429
Assert.Equal("3", (Helpers.GetFirst(instance.
Targets
["t"].Tasks)).GetParameter("Text"));
Instance\ProjectInstance_Internal_Tests.cs (10)
174
ProjectPropertyGroupTaskInstance propertyGroup = (ProjectPropertyGroupTaskInstance)(p.
Targets
["t"].Children[0]);
212
ProjectItemGroupTaskInstance itemGroup = (ProjectItemGroupTaskInstance)(p.
Targets
["t"].Children[0]);
472
first.
Targets
.ShouldBeSameAs(second.
Targets
);
474
first.
Targets
["t"].ShouldBeSameAs(second.
Targets
["t"]);
476
var firstTasks = first.
Targets
["t"];
477
var secondTasks = second.
Targets
["t"];
789
projectInstance.
Targets
.Count.ShouldBe(2);
790
projectInstance.
Targets
["b"].ShouldBe(targetInstance);
TestComparers\ProjectInstanceModelTestComparers.cs (2)
35
x.
Targets
,
36
y.
Targets
,
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Build\ProjectBuildManager.cs (2)
244
if (!projectInstance.
Targets
.ContainsKey(target))
254
if (projectInstance.
Targets
.ContainsKey(target))