VCProject.VCReferences 属性

获取所选项目的引用的集合。

命名空间:  Microsoft.VisualStudio.VCProjectEngine
程序集:  Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

语法

声明
ReadOnly Property VCReferences As Object
Object VCReferences { get; }
property Object^ VCReferences {
    Object^ get ();
}
abstract VCReferences : Object with get
function get VCReferences () : Object

属性值

类型:System.Object
所选项目的引用的集合。

示例

有关如何编译和运行此示例的信息,请参见 如何:编译项目模型扩展性示例代码

' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a 
' Visual C++ 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

.NET Framework 安全性

请参见

参考

VCProject 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间