VCAssemblyReference.StrongName 属性

定义

获取一个值,该值指示所选引用是否具有强名称。

public:
 property bool StrongName { bool get(); };
public:
 property bool StrongName { bool get(); };
[System.Runtime.InteropServices.DispId(2010)]
public bool StrongName { [System.Runtime.InteropServices.DispId(2010)] get; }
[<System.Runtime.InteropServices.DispId(2010)>]
[<get: System.Runtime.InteropServices.DispId(2010)>]
member this.StrongName : bool
Public ReadOnly Property StrongName As Boolean

属性值

Boolean

如果该引用有一个强名称,则为 true,否则为 false

实现

属性

示例

' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a   
' Visual C++ project loaded before running this example.  
Imports EnvDTE  
Imports Microsoft.VisualStudio.VCProjectEngine  
Public Module Module1  
    Sub Test()  
        Dim prj As VCProject  
        Dim cfgs, tools As IVCCollection  
        Dim cfg As VCConfiguration  
        Dim tool As VCManagedWrapperGeneratorTool  
        prj = DTE.Solution.Projects.Item(1).Object  
        cfgs = prj.Configurations  
        cfg = cfgs.Item(1)  
        tool = cfg.Tools("VCManagedWrapperGeneratorTool")  
        MsgBox("Strong name: " & tool.StrongName)  
    End Sub  
End Module  

注解

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

适用于