Compartir a través de


ProjectGraph.GetTargetLists(ICollection<String>) Method

Definition

Gets the target list to be executed for every project in the graph, given a particular target list for the entry project.

public:
 System::Collections::Generic::IReadOnlyDictionary<Microsoft::Build::Graph::ProjectGraphNode ^, System::Collections::Immutable::ImmutableList<System::String ^> ^> ^ GetTargetLists(System::Collections::Generic::ICollection<System::String ^> ^ entryProjectTargets);
public System.Collections.Generic.IReadOnlyDictionary<Microsoft.Build.Graph.ProjectGraphNode,System.Collections.Immutable.ImmutableList<string>> GetTargetLists (System.Collections.Generic.ICollection<string> entryProjectTargets);
member this.GetTargetLists : System.Collections.Generic.ICollection<string> -> System.Collections.Generic.IReadOnlyDictionary<Microsoft.Build.Graph.ProjectGraphNode, System.Collections.Immutable.ImmutableList<string>>
Public Function GetTargetLists (entryProjectTargets As ICollection(Of String)) As IReadOnlyDictionary(Of ProjectGraphNode, ImmutableList(Of String))

Parameters

entryProjectTargets
ICollection<String>

The target list for the entry project. May be null or empty, in which case the entry projects' default targets will be used.

Returns

A dictionary containing the target list for each node. If a node's target list is empty, then no targets were inferred for that node and it should get skipped during a graph based build.

Remarks

This method uses the ProjectReferenceTargets items to determine the targets to run per node. The results can then be used to start building each project individually, assuming a given project is built after its references.

Applies to