共用方式為


ProjectGraph Constructors

Definition

Overloads

ProjectGraph(ProjectGraphEntryPoint)

Constructs a graph starting from the given graph entry point, evaluating with the global project collection.

ProjectGraph(IEnumerable<ProjectGraphEntryPoint>, ProjectCollection, ProjectGraph+ProjectInstanceFactoryFunc, Int32, CancellationToken)

Constructs a graph starting from the given graph entry points, evaluating with the provided project collection.

ProjectGraph(IEnumerable<ProjectGraphEntryPoint>, ProjectCollection, ProjectGraph+ProjectInstanceFactoryFunc, CancellationToken)

Constructs a graph starting from the given graph entry points, evaluating with the provided project collection.

ProjectGraph(String, IDictionary<String,String>, ProjectCollection)

Constructs a graph starting from the given project file, evaluating with the provided global properties and the provided project collection.

ProjectGraph(String, ProjectCollection, ProjectGraph+ProjectInstanceFactoryFunc)

Constructs a graph starting from the given project file, evaluating with the global project collection and no global properties.

ProjectGraph(IEnumerable<ProjectGraphEntryPoint>, ProjectCollection, ProjectGraph+ProjectInstanceFactoryFunc)

Constructs a graph starting from the given graph entry points, evaluating with the provided project collection.

ProjectGraph(String, IDictionary<String,String>)

Constructs a graph starting from the given project file, evaluating with the provided global properties and the global project collection.

ProjectGraph(IEnumerable<String>, IDictionary<String,String>, ProjectCollection)

Constructs a graph starting from the given project files, evaluating with the provided global properties and the provided project collection.

ProjectGraph(IEnumerable<String>, IDictionary<String,String>)

Constructs a graph starting from the given project files, evaluating with the provided global properties and the global project collection.

ProjectGraph(IEnumerable<String>, ProjectCollection)

Constructs a graph starting from the given project files, evaluating with the provided project collection and no global properties.

ProjectGraph(ProjectGraphEntryPoint, ProjectCollection)

Constructs a graph starting from the given graph entry point, evaluating with the provided project collection.

ProjectGraph(String)

Constructs a graph starting from the given project file, evaluating with the global project collection and no global properties.

ProjectGraph(IEnumerable<String>)

Constructs a graph starting from the given project files, evaluating with the global project collection and no global properties.

ProjectGraph(IEnumerable<ProjectGraphEntryPoint>)

Constructs a graph starting from the given graph entry points, evaluating with the global project collection.

ProjectGraph(String, ProjectCollection)

Constructs a graph starting from the given project file, evaluating with the provided project collection and no global properties.

ProjectGraph(ProjectGraphEntryPoint)

Source:
ProjectGraph.cs

Constructs a graph starting from the given graph entry point, evaluating with the global project collection.

public:
 ProjectGraph(Microsoft::Build::Graph::ProjectGraphEntryPoint entryPoint);
public ProjectGraph (Microsoft.Build.Graph.ProjectGraphEntryPoint entryPoint);
new Microsoft.Build.Graph.ProjectGraph : Microsoft.Build.Graph.ProjectGraphEntryPoint -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryPoint As ProjectGraphEntryPoint)

Parameters

entryPoint
ProjectGraphEntryPoint

The entry point to use in constructing the graph

Exceptions

If the evaluation of any project in the graph fails

Applies to

ProjectGraph(IEnumerable<ProjectGraphEntryPoint>, ProjectCollection, ProjectGraph+ProjectInstanceFactoryFunc, Int32, CancellationToken)

Source:
ProjectGraph.cs

Constructs a graph starting from the given graph entry points, evaluating with the provided project collection.

public:
 ProjectGraph(System::Collections::Generic::IEnumerable<Microsoft::Build::Graph::ProjectGraphEntryPoint> ^ entryPoints, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Graph::ProjectGraph::ProjectInstanceFactoryFunc ^ projectInstanceFactory, int degreeOfParallelism, System::Threading::CancellationToken cancellationToken);
