VCReference.BuildNumber - свойство
The build number of the referenced assembly.
Пространство имен: Microsoft.VisualStudio.VCProjectEngine
Сборка: Microsoft.VisualStudio.VCProjectEngine (в Microsoft.VisualStudio.VCProjectEngine.dll)
Синтаксис
'Декларация
ReadOnly Property BuildNumber As Integer
'Применение
Dim instance As VCReference
Dim value As Integer
value = instance.BuildNumber
int BuildNumber { get; }
property int BuildNumber {
int get ();
}
function get BuildNumber () : int
Значение свойства
Тип: System.Int32
An int value representing the build number of the referenced assembly.
Примеры
See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.
' Add a reference to Microsoft.VisualStudio.VCProjectEngine.
' This example displays the build number of every file referenced in a
' Visual C++ project. Therefore, make sure you have a Visual C++
' project loaded before running this code.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module2
Sub Test()
Dim proj As Project
Dim vcproj As VCProject
Dim ref As VCReference
On Error Resume Next
' Loop each project in the solution.
For Each proj In DTE.Solution.Projects
vcproj = Nothing
vcproj = CType(proj.Object, VCProject)
' If this is a Visual C++ project.
If Not vcproj Is Nothing Then
' Loop each reference in the Visual C++ project.
For Each ref In vcproj.VCReferences
MsgBox("The build number for the file referenced by _
'" & ref.Name & "' is '" & ref.BuildNumber & "'.")
Next
End If
Next
End Sub
End Module
Разрешения
- Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Дополнительные сведения см. в разделе Using Libraries from Partially Trusted Code.