ProjectInstance.AddItem Method (String, String, IEnumerable(Of KeyValuePair(Of String, String)))


Adds an item with the given metadata to the project.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:   Microsoft.Build.Execution
Assembly:  Microsoft.Build (in Microsoft.Build.dll)

Public Function AddItem (
	itemType As String,
	evaluatedInclude As String,
	metadata As IEnumerable(Of KeyValuePair(Of StringString))
) As ProjectItemInstance


Type: System.String

The item type of the item to be added.

Type: System.String

The evaluated Include attribute of the item.

Type: System.Collections.Generic.IEnumerable(Of KeyValuePair(Of StringString))

The metadata of the item.

Return Value

Type: Microsoft.Build.Execution.ProjectItemInstance

Return the new item.

We don't take a ProjectItemInstance to make sure we don't have one that's already in use by another ProjectInstance.

Return to top