Compartir a través de


Project Constructors

Definition

Constructs an empty project using the global project collection global properties and default tools version.

Overloads

Project()

Construct an empty project, evaluating with the global project collection's global properties and default tools version. Project will be added to the global project collection when it is named.

Project(XmlReader, IDictionary<String,String>, String, String, ProjectCollection, ProjectLoadSettings)

Construct over a text reader over project xml, evaluating with specified global properties and toolset, either or both of which may be null. Project will be added to the specified project collection when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Project(String, IDictionary<String,String>, String, String, ProjectCollection, ProjectLoadSettings)

Construct over an existing project file, evaluating with the specified global properties and using the tools version provided, either or both of which may be null. Project is added to the global project collection. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

Project(ProjectRootElement, IDictionary<String,String>, String, String, ProjectCollection, ProjectLoadSettings)

Construct over a ProjectRootElement object, evaluating with specified global properties and toolset, either or both of which may be null. Project is added to the global project collection if it has a name, or else when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Project(XmlReader, IDictionary<String,String>, String, ProjectCollection, ProjectLoadSettings)

Construct over a text reader over project xml, evaluating with specified global properties and toolset, either or both of which may be null. Project will be added to the specified project collection when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Project(String, IDictionary<String,String>, String, ProjectCollection, ProjectLoadSettings)

Construct over an existing project file, evaluating with the specified global properties and using the tools version provided, either or both of which may be null. Project is added to the global project collection. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

Project(ProjectRootElement, IDictionary<String,String>, String, ProjectCollection, ProjectLoadSettings)

Construct over a ProjectRootElement object, evaluating with specified global properties and toolset, either or both of which may be null. Project is added to the global project collection if it has a name, or else when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Project(XmlReader, IDictionary<String,String>, String, ProjectCollection)

Construct over a text reader over project xml, evaluating with specified global properties and toolset, either or both of which may be null. Project will be added to the specified project collection when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

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

Construct over an existing project file, evaluating with the specified global properties and using the tools version provided, either or both of which may be null. Project is added to the global project collection. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

Project(ProjectRootElement, IDictionary<String,String>, String, ProjectCollection)

Construct over a ProjectRootElement object, evaluating with specified global properties and toolset, either or both of which may be null. Project is added to the global project collection if it has a name, or else when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Project(IDictionary<String,String>, String, ProjectCollection, NewProjectFileOptions)

Construct an empty project, evaluating with the specified project collection and the specified global properties and default tools version, either of which may be null. Project will be added to the specified project collection when it is named.

Project(String, IDictionary<String,String>, String)

Construct over an existing project file, evaluating with specified global properties and toolset, either or both of which may be null. Project is added to the global project collection. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

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

Construct an empty project, evaluating with the specified project collection and the specified global properties and default tools version, either of which may be null. Project will be added to the specified project collection when it is named.

Project(ProjectRootElement, IDictionary<String,String>, String)

Construct over a ProjectRootElement object, evaluating with specified global properties and toolset, either or both of which may be null. Project is added to the global project collection if it has a name, or else when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Project(ProjectCollection, NewProjectFileOptions)

Construct an empty project, evaluating with the specified project collection's global properties and default tools version. Project will be added to the specified project collection when it is named.

Project(XmlReader)

Construct over a text reader over project xml, evaluating with the global project collection's global properties and default tools version. Project will be added to the global project collection when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Project(String)

Construct over an existing project file, evaluating with the global project collection's global properties and default tools version. Project is added to the global project collection. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

Project(ProjectCollection)

Construct an empty project, evaluating with the specified project collection's global properties and default tools version. Project will be added to the specified project collection when it is named.

Project(NewProjectFileOptions)

Construct an empty project, evaluating with the global project collection's global properties and default tools version. Project will be added to the global project collection when it is named.

Project(ProjectRootElement)

Construct over a ProjectRootElement object, evaluating with the global project collection's global properties and default tools version. Project is added to the global project collection if it has a name, or else when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Project(XmlReader, IDictionary<String,String>, String)

