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
name
Type: System.StringThe new name of the item.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.