public ProjectGraph (System.Collections.Generic.IEnumerable<Microsoft.Build.Graph.ProjectGraphEntryPoint> entryPoints, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Graph.ProjectGraph.ProjectInstanceFactoryFunc projectInstanceFactory, int degreeOfParallelism, System.Threading.CancellationToken cancellationToken);
new Microsoft.Build.Graph.ProjectGraph : seq<Microsoft.Build.Graph.ProjectGraphEntryPoint> * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Graph.ProjectGraph.ProjectInstanceFactoryFunc * int * System.Threading.CancellationToken -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryPoints As IEnumerable(Of ProjectGraphEntryPoint), projectCollection As ProjectCollection, projectInstanceFactory As ProjectGraph.ProjectInstanceFactoryFunc, degreeOfParallelism As Integer, cancellationToken As CancellationToken)

Parameters

entryPoints
IEnumerable<ProjectGraphEntryPoint>

The entry points to use in constructing the graph

projectCollection
ProjectCollection

The collection with which all projects in the graph should be associated. May not be null.

projectInstanceFactory
ProjectGraph.ProjectInstanceFactoryFunc

A delegate used for constructing a ProjectInstance, called for each project created during graph creation. This value can be null, which uses a default implementation that calls the ProjectInstance constructor. See the remarks on ProjectGraph.ProjectInstanceFactoryFunc for other scenarios.

degreeOfParallelism
Int32

Number of threads to participate in building the project graph.

cancellationToken
CancellationToken

The CancellationToken to observe.

Exceptions

If the evaluation of any project in the graph fails

If a null reference is returned from projectInstanceFactory

If the evaluation is successful but the project graph contains a circular dependency

Applies to

ProjectGraph(IEnumerable<ProjectGraphEntryPoint>, ProjectCollection, ProjectGraph+ProjectInstanceFactoryFunc, CancellationToken)

Source:
ProjectGraph.cs

Constructs a graph starting from the given graph entry points, evaluating with the provided project collection.

public:
 ProjectGraph(System::Collections::Generic::IEnumerable<Microsoft::Build::Graph::ProjectGraphEntryPoint> ^ entryPoints, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Graph::ProjectGraph::ProjectInstanceFactoryFunc ^ projectInstanceFactory, System::Threading::CancellationToken cancellationToken);
public ProjectGraph (System.Collections.Generic.IEnumerable<Microsoft.Build.Graph.ProjectGraphEntryPoint> entryPoints, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Graph.ProjectGraph.ProjectInstanceFactoryFunc projectInstanceFactory, System.Threading.CancellationToken cancellationToken);
new Microsoft.Build.Graph.ProjectGraph : seq<Microsoft.Build.Graph.ProjectGraphEntryPoint> * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Graph.ProjectGraph.ProjectInstanceFactoryFunc * System.Threading.CancellationToken -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryPoints As IEnumerable(Of ProjectGraphEntryPoint), projectCollection As ProjectCollection, projectInstanceFactory As ProjectGraph.ProjectInstanceFactoryFunc, cancellationToken As CancellationToken)

Parameters

entryPoints
IEnumerable<ProjectGraphEntryPoint>

The entry points to use in constructing the graph

projectCollection
ProjectCollection

The collection with which all projects in the graph should be associated. May not be null.

projectInstanceFactory
ProjectGraph.ProjectInstanceFactoryFunc

A delegate used for constructing a ProjectInstance, called for each project created during graph creation. This value can be null, which uses a default implementation that calls the ProjectInstance constructor. See the remarks on ProjectGraph.ProjectInstanceFactoryFunc for other scenarios.

cancellationToken
CancellationToken

The CancellationToken to observe.

Exceptions

If the evaluation of any project in the graph fails

If a null reference is returned from projectInstanceFactory

If the evaluation is successful but the project graph contains a circular dependency

Applies to

ProjectGraph(String, IDictionary<String,String>, ProjectCollection)

