Project.AddNewItem Method (String, String)

 

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
)

Parameters

itemName
Type: System.String

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

itemInclude
Type: System.String

The value of the Include attribute of the item.

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
Available since 2.0
Return to top
Show: