Partager via


VCPropertySheet.AddPropertySheet Method

Adds a property sheet to the collection of property sheets directly imported by a property sheet.

Namespace:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Syntax

'Declaration
Function AddPropertySheet ( _
    FileName As String _
) As VCPropertySheet
VCPropertySheet AddPropertySheet(
    string FileName
)
VCPropertySheet^ AddPropertySheet(
    [InAttribute] String^ FileName
)
abstract AddPropertySheet : 
        FileName:string -> VCPropertySheet
function AddPropertySheet(
    FileName : String
) : VCPropertySheet

Parameters

  • FileName
    Type: System.String

    Relative to the importing property sheet, the full path or relative path of the property sheet to add. The path can contain build system macros.

Return Value

Type: Microsoft.VisualStudio.VCProjectEngine.VCPropertySheet
The VCPropertySheet object that corresponds the property sheet that is added.

Remarks

The new property sheet is added last in the evaluation order of the property sheets.

For example, if you want property sheet C:\folder1\P.props to import property sheet C:\folder1\folder2\Q.props, call this method on the property sheet object corresponding to P. For the FileName parameter, specify either "C:\folder1\folder2\Q.props" or "folder2\Q.props". In the latter case, the relative path of Q is with regard to P, and not with regard to the project directory.

.NET Framework Security

See Also

Reference

VCPropertySheet Interface

Microsoft.VisualStudio.VCProjectEngine Namespace