Skip to content

Latest commit

 

History

History
78 lines (60 loc) · 1.81 KB

importgroup-element.md

File metadata and controls

78 lines (60 loc) · 1.81 KB
title ms.date ms.topic dev_langs helpviewer_keywords ms.assetid author ms.author manager ms.workload
ImportGroup Element | Microsoft Docs
03/13/2017
reference
VB
CSharp
C++
jsharp
<ImportGroup> element [MSBuild]
ImportGroup element [MSBuild]
dac3fa2d-6678-4017-af35-93686f53f302
ghogen
ghogen
jillfra
multiple

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 xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <ImportGroup>
        <Import Project="$(Targets1.targets)" />
        <Import Project="$(Targets2.targets)" />
    </ImportGroup>
...
</Project>

See also