Items

Building applications usually means dealing with many files. Because of this, you use a specific construct when referencing files in MSBuild: items. Items are usually file-based references, but they can be used for other purposes as well. If you create a project using Visual Studio you may notice that you see many ItemGroup elements as well as PropertyGroup elements. The ItemGroup element contains all the statically defined items. Static item definitions are those declared inside the Project element. Dynamic items, which we discuss in the next chapter, are those defined inside a target. When you define a property you are declaring a key-value pair, which is a one-to-one relationship. When you declare items, one item can contain a list of ...

Get Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.