Source:
ProjectGraph.cs

Constructs a graph starting from the given project file, evaluating with the provided global properties and the provided project collection.

public:
 ProjectGraph(System::String ^ entryProjectFile, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public ProjectGraph (string entryProjectFile, System.Collections.Generic.IDictionary<string,string> globalProperties, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
new Microsoft.Build.Graph.ProjectGraph : string * System.Collections.Generic.IDictionary<string, string> * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryProjectFile As String, globalProperties As IDictionary(Of String, String), projectCollection As ProjectCollection)

Parameters

entryProjectFile
String

The project file to use as the entry point in constructing the graph

globalProperties
IDictionary<String,String>

The global properties to use for all projects. May be null, in which case no global properties will be set.

projectCollection
ProjectCollection

The collection with which all projects in the graph should be associated. May not be null.

Exceptions

If the evaluation of any project in the graph fails

Applies to

ProjectGraph(String, ProjectCollection, ProjectGraph+ProjectInstanceFactoryFunc)

Source:
ProjectGraph.cs

Constructs a graph starting from the given project file, evaluating with the global project collection and no global properties.

public:
 ProjectGraph(System::String ^ entryProjectFile, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Graph::ProjectGraph::ProjectInstanceFactoryFunc ^ projectInstanceFactory);
public ProjectGraph (string entryProjectFile, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Graph.ProjectGraph.ProjectInstanceFactoryFunc projectInstanceFactory);
new Microsoft.Build.Graph.ProjectGraph : string * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Graph.ProjectGraph.ProjectInstanceFactoryFunc -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryProjectFile As String, projectCollection As ProjectCollection, projectInstanceFactory As ProjectGraph.ProjectInstanceFactoryFunc)

Parameters

entryProjectFile
String

The project file to use as the entry point in constructing the graph

projectCollection
ProjectCollection

The collection with which all projects in the graph should be associated. May not be null.

projectInstanceFactory
ProjectGraph.ProjectInstanceFactoryFunc

A delegate used for constructing a ProjectInstance, called for each project created during graph creation. This value can be null, which uses a default implementation that calls the ProjectInstance constructor. See the remarks on the ProjectGraph.ProjectInstanceFactoryFunc for other scenarios.

Exceptions

If the evaluation of any project in the graph fails, the InnerException contains InvalidProjectFileException If a null reference is returned from projectInstanceFactory, the InnerException contains InvalidOperationException

Applies to

ProjectGraph(IEnumerable<ProjectGraphEntryPoint>, ProjectCollection, ProjectGraph+ProjectInstanceFactoryFunc)

Source:
ProjectGraph.cs

Constructs a graph starting from the given graph entry points, evaluating with the provided project collection.

public:
 ProjectGraph(System::Collections::Generic::IEnumerable<Microsoft::Build::Graph::ProjectGraphEntryPoint> ^ entryPoints, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Graph::ProjectGraph::ProjectInstanceFactoryFunc ^ projectInstanceFactory);
public ProjectGraph (System.Collections.Generic.IEnumerable<Microsoft.Build.Graph.ProjectGraphEntryPoint> entryPoints, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Graph.ProjectGraph.ProjectInstanceFactoryFunc projectInstanceFactory);
new Microsoft.Build.Graph.ProjectGraph : seq<Microsoft.Build.Graph.ProjectGraphEntryPoint> * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Graph.ProjectGraph.ProjectInstanceFactoryFunc -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryPoints As IEnumerable(Of ProjectGraphEntryPoint), projectCollection As ProjectCollection, projectInstanceFactory As ProjectGraph.ProjectInstanceFactoryFunc)

Parameters

entryPoints
IEnumerable<ProjectGraphEntryPoint>

The entry points to use in constructing the graph

projectCollection
ProjectCollection

The collection with which all projects in the graph should be associated. May not be null.

projectInstanceFactory
ProjectGraph.ProjectInstanceFactoryFunc

