Share via


ProjectItem.Rename Method

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)

Syntax

'Declaration
Public Sub Rename ( _
    name As String _
)
public void Rename(
    string name
)
public:
void Rename(
    String^ name
)
member Rename : 
        name:string -> unit
public function Rename(
    name : String
)

Parameters

Remarks

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.

.NET Framework Security

See Also

Reference

ProjectItem Class

Microsoft.Build.Evaluation Namespace