Construct over a text reader over project xml, evaluating with specified global properties and toolset, either or both of which may be null. Project will be added to the global project collection when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Project()

Source:
Project.cs

Construct an empty project, evaluating with the global project collection's global properties and default tools version. Project will be added to the global project collection when it is named.

public:
 Project();
public Project ();
Public Sub New ()

Remarks

This project is added to the global project collection when it is given the full path to the source project file, typically by saving the project.

Applies to

Project(XmlReader, IDictionary<String,String>, String, String, ProjectCollection, ProjectLoadSettings)

Source:
Project.cs

Construct over a text reader over project xml, evaluating with specified global properties and toolset, either or both of which may be null. Project will be added to the specified project collection when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

public:
 Project(System::Xml::XmlReader ^ xmlReader, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion, System::String ^ subToolsetVersion, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Evaluation::ProjectLoadSettings loadSettings);
public Project (System.Xml.XmlReader xmlReader, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, string subToolsetVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings);
new Microsoft.Build.Evaluation.Project : System.Xml.XmlReader * System.Collections.Generic.IDictionary<string, string> * string * string * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Evaluation.ProjectLoadSettings -> Microsoft.Build.Evaluation.Project
Public Sub New (xmlReader As XmlReader, globalProperties As IDictionary(Of String, String), toolsVersion As String, subToolsetVersion As String, projectCollection As ProjectCollection, loadSettings As ProjectLoadSettings)

Parameters

xmlReader
XmlReader

Xml reader to read project from.

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

subToolsetVersion
String

Sub-toolset version to explicitly evaluate the toolset with. May be null.

projectCollection
ProjectCollection

The collection with which this project should be associated. May not be null.

loadSettings
ProjectLoadSettings

The load settings for this project.

Remarks

This project is added to the given project collection when either this project or the given project root is given the full path to the source project file.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Applies to

Project(String, IDictionary<String,String>, String, String, ProjectCollection, ProjectLoadSettings)

Source:
Project.cs

Construct over an existing project file, evaluating with the specified global properties and using the tools version provided, either or both of which may be null. Project is added to the global project collection. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

public:
 Project(System::String ^ projectFile, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion, System::String ^ subToolsetVersion, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Evaluation::ProjectLoadSettings loadSettings);
public Project (string projectFile, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, string subToolsetVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings);
new Microsoft.Build.Evaluation.Project : string * System.Collections.Generic.IDictionary<string, string> * string * string * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Evaluation.ProjectLoadSettings -> Microsoft.Build.Evaluation.Project
Public Sub New (projectFile As String, globalProperties As IDictionary(Of String, String), toolsVersion As String, subToolsetVersion As String, projectCollection As ProjectCollection, loadSettings As ProjectLoadSettings)

Parameters

projectFile
String

The project file.

globalProperties
IDictionary<String,String>

The global properties. May be null.

toolsVersion
String

The tools version. May be null.

subToolsetVersion
String

Sub-toolset version to explicitly evaluate the toolset with. May be null.

projectCollection
ProjectCollection

The collection with which this project should be associated. May not be null.

loadSettings
ProjectLoadSettings

The load settings for this project.

Remarks

The project is added to the given project collection.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

Applies to

Project(ProjectRootElement, IDictionary<String,String>, String, String, ProjectCollection, ProjectLoadSettings)

Source:
Project.cs

Construct over a ProjectRootElement object, evaluating with specified global properties and toolset, either or both of which may be null. Project is added to the global project collection if it has a name, or else when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

public:
 Project(Microsoft::Build::Construction::ProjectRootElement ^ xml, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion, System::String ^ subToolsetVersion, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Evaluation::ProjectLoadSettings loadSettings);
public Project (Microsoft.Build.Construction.ProjectRootElement xml, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, string subToolsetVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings);
new Microsoft.Build.Evaluation.Project : Microsoft.Build.Construction.ProjectRootElement * System.Collections.Generic.IDictionary<string, string> * string * string * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Evaluation.ProjectLoadSettings -> Microsoft.Build.Evaluation.Project
Public Sub New (xml As ProjectRootElement, globalProperties As IDictionary(Of String, String), toolsVersion As String, subToolsetVersion As String, projectCollection As ProjectCollection, loadSettings As ProjectLoadSettings)

