Share via


BuildPropertyGroup.Clone Method

Creates a deep or shallow copy of the BuildPropertyGroup.

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

Syntax

'Declaration
Public Function Clone ( _
    deepClone As Boolean _
) As BuildPropertyGroup
public BuildPropertyGroup Clone(
    bool deepClone
)
public:
BuildPropertyGroup^ Clone(
    bool deepClone
)
member Clone : 
        deepClone:bool -> BuildPropertyGroup
public function Clone(
    deepClone : boolean
) : BuildPropertyGroup

Parameters

Return Value

Type: Microsoft.Build.BuildEngine.BuildPropertyGroup
A copy of the BuildPropertyGroup.

Remarks

A shallow copy of a BuildPropertyGroup references the same property group as the original. Modifications a shallow copy will be reflected in both copies.

A deep copy of a BuildPropertyGroup creates a new XML element to reference so that both copies of the BuildPropertyGroup can be independently modified.

If the BuildPropertyGroup corresponds directly to a PropertyGroup element in the project (rather than corresponding to a collection of virtual properties, such as environment variable and global properties), only deep copies are allowed.

.NET Framework Security

See Also

Reference

BuildPropertyGroup Class

Microsoft.Build.BuildEngine Namespace