VCLinkerTool.TypeLibraryResourceID 属性

获取或设置一个值,该值指定要分配给已编译资源中的 .tlb 文件的 ID 号。

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

语法

声明
Property TypeLibraryResourceID As Integer
int TypeLibraryResourceID { get; set; }
property int TypeLibraryResourceID {
    int get ();
    void set (int value);
}
abstract TypeLibraryResourceID : int with get, set
function get TypeLibraryResourceID () : int 
function set TypeLibraryResourceID (value : int)

属性值

类型:Int32
分配给已编译资源中的 .tlb 文件的 ID 号。

备注

TypeLibraryResourceID 公开 /TLBID(指定类型库的资源 ID) 链接器选项的功能。

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

示例

下面的示例在集成开发环境 (IDE) 中修改 TypeLibraryResourceID 属性:

' add reference to Microsoft.VisualStudio.VCProjectEngine
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 VCLinkerTool
    prj = DTE.Solution.Projects.Item(1).Object
    cfgs = prj.Configurations
    cfg = cfgs.Item(1)
    tool = cfg.Tools("VCLinkerTool")
    tool.TypeLibraryResourceID = 2
  End Sub
End Module

.NET Framework 安全性

请参阅

参考

VCLinkerTool 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间