A delegate used for constructing a ProjectInstance, called for each project created during graph creation. This value can be null, which uses a default implementation that calls the ProjectInstance constructor. See the remarks on ProjectGraph.ProjectInstanceFactoryFunc for other scenarios.

Exceptions

If the evaluation of any project in the graph fails

If a null reference is returned from projectInstanceFactory

If the evaluation is successful but the project graph contains a circular dependency

Applies to

ProjectGraph(String, IDictionary<String,String>)

Source:
ProjectGraph.cs

Constructs a graph starting from the given project file, evaluating with the provided global properties and the global project collection.

public:
 ProjectGraph(System::String ^ entryProjectFile, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties);
public ProjectGraph (string entryProjectFile, System.Collections.Generic.IDictionary<string,string> globalProperties);
new Microsoft.Build.Graph.ProjectGraph : string * System.Collections.Generic.IDictionary<string, string> -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryProjectFile As String, globalProperties As IDictionary(Of String, String))

Parameters

entryProjectFile
String

The project file to use as the entry point in constructing the graph

globalProperties
IDictionary<String,String>

The global properties to use for all projects. May be null, in which case no global properties will be set.

Exceptions

If the evaluation of any project in the graph fails

Applies to

ProjectGraph(IEnumerable<String>, IDictionary<String,String>, ProjectCollection)

Source:
ProjectGraph.cs

Constructs a graph starting from the given project files, evaluating with the provided global properties and the provided project collection.

public:
 ProjectGraph(System::Collections::Generic::IEnumerable<System::String ^> ^ entryProjectFiles, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public ProjectGraph (System.Collections.Generic.IEnumerable<string> entryProjectFiles, System.Collections.Generic.IDictionary<string,string> globalProperties, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
new Microsoft.Build.Graph.ProjectGraph : seq<string> * System.Collections.Generic.IDictionary<string, string> * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryProjectFiles As IEnumerable(Of String), globalProperties As IDictionary(Of String, String), projectCollection As ProjectCollection)

Parameters

entryProjectFiles
IEnumerable<String>

The project files to use as the entry points in constructing the graph

globalProperties
IDictionary<String,String>

The global properties to use for all projects. May be null, in which case no global properties will be set.

projectCollection
ProjectCollection

The collection with which all projects in the graph should be associated. May not be null.

Exceptions

If the evaluation of any project in the graph fails

Applies to

ProjectGraph(IEnumerable<String>, IDictionary<String,String>)

Source:
ProjectGraph.cs

Constructs a graph starting from the given project files, evaluating with the provided global properties and the global project collection.

public:
 ProjectGraph(System::Collections::Generic::IEnumerable<System::String ^> ^ entryProjectFiles, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties);
public ProjectGraph (System.Collections.Generic.IEnumerable<string> entryProjectFiles, System.Collections.Generic.IDictionary<string,string> globalProperties);
new Microsoft.Build.Graph.ProjectGraph : seq<string> * System.Collections.Generic.IDictionary<string, string> -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryProjectFiles As IEnumerable(Of String), globalProperties As IDictionary(Of String, String))

Parameters

entryProjectFiles
IEnumerable<String>

The project files to use as the entry points in constructing the graph

globalProperties
IDictionary<String,String>

The global properties to use for all projects. May be null, in which case no global properties will be set.

Exceptions

If the evaluation of any project in the graph fails

Applies to

ProjectGraph(IEnumerable<String>, ProjectCollection)

Source:
ProjectGraph.cs

Constructs a graph starting from the given project files, evaluating with the provided project collection and no global properties.

public:
 ProjectGraph(System::Collections::Generic::IEnumerable<System::String ^> ^ entryProjectFiles, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public ProjectGraph (System.Collections.Generic.IEnumerable<string> entryProjectFiles, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
new Microsoft.Build.Graph.ProjectGraph : seq<string> * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryProjectFiles As IEnumerable(Of String), projectCollection As ProjectCollection)

Parameters

entryProjectFiles
IEnumerable<String>

The project files to use as the entry points in constructing the graph

projectCollection
ProjectCollection

The collection with which all projects in the graph should be associated. May not be null.

Exceptions

If the evaluation of any project in the graph fails

Applies to

ProjectGraph(ProjectGraphEntryPoint, ProjectCollection)

Source:
ProjectGraph.cs

Constructs a graph starting from the given graph entry point, evaluating with the provided project collection.

public:
 ProjectGraph(Microsoft::Build::Graph::ProjectGraphEntryPoint entryPoint, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public ProjectGraph (Microsoft.Build.Graph.ProjectGraphEntryPoint entryPoint, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
new Microsoft.Build.Graph.ProjectGraph : Microsoft.Build.Graph.ProjectGraphEntryPoint * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryPoint As ProjectGraphEntryPoint, projectCollection As ProjectCollection)

Parameters

entryPoint
ProjectGraphEntryPoint

The entry point to use in constructing the graph

projectCollection
ProjectCollection

The collection with which all projects in the graph should be associated. May not be null.

Exceptions

If the evaluation of any project in the graph fails

Applies to

ProjectGraph(String)

Source:
ProjectGraph.cs

Constructs a graph starting from the given project file, evaluating with the global project collection and no global properties.

public:
 ProjectGraph(System::String ^ entryProjectFile);
public ProjectGraph (string entryProjectFile);
new Microsoft.Build.Graph.ProjectGraph : string -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryProjectFile As String)

Parameters

entryProjectFile
String

The project file to use as the entry point in constructing the graph

Exceptions

If the evaluation of any project in the graph fails

Applies to

ProjectGraph(IEnumerable<String>)

Source:
ProjectGraph.cs

Constructs a graph starting from the given project files, evaluating with the global project collection and no global properties.

public:
 ProjectGraph(System::Collections::Generic::IEnumerable<System::String ^> ^ entryProjectFiles);
public ProjectGraph (System.Collections.Generic.IEnumerable<string> entryProjectFiles);
new Microsoft.Build.Graph.ProjectGraph : seq<string> -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryProjectFiles As IEnumerable(Of String))

Parameters

entryProjectFiles
IEnumerable<String>

The project files to use as the entry points in constructing the graph

Exceptions

If the evaluation of any project in the graph fails

Applies to

ProjectGraph(IEnumerable<ProjectGraphEntryPoint>)

Source:
ProjectGraph.cs

Constructs a graph starting from the given graph entry points, evaluating with the global project collection.

public:
 ProjectGraph(System::Collections::Generic::IEnumerable<Microsoft::Build::Graph::ProjectGraphEntryPoint> ^ entryPoints);
public ProjectGraph (System.Collections.Generic.IEnumerable<Microsoft.Build.Graph.ProjectGraphEntryPoint> entryPoints);
new Microsoft.Build.Graph.ProjectGraph : seq<Microsoft.Build.Graph.ProjectGraphEntryPoint> -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryPoints As IEnumerable(Of ProjectGraphEntryPoint))

Parameters

entryPoints
IEnumerable<ProjectGraphEntryPoint>

The entry points to use in constructing the graph

Exceptions

If the evaluation of any project in the graph fails

Applies to

ProjectGraph(String, ProjectCollection)

Source:
ProjectGraph.cs

Constructs a graph starting from the given project file, evaluating with the provided project collection and no global properties.

public:
 ProjectGraph(System::String ^ entryProjectFile, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public ProjectGraph (string entryProjectFile, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
new Microsoft.Build.Graph.ProjectGraph : string * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Graph.ProjectGraph
Public Sub New (entryProjectFile As String, projectCollection As ProjectCollection)

Parameters

entryProjectFile
String

The project file to use as the entry point in constructing the graph

projectCollection
ProjectCollection

The collection with which all projects in the graph should be associated. May not be null.

Exceptions

If the evaluation of any project in the graph fails

Applies to