ProjectRootElement.AddImport(String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
C#
public Microsoft.Build.Construction.ProjectImportElement AddImport(string project);
member this.AddImport : string -> Microsoft.Build.Construction.ProjectImportElement
Public Function AddImport (project As String) As ProjectImportElement
- project
- String
The project to be imported.
The added project import.
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.
製品 | バージョン |
---|---|
MSBuild | 15, 16, 17 |
MSBuild (.NET Core) | 15, 16, 17 |