Export (0) Print
Expand All
Expand Minimize

VCReferences Property

Visual Studio .NET 2003

Returns the collection of references for the selected project.

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

Return Value

A collection of references for the selected project.


' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a 
' Visual C++ .NET project that contains a reference loaded before running 
' this example.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim ref As VCReference

        prj = DTE.Solution.Item(1).Object
        ref = prj.VCReferences.Item(1)
        MsgBox("Reference name: " & ref.Name)
        MsgBox("Reference path: " & ref.FullPath)
    End Sub
End Module

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

See Also

VCReferences Collection | VCReference Object

Applies To: VCProject Object

© 2014 Microsoft