ItemGroup Structure

Parent Previous Next

The Deployment Framework for BizTalk uses MSBuild ItemGroup elements to identify and locate all of the files that make up your BizTalk solution.  Most of the common artifact types use the same structure, including those for orchestrations, schemas, transforms/maps, pipelines and more.


Typical ItemGroup structure

Most artifact types use a standard ItemGroup structure, shown below:


<ItemGroup>

 <ArtifactName Include="MyFilename.ext">

   <LocationPath>..\ProjectName\bin\$(Configuration)</LocationPath>

 </ArtifactName>

 <ArtifactName Include="MyFilename2.ext">

   <LocationPath>..\ProjectName2\bin\$(Configuration)</LocationPath>

 </ArtifactName>

 ...

</ItemGroup>


ArtifactName is a placeholder for the actual artifact name, such as Orchestrations, Schemas, Pipelines, etc.  One ArtifactName element corresponds to exactly one physical file.


The Include attribute specifies the file name without path information.


The LocationPath element text specifies the path to the file named in the Include attribute, and is always resolved starting in the directory containing the .btdfproj file.  Most of the time the LocationPath value should be a relative path within the BizTalk solution structure, but that is not a restriction.


While most ItemGroups reference files in the file system, some do not.  They include VDirList, BizTalkHosts, AppsToReference, PropsFromEnvSettings and IisAppPools.


Properties within an ItemGroup

Element values within an ItemGroup are free to use any MSBuild property in the standard $(PropertyName) format.  The most commonly used property is $(Configuration), which contains the name of the active solution configuration (commonly Debug or Release).  Another common property is $(ProjectName), which is defined within your project file.


Any MSBuild property that you reference must be defined at runtime.  It may be defined by being passed in via command-line to MSBuild, explicitly defined within your .btdfproj file, pre-defined by the Deployment Framework or created at runtime from a setting in the environment settings spreadsheet (SettingsFileGenerator.xml) via the PropsFromEnvSettings ItemGroup.


Best Practices

Here are a few best practices related to ItemGroup elements:



Created with the Personal Edition of HelpNDoc: Easy CHM and documentation editor