Parameters

xml
ProjectRootElement

ProjectRootElement to use.

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

subToolsetVersion
String

Sub-toolset version to explicitly evaluate the toolset with. May be null.

projectCollection
ProjectCollection

The ProjectCollection the project is added to.

loadSettings
ProjectLoadSettings

The ProjectLoadSettings to use for evaluation.

Remarks

This project is added to the given project collection when either this project or the given project root is given the full path to the source project file.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Applies to

Project(XmlReader, IDictionary<String,String>, String, ProjectCollection, ProjectLoadSettings)

Source:
Project.cs

Construct over a text reader over project xml, evaluating with specified global properties and toolset, either or both of which may be null. Project will be added to the specified project collection when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

public:
 Project(System::Xml::XmlReader ^ xmlReader, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Evaluation::ProjectLoadSettings loadSettings);
public Project (System.Xml.XmlReader xmlReader, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings);
new Microsoft.Build.Evaluation.Project : System.Xml.XmlReader * System.Collections.Generic.IDictionary<string, string> * string * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Evaluation.ProjectLoadSettings -> Microsoft.Build.Evaluation.Project
Public Sub New (xmlReader As XmlReader, globalProperties As IDictionary(Of String, String), toolsVersion As String, projectCollection As ProjectCollection, loadSettings As ProjectLoadSettings)

Parameters

xmlReader
XmlReader

Xml reader to read project from.

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

projectCollection
ProjectCollection

The collection with which this project should be associated. May not be null.

loadSettings
ProjectLoadSettings

The ProjectLoadSettings to use for evaluation.

Remarks

This project is added to the given project collection when either this project or the given project root is given the full path to the source project file.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Applies to

Project(String, IDictionary<String,String>, String, ProjectCollection, ProjectLoadSettings)

Source:
Project.cs

Construct over an existing project file, evaluating with the specified global properties and using the tools version provided, either or both of which may be null. Project is added to the global project collection. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

public:
 Project(System::String ^ projectFile, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Evaluation::ProjectLoadSettings loadSettings);
public Project (string projectFile, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings);
new Microsoft.Build.Evaluation.Project : string * System.Collections.Generic.IDictionary<string, string> * string * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Evaluation.ProjectLoadSettings -> Microsoft.Build.Evaluation.Project
Public Sub New (projectFile As String, globalProperties As IDictionary(Of String, String), toolsVersion As String, projectCollection As ProjectCollection, loadSettings As ProjectLoadSettings)

Parameters

projectFile
String

The project file.

globalProperties
IDictionary<String,String>

The global properties. May be null.

toolsVersion
String

The tools version. May be null.

projectCollection
ProjectCollection

The collection with which this project should be associated. May not be null.

loadSettings
ProjectLoadSettings

The load settings for this project.

Remarks

The project is added to the given project collection.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

Applies to

Project(ProjectRootElement, IDictionary<String,String>, String, ProjectCollection, ProjectLoadSettings)

Source:
Project.cs

Construct over a ProjectRootElement object, evaluating with specified global properties and toolset, either or both of which may be null. Project is added to the global project collection if it has a name, or else when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

public:
 Project(Microsoft::Build::Construction::ProjectRootElement ^ xml, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Evaluation::ProjectLoadSettings loadSettings);
public Project (Microsoft.Build.Construction.ProjectRootElement xml, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings);
new Microsoft.Build.Evaluation.Project : Microsoft.Build.Construction.ProjectRootElement * System.Collections.Generic.IDictionary<string, string> * string * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Evaluation.ProjectLoadSettings -> Microsoft.Build.Evaluation.Project
Public Sub New (xml As ProjectRootElement, globalProperties As IDictionary(Of String, String), toolsVersion As String, projectCollection As ProjectCollection, loadSettings As ProjectLoadSettings)

Parameters

xml
ProjectRootElement

