title | description | ms.date | ms.topic | dev_langs | helpviewer_keywords | author | ms.author | manager | ms.subservice | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ImportGroup Element |
Learn how MSBuild uses the ImportGroup element to contain a collection of Import elements that are grouped under an optional condition. |
03/13/2017 |
reference |
|
|
ghogen |
ghogen |
mijacobs |
msbuild |
Contains a collection of Import
elements that are grouped under an optional condition. For more information, see Import element (MSBuild).
<Project>
<ImportGroup>
<ImportGroup Condition="'String A' == 'String B'">
<Import ... />
<Import ... />
</ImportGroup>
The following sections describe attributes, child elements, and parent elements.
Attribute | Description |
---|---|
Condition |
Optional attribute. The condition to be evaluated. For more information, see Conditions. |
Element | Description |
---|---|
Import | Imports the contents of one project file into another project file. |
Element | Description |
---|---|
Project | Required root element of an MSBuild project file. |
The following code example shows the ImportGroup
element.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup>
<Import Project="$(Targets1.targets)" />
<Import Project="$(Targets2.targets)" />
</ImportGroup>
...
</Project>