다음을 통해 공유


ProjectRootElement.Create Method

Definition

Creates and initializes an in-memory, empty ProjectRootElement instance and adds it to the global project collection.

Overloads

Create(String, ProjectCollection, NewProjectFileOptions)

Initialize an in-memory, empty ProjectRootElement instance that can be saved later. Uses the specified project collection.

Create(XmlReader, ProjectCollection)

Initialize a ProjectRootElement instance from an XmlReader. Uses the specified project collection. May throw InvalidProjectFileException.

Create(String, ProjectCollection)

Initialize an in-memory, empty ProjectRootElement instance that can be saved later. Uses the specified project collection.

Create(String, NewProjectFileOptions)

Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified path and NewProjectFileOptions. Uses the global project collection.

Create(ProjectCollection, NewProjectFileOptions)

Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified ProjectCollection and NewProjectFileOptions.

Create(XmlReader, ProjectCollection, Boolean)

Initialize a ProjectRootElement instance from an XmlReader. Uses the specified project collection. May throw InvalidProjectFileException.

Create(String)

Initialize an in-memory, empty ProjectRootElement instance that can be saved later. Uses the global project collection.

Create(ProjectCollection)

Initialize an in-memory, empty ProjectRootElement instance that can be saved later. Uses the specified project collection.

Create(NewProjectFileOptions)

Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified NewProjectFileOptions. Uses the global project collection.

Create()

Initialize an in-memory, empty ProjectRootElement instance that can be saved later. Uses the global project collection.

Create(XmlReader)

Initialize a ProjectRootElement instance from an XmlReader. Uses the global project collection. May throw InvalidProjectFileException.

Create(String, ProjectCollection, NewProjectFileOptions)

Source:
ProjectRootElement.cs

Initialize an in-memory, empty ProjectRootElement instance that can be saved later. Uses the specified project collection.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create(System::String ^ path, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Evaluation::NewProjectFileOptions newProjectFileOptions);
public static Microsoft.Build.Construction.ProjectRootElement Create (string path, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.NewProjectFileOptions newProjectFileOptions);
static member Create : string * Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Evaluation.NewProjectFileOptions -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create (path As String, projectCollection As ProjectCollection, newProjectFileOptions As NewProjectFileOptions) As ProjectRootElement

Parameters

path
String
projectCollection
ProjectCollection
newProjectFileOptions
NewProjectFileOptions

Returns

Applies to

Create(XmlReader, ProjectCollection)

Source:
ProjectRootElement.cs