ProjectRootElement to use.

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

projectCollection
ProjectCollection

The ProjectCollection the project is added to.

loadSettings
ProjectLoadSettings

The ProjectLoadSettings to use for evaluation.

Remarks

This project is added to the given project collection when either this project or the given project root is given the full path to the source project file.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Applies to

Project(XmlReader, IDictionary<String,String>, String, ProjectCollection)

Source:
Project.cs

Construct over a text reader over project xml, evaluating with specified global properties and toolset, either or both of which may be null. Project will be added to the specified project collection when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

public:
 Project(System::Xml::XmlReader ^ xmlReader, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public Project (System.Xml.XmlReader xmlReader, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public Project (System.Xml.XmlReader xmlReader, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
new Microsoft.Build.Evaluation.Project : System.Xml.XmlReader * System.Collections.Generic.IDictionary<string, string> * string * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Evaluation.Project
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
new Microsoft.Build.Evaluation.Project : System.Xml.XmlReader * System.Collections.Generic.IDictionary<string, string> * string * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Evaluation.Project
Public Sub New (xmlReader As XmlReader, globalProperties As IDictionary(Of String, String), toolsVersion As String, projectCollection As ProjectCollection)

Parameters

xmlReader
XmlReader

Xml reader to read project from.

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

projectCollection
ProjectCollection

The collection with which this project should be associated. May not be null.

Attributes

Remarks

This project is added to the given project collection when either this project or the given project root is given the full path to the source project file.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Applies to

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

Source:
Project.cs

Construct over an existing project file, evaluating with the specified global properties and using the tools version provided, either or both of which may be null. Project is added to the global project collection. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

public:
 Project(System::String ^ projectFile, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public Project (string projectFile, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public Project (string projectFile, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
new Microsoft.Build.Evaluation.Project : string * System.Collections.Generic.IDictionary<string, string> * string * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Evaluation.Project
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
new Microsoft.Build.Evaluation.Project : string * System.Collections.Generic.IDictionary<string, string> * string * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Evaluation.Project
Public Sub New (projectFile As String, globalProperties As IDictionary(Of String, String), toolsVersion As String, projectCollection As ProjectCollection)

Parameters

projectFile
String

The project file.

globalProperties
IDictionary<String,String>

The global properties. May be null.

toolsVersion
String

The tools version. May be null.

projectCollection
ProjectCollection

The collection with which this project should be associated. May not be null.

Attributes

Remarks

The project is added to the given project collection.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

Applies to

Project(ProjectRootElement, IDictionary<String,String>, String, ProjectCollection)

Source:
Project.cs

Construct over a ProjectRootElement object, evaluating with specified global properties and toolset, either or both of which may be null. Project is added to the global project collection if it has a name, or else when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

public:
 Project(Microsoft::Build::Construction::ProjectRootElement ^ xml, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public Project (Microsoft.Build.Construction.ProjectRootElement xml, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public Project (Microsoft.Build.Construction.ProjectRootElement xml, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
new Microsoft.Build.Evaluation.Project : Microsoft.Build.Construction.ProjectRootElement * System.Collections.Generic.IDictionary<string, string> * string * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Evaluation.Project
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
new Microsoft.Build.Evaluation.Project : Microsoft.Build.Construction.ProjectRootElement * System.Collections.Generic.IDictionary<string, string> * string * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Evaluation.Project
Public Sub New (xml As ProjectRootElement, globalProperties As IDictionary(Of String, String), toolsVersion As String, projectCollection As ProjectCollection)

Parameters

xml
ProjectRootElement

ProjectRootElement to use.

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

projectCollection
ProjectCollection

The ProjectCollection the project is added to.

Attributes

Remarks

This project is added to the given project collection when either this project or the given project root is given the full path to the source project file.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Applies to

Project(IDictionary<String,String>, String, ProjectCollection, NewProjectFileOptions)

Source:
Project.cs

Construct an empty project, evaluating with the specified project collection and the specified global properties and default tools version, either of which may be null. Project will be added to the specified project collection when it is named.

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

Parameters

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

projectCollection
ProjectCollection

The ProjectCollection the project is added to.

newProjectFileOptions
NewProjectFileOptions

The NewProjectFileOptions to use for the new project.

Applies to

Project(String, IDictionary<String,String>, String)

Source:
Project.cs

Construct over an existing project file, evaluating with specified global properties and toolset, either or both of which may be null. Project is added to the global project collection. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

public:
 Project(System::String ^ projectFile, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion);
public Project (string projectFile, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion);
new Microsoft.Build.Evaluation.Project : string * System.Collections.Generic.IDictionary<string, string> * string -> Microsoft.Build.Evaluation.Project
Public Sub New (projectFile As String, globalProperties As IDictionary(Of String, String), toolsVersion As String)

Parameters

projectFile
String

The path to the source project file to be evaluated.

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

Remarks

The project is added to the global project collection.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

Applies to

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

Source:
Project.cs

Construct an empty project, evaluating with the specified project collection and the specified global properties and default tools version, either of which may be null. Project will be added to the specified project collection when it is named.

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

Parameters

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

projectCollection
ProjectCollection

The ProjectCollection the project is added to.

Remarks

The project is added to the specified project collection when it is given the full path to the source project file, typically by saving the project.

Applies to

Project(ProjectRootElement, IDictionary<String,String>, String)

Source:
Project.cs

Construct over a ProjectRootElement object, evaluating with specified global properties and toolset, either or both of which may be null. Project is added to the global project collection if it has a name, or else when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

public:
 Project(Microsoft::Build::Construction::ProjectRootElement ^ xml, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion);
public Project (Microsoft.Build.Construction.ProjectRootElement xml, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion);
new Microsoft.Build.Evaluation.Project : Microsoft.Build.Construction.ProjectRootElement * System.Collections.Generic.IDictionary<string, string> * string -> Microsoft.Build.Evaluation.Project
Public Sub New (xml As ProjectRootElement, globalProperties As IDictionary(Of String, String), toolsVersion As String)

Parameters

xml
ProjectRootElement

ProjectRootElement to use.

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

Remarks

This project is added to the global project collection when either this project or the given project root is given the full path to the source project file.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Applies to

Project(ProjectCollection, NewProjectFileOptions)

Source:
Project.cs

Construct an empty project, evaluating with the specified project collection's global properties and default tools version. Project will be added to the specified project collection when it is named.

public:
 Project(Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Evaluation::NewProjectFileOptions newProjectFileOptions);
public Project (Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.NewProjectFileOptions newProjectFileOptions);
new Microsoft.Build.Evaluation.Project : Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Evaluation.NewProjectFileOptions -> Microsoft.Build.Evaluation.Project
Public Sub New (projectCollection As ProjectCollection, newProjectFileOptions As NewProjectFileOptions)

Parameters

projectCollection
ProjectCollection
newProjectFileOptions
NewProjectFileOptions

Applies to

Project(XmlReader)

Source:
Project.cs

Construct over a text reader over project xml, evaluating with the global project collection's global properties and default tools version. Project will be added to the global project collection when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

public:
 Project(System::Xml::XmlReader ^ xmlReader);
public Project (System.Xml.XmlReader xmlReader);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public Project (System.Xml.XmlReader xmlReader);
new Microsoft.Build.Evaluation.Project : System.Xml.XmlReader -> Microsoft.Build.Evaluation.Project
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
new Microsoft.Build.Evaluation.Project : System.Xml.XmlReader -> Microsoft.Build.Evaluation.Project
Public Sub New (xmlReader As XmlReader)

Parameters

xmlReader
XmlReader

Xml reader to read project from.

Attributes

Remarks

This project is added to the global project collection when it is given the full path to the source project file, typically by saving the project.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Applies to

Project(String)

Source:
Project.cs

Construct over an existing project file, evaluating with the global project collection's global properties and default tools version. Project is added to the global project collection. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection. May throw IO-related exceptions.

public:
 Project(System::String ^ projectFile);
public Project (string projectFile);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public Project (string projectFile);
new Microsoft.Build.Evaluation.Project : string -> Microsoft.Build.Evaluation.Project
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
new Microsoft.Build.Evaluation.Project : string -> Microsoft.Build.Evaluation.Project
Public Sub New (projectFile As String)

Parameters

projectFile
String

The source project file to be evaluated.

Attributes

Exceptions

If the evaluation fails.

Remarks

The project is added to the global project collection.

Throws InvalidOperationException if there is already a project in the project collection that evaluates this source project file. May throw IO-related exceptions.

Applies to

Project(ProjectCollection)

Source:
Project.cs

Construct an empty project, evaluating with the specified project collection's global properties and default tools version. Project will be added to the specified project collection when it is named.

public:
 Project(Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public Project (Microsoft.Build.Evaluation.ProjectCollection projectCollection);
new Microsoft.Build.Evaluation.Project : Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Evaluation.Project
Public Sub New (projectCollection As ProjectCollection)

Parameters

projectCollection
ProjectCollection

The project collection that the new project is added to.

Remarks

This project is added to the given project collection when it is given the full path to the source project file, typically by saving the project.

Applies to

Project(NewProjectFileOptions)

Source:
Project.cs

Construct an empty project, evaluating with the global project collection's global properties and default tools version. Project will be added to the global project collection when it is named.

public:
 Project(Microsoft::Build::Evaluation::NewProjectFileOptions newProjectFileOptions);
public Project (Microsoft.Build.Evaluation.NewProjectFileOptions newProjectFileOptions);
new Microsoft.Build.Evaluation.Project : Microsoft.Build.Evaluation.NewProjectFileOptions -> Microsoft.Build.Evaluation.Project
Public Sub New (newProjectFileOptions As NewProjectFileOptions)

Parameters

newProjectFileOptions
NewProjectFileOptions

Applies to

Project(ProjectRootElement)

Source:
Project.cs

Construct over a ProjectRootElement object, evaluating with the global project collection's global properties and default tools version. Project is added to the global project collection if it has a name, or else when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

public:
 Project(Microsoft::Build::Construction::ProjectRootElement ^ xml);
public Project (Microsoft.Build.Construction.ProjectRootElement xml);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public Project (Microsoft.Build.Construction.ProjectRootElement xml);
new Microsoft.Build.Evaluation.Project : Microsoft.Build.Construction.ProjectRootElement -> Microsoft.Build.Evaluation.Project
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
new Microsoft.Build.Evaluation.Project : Microsoft.Build.Construction.ProjectRootElement -> Microsoft.Build.Evaluation.Project
Public Sub New (xml As ProjectRootElement)

Parameters

xml
ProjectRootElement

ProjectRootElement to use.

Attributes

Remarks

This project is added to the global project collection when either this project or the given project root is given the full path to the source project file.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Applies to

Project(XmlReader, IDictionary<String,String>, String)

Source:
Project.cs

Construct over a text reader over project xml, evaluating with specified global properties and toolset, either or both of which may be null. Project will be added to the global project collection when it is named. Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

public:
 Project(System::Xml::XmlReader ^ xmlReader, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::String ^ toolsVersion);
public Project (System.Xml.XmlReader xmlReader, System.Collections.Generic.IDictionary<string,string> globalProperties, string toolsVersion);
new Microsoft.Build.Evaluation.Project : System.Xml.XmlReader * System.Collections.Generic.IDictionary<string, string> * string -> Microsoft.Build.Evaluation.Project
Public Sub New (xmlReader As XmlReader, globalProperties As IDictionary(Of String, String), toolsVersion As String)

Parameters

xmlReader
XmlReader

Xml reader to read project from.

globalProperties
IDictionary<String,String>

Global properties to evaluate with. May be null in which case the containing project collection's global properties will be used.

toolsVersion
String

Tools version to evaluate with. May be null.

Remarks

This project is added to the global project collection when it is given the full path to the source project file, typically by saving the project.

Throws InvalidProjectFileException if the evaluation fails. Throws InvalidOperationException if there is already an equivalent project loaded in the project collection.

Applies to