Compartilhar via


Project.CreateProjectInstance Method

Definition

Creates a project instance based on this project, but completely disconnected from it.

Overloads

CreateProjectInstance(ProjectInstanceSettings)

Returns an instance based on this project, but completely disconnected. This instance can be used to build independently. Before creating the instance, this will reevaluate the project if necessary, so it will not be dirty. The instance is immutable; none of the objects that form it can be modified. This makes it safe to access concurrently from multiple threads.

CreateProjectInstance(ProjectInstanceSettings, EvaluationContext)

See CreateProjectInstance(ProjectInstanceSettings).

CreateProjectInstance()

Returns an instance based on this project, but completely disconnected. This instance can be used to build independently. Before creating the instance, this will reevaluate the project if necessary, so it will not be dirty.

Remarks

Can be used to build independently. The original project is evaluated before creating the instance, if necessary, so that the original project is marked as unmodified.

CreateProjectInstance(ProjectInstanceSettings)

Source:
Project.cs

Returns an instance based on this project, but completely disconnected. This instance can be used to build independently. Before creating the instance, this will reevaluate the project if necessary, so it will not be dirty. The instance is immutable; none of the objects that form it can be modified. This makes it safe to access concurrently from multiple threads.

public:
 Microsoft::Build::Execution::ProjectInstance ^ CreateProjectInstance(Microsoft::Build::Execution::ProjectInstanceSettings settings);
public Microsoft.Build.Execution.ProjectInstance CreateProjectInstance (Microsoft.Build.Execution.ProjectInstanceSettings settings);
member this.CreateProjectInstance : Microsoft.Build.Execution.ProjectInstanceSettings -> Microsoft.Build.Execution.ProjectInstance
Public Function CreateProjectInstance (settings As ProjectInstanceSettings) As ProjectInstance

Parameters

settings
ProjectInstanceSettings

The project instance creation settings.

Returns

The created project instance.

Remarks

Can be used to build independently. The original project is evaluated before creating the instance, if necessary, so that the original project is marked as unmodified.

Applies to

CreateProjectInstance(ProjectInstanceSettings, EvaluationContext)

Source:
Project.cs
public:
 Microsoft::Build::Execution::ProjectInstance ^ CreateProjectInstance(Microsoft::Build::Execution::ProjectInstanceSettings settings, Microsoft::Build::Evaluation::Context::EvaluationContext ^ evaluationContext);
public Microsoft.Build.Execution.ProjectInstance CreateProjectInstance (Microsoft.Build.Execution.ProjectInstanceSettings settings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext);
member this.CreateProjectInstance : Microsoft.Build.Execution.ProjectInstanceSettings * Microsoft.Build.Evaluation.Context.EvaluationContext -> Microsoft.Build.Execution.ProjectInstance
Public Function CreateProjectInstance (settings As ProjectInstanceSettings, evaluationContext As EvaluationContext) As ProjectInstance

Parameters

settings
ProjectInstanceSettings

The project instance creation settings.

evaluationContext
EvaluationContext

The evaluation context to use in case reevaluation is required.

Returns

The created project instance.

Applies to

CreateProjectInstance()

Source:
Project.cs

Returns an instance based on this project, but completely disconnected. This instance can be used to build independently. Before creating the instance, this will reevaluate the project if necessary, so it will not be dirty.

public:
 Microsoft::Build::Execution::ProjectInstance ^ CreateProjectInstance();
public Microsoft.Build.Execution.ProjectInstance CreateProjectInstance ();
member this.CreateProjectInstance : unit -> Microsoft.Build.Execution.ProjectInstance
Public Function CreateProjectInstance () As ProjectInstance

Returns

The created project instance.

Remarks

Can be used to build independently. The original project is evaluated before creating the instance, if necessary, so that the original project is marked as unmodified.

Applies to