Initialize a ProjectRootElement instance from an XmlReader. Uses the specified project collection. May throw InvalidProjectFileException.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create(System::Xml::XmlReader ^ xmlReader, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public static Microsoft.Build.Construction.ProjectRootElement Create (System.Xml.XmlReader xmlReader, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
static member Create : System.Xml.XmlReader * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create (xmlReader As XmlReader, projectCollection As ProjectCollection) As ProjectRootElement

Parameters

xmlReader
XmlReader

The XML reader used for initialization.

projectCollection
ProjectCollection

The project collection to be added to.

Returns

The new project root.

Remarks

May throw InvalidProjectFileException.

Applies to

Create(String, ProjectCollection)

Source:
ProjectRootElement.cs

Initialize an in-memory, empty ProjectRootElement instance that can be saved later. Uses the specified project collection.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create(System::String ^ path, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public static Microsoft.Build.Construction.ProjectRootElement Create (string path, Microsoft.Build.Evaluation.ProjectCollection projectCollection);
static member Create : string * Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create (path As String, projectCollection As ProjectCollection) As ProjectRootElement

Parameters

path
String

The file path to the data used for initialization.

projectCollection
ProjectCollection

The project collection to be added to.

Returns

The new project root.

Applies to

Create(String, NewProjectFileOptions)

Source:
ProjectRootElement.cs

Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified path and NewProjectFileOptions. Uses the global project collection.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create(System::String ^ path, Microsoft::Build::Evaluation::NewProjectFileOptions newProjectFileOptions);
public static Microsoft.Build.Construction.ProjectRootElement Create (string path, Microsoft.Build.Evaluation.NewProjectFileOptions newProjectFileOptions);
static member Create : string * Microsoft.Build.Evaluation.NewProjectFileOptions -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create (path As String, newProjectFileOptions As NewProjectFileOptions) As ProjectRootElement

Parameters

path
String
newProjectFileOptions
NewProjectFileOptions

Returns

Applies to

Create(ProjectCollection, NewProjectFileOptions)

Source:
ProjectRootElement.cs

Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified ProjectCollection and NewProjectFileOptions.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create(Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, Microsoft::Build::Evaluation::NewProjectFileOptions projectFileOptions);
public static Microsoft.Build.Construction.ProjectRootElement Create (Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.NewProjectFileOptions projectFileOptions);
static member Create : Microsoft.Build.Evaluation.ProjectCollection * Microsoft.Build.Evaluation.NewProjectFileOptions -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create (projectCollection As ProjectCollection, projectFileOptions As NewProjectFileOptions) As ProjectRootElement

Parameters

projectCollection
ProjectCollection
projectFileOptions
NewProjectFileOptions

Returns

Applies to

Create(XmlReader, ProjectCollection, Boolean)

Source:
ProjectRootElement.cs

Initialize a ProjectRootElement instance from an XmlReader. Uses the specified project collection. May throw InvalidProjectFileException.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create(System::Xml::XmlReader ^ xmlReader, Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection, bool preserveFormatting);
public static Microsoft.Build.Construction.ProjectRootElement Create (System.Xml.XmlReader xmlReader, Microsoft.Build.Evaluation.ProjectCollection projectCollection, bool preserveFormatting);
static member Create : System.Xml.XmlReader * Microsoft.Build.Evaluation.ProjectCollection * bool -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create (xmlReader As XmlReader, projectCollection As ProjectCollection, preserveFormatting As Boolean) As ProjectRootElement

Parameters

xmlReader
XmlReader
projectCollection
ProjectCollection
preserveFormatting
Boolean

Returns

Applies to

Create(String)

Source:
ProjectRootElement.cs

Initialize an in-memory, empty ProjectRootElement instance that can be saved later. Uses the global project collection.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create(System::String ^ path);
public static Microsoft.Build.Construction.ProjectRootElement Create (string path);
static member Create : string -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create (path As String) As ProjectRootElement

Parameters

path
String

The file path to the data used for initialization.

Returns

The new project root.

Applies to

Create(ProjectCollection)

Source:
ProjectRootElement.cs

Initialize an in-memory, empty ProjectRootElement instance that can be saved later. Uses the specified project collection.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create(Microsoft::Build::Evaluation::ProjectCollection ^ projectCollection);
public static Microsoft.Build.Construction.ProjectRootElement Create (Microsoft.Build.Evaluation.ProjectCollection projectCollection);
static member Create : Microsoft.Build.Evaluation.ProjectCollection -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create (projectCollection As ProjectCollection) As ProjectRootElement

Parameters

projectCollection
ProjectCollection

The project collection to be added to.

Returns

The new project root.

Applies to

Create(NewProjectFileOptions)

Source:
ProjectRootElement.cs

Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified NewProjectFileOptions. Uses the global project collection.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create(Microsoft::Build::Evaluation::NewProjectFileOptions projectFileOptions);
public static Microsoft.Build.Construction.ProjectRootElement Create (Microsoft.Build.Evaluation.NewProjectFileOptions projectFileOptions);
static member Create : Microsoft.Build.Evaluation.NewProjectFileOptions -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create (projectFileOptions As NewProjectFileOptions) As ProjectRootElement

Parameters

projectFileOptions
NewProjectFileOptions

Returns

Applies to

Create()

Source:
ProjectRootElement.cs

Initialize an in-memory, empty ProjectRootElement instance that can be saved later. Uses the global project collection.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create();
public static Microsoft.Build.Construction.ProjectRootElement Create ();
static member Create : unit -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create () As ProjectRootElement

Returns

The new project root.

Applies to

Create(XmlReader)

Source:
ProjectRootElement.cs

Initialize a ProjectRootElement instance from an XmlReader. Uses the global project collection. May throw InvalidProjectFileException.

public:
 static Microsoft::Build::Construction::ProjectRootElement ^ Create(System::Xml::XmlReader ^ xmlReader);
public static Microsoft.Build.Construction.ProjectRootElement Create (System.Xml.XmlReader xmlReader);
static member Create : System.Xml.XmlReader -> Microsoft.Build.Construction.ProjectRootElement
Public Shared Function Create (xmlReader As XmlReader) As ProjectRootElement

Parameters

xmlReader
XmlReader

The XML reader used for initialization.

Returns

The new project root.

Remarks

May throw InvalidProjectFileException.

Applies to