Skip to content

Latest commit

 

History

History
76 lines (57 loc) · 1.81 KB

File metadata and controls

76 lines (57 loc) · 1.81 KB
title ImportGroup Element
description Learn how MSBuild uses the ImportGroup element to contain a collection of Import elements that are grouped under an optional condition.
ms.date 03/13/2017
ms.topic reference
dev_langs
VB
CSharp
C++
helpviewer_keywords
<ImportGroup> element [MSBuild]
ImportGroup element [MSBuild]
author ghogen
ms.author ghogen
ms.subservice msbuild

ImportGroup element

Contains a collection of Import elements that are grouped under an optional condition. For more information, see Import element (MSBuild).

<Project>
  <ImportGroup>

Syntax

<ImportGroup Condition="'String A' == 'String B'">
    <Import ... />
    <Import ... />
</ImportGroup>

Attributes and elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
Condition Optional attribute.

The condition to be evaluated. For more information, see Conditions.

Child elements

Element Description
Import Imports the contents of one project file into another project file.

Parent elements

Element Description
Project Required root element of an MSBuild project file.

Example

The following code example shows the ImportGroup element.

<Project>
    <ImportGroup>
        <Import Project="$(Targets1.targets)" />
        <Import Project="$(Targets2.targets)" />
    </ImportGroup>
...
</Project>

See also