次の方法で共有


Project.AddItemFast Method (String, String)

Adds an item with no metadata to the project. Makes no effort to see if an existing wildcard would already match the new item, unless it is the first item in an item group. Makes no effort to locate the new item near similar items.

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 Function AddItemFast ( _
    itemType As String, _
    unevaluatedInclude As String _
) As IList(Of ProjectItem)
public IList<ProjectItem> AddItemFast(
    string itemType,
    string unevaluatedInclude
)
public:
IList<ProjectItem^>^ AddItemFast(
    String^ itemType, 
    String^ unevaluatedInclude
)
member AddItemFast : 
        itemType:string * 
        unevaluatedInclude:string -> IList<ProjectItem> 
public function AddItemFast(
    itemType : String, 
    unevaluatedInclude : String
) : IList<ProjectItem>

Parameters

  • unevaluatedInclude
    Type: System.String

    The unevaluated Include attribute to be added to the item.

Return Value

Type: IList<ProjectItem>
Returns a list of the project items added.

Remarks

Appends the item to the first item group that does not have a condition and has either no children or whose first child is an item of the same type.

Evaluates on a best-effort basis: -expands with all items. Items that are defined in the XML below the new item may be used, even though in a real evaluation they would not be.

Only this item is evaluated. Other items that might depend on it are not affected.

This is a convenience that it is understood does not necessarily leave the project in a perfectly self consistent state until reevaluation.

.NET Framework Security

See Also

Reference

Project Class

AddItemFast Overload

Microsoft.Build.Evaluation Namespace