Partilhar via


Project.RemoveItems Method

Removes all the given items from the project, unless they originate from an imported 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.Evaluation
Assembly:  Microsoft.Build (in Microsoft.Build.dll)

Syntax

'Declaration
Public Sub RemoveItems ( _
    items As IEnumerable(Of ProjectItem) _
)
public void RemoveItems(
    IEnumerable<ProjectItem> items
)
public:
void RemoveItems(
    IEnumerable<ProjectItem^>^ items
)
member RemoveItems : 
        items:IEnumerable<ProjectItem> -> unit
public function RemoveItems(
    items : IEnumerable<ProjectItem>
)

Parameters

  • items
    Type: IEnumerable<ProjectItem>

    The items to be removed.

Remarks

If an item originates from an imported project, it is simply skipped.

.NET Framework Security

See Also

Reference

Project Class

Microsoft.Build.Evaluation Namespace