Rename Method

ProjectItem.Rename Method (String)

 

Renames the item to the given name.

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.Evaluation
Assembly:  Microsoft.Build (in Microsoft.Build.dll)

public void Rename(
	string name
)

Parameters

name
Type: System.String

The new name of the item.

Equivalent to setting the UnevaluatedInclude value. Generally, no evaluation occurs, because this could result in several items, which has no meaning in the context of renaming a single item. However if the item does not need to be split, and the new value evaluates to exactly one item, then its evaluated Include attribute is updated with the evaluated value.

Return to top
Show:
© 2016 Microsoft