Export (0) Print
Expand All
Expand Minimize

Project Property

Visual Studio .NET 2003

Points to the project this configuration or file is associated with.

[Visual Basic .NET]
Public ReadOnly Property Project() As Object
[Visual Basic 6]
Property Get Project() As Object
[C++]
HRESULT __stdcall get_Project(
   /* [out, retval] */ IDispatch** retVal
);
[C#]
public object Project {get;}
[JScript .NET]
public function get Project() : Object

Example

The following sample code uses the VCConfiguration object's Project property in the development environment:

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim prj, prj2 As VCProject
        Dim cfgs As IVCCollection
        Dim cfg As VCConfiguration
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        prj2 = cfg.project
        ' cfg.project.Name returns project name
    End Sub
End Module

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCConfiguration Object | VCFile Object | VCFilter Object | VCProject Object | VCProjectItem Object

Show:
© 2015 Microsoft