Partilhar via


ProjectRootElement.AddImport(String) Method

Definition

Convenience method that picks a location based on a heuristic: If import groups exist, inserts into the last one without a condition on it. Otherwise, creates an import at the end of the project.

public:
 Microsoft::Build::Construction::ProjectImportElement ^ AddImport(System::String ^ project);
public Microsoft.Build.Construction.ProjectImportElement AddImport (string project);
member this.AddImport : string -> Microsoft.Build.Construction.ProjectImportElement
Public Function AddImport (project As String) As ProjectImportElement

Parameters

project
String

The project to be imported.

Returns

The added project import.

Remarks

If import groups exist, inserts the project import into the last import group that has no Condition attribute; otherwise, creates an import at the end of the project.

Applies to