Aracılığıyla paylaş


VSProject.References Özellik

Alır References koleksiyonu için proje. Salt okunur.

Ad alanı:  VSLangProj
Derleme:  VSLangProj (VSLangProj.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property References As References
    Get
References References { get; }
property References^ References {
    References^ get ();
}
abstract References : References
function get References () : References

Özellik Değeri

Tür: VSLangProj.References
A References koleksiyonu içeren Reference nesneleri, her birini temsil eden bir başvuru.

Açıklamalar

Harici bir bileşen karşı kod yazmak için projenizi ilk bu bileşen için bir başvuru içermelidir. Başvuru için üç tür bileşenlerin yapılabilir: .net derlemeler, com otomasyon sunucuları ve denetimleri ve bileşenleri açığa çıkaran aynı çözüm içindeki diðer projelerden.

Örnekler

[Visual Basic]

' Macro Editor
' Assuming that the first project in the solution is a Visual Basic or C#
' application, this routine lists the references in the project.
Imports VSLangProj
Sub ListReferences()
   ' Retrieve the VSProject object.
   Dim theVSProject As VSProject = _
      CType(DTE.Solution.Projects.Item(1).Object, VSProject)

   ' Retrieve the references collection.
   Dim refs As References = theVSProject.References

   ' Create a string list of the reference names.
   Dim refList As String = ""
   Dim aRef As Reference
   For Each aRef In refs
      refList &= aRef.Identity & ControlChars.CrLf
   Next
   MsgBox(refList)
End Sub

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

VSProject Arabirim

VSLangProj Ad Alanı