Export (0) Print
Expand All

Project.AddNewItem Method (String, String, Boolean)

Adds the specified Item element to the project.

Namespace:  Microsoft.Build.BuildEngine
Assembly:  Microsoft.Build.Engine (in Microsoft.Build.Engine.dll)

public BuildItem AddNewItem(
	string itemName,
	string itemInclude,
	bool treatItemIncludeAsLiteral


Type: System.String

The name of the item collection to add the item to. Corresponds to the user-defined name of the Item element.

Type: System.String

The value of the Include attribute of the item.

Type: System.Boolean

true to treat the itemInclude parameter as a literal value; otherwise, false.

Return Value

Type: Microsoft.Build.BuildEngine.BuildItem
A BuildItem containing the created item.

This method attempts to add the item to the project near the other items in the item collection.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
© 2015 Microsoft