VCLinkerTool.ForceSymbolReferences 属性

获取或设置链接器或管理员,以包含对此符号的引用。

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

语法

声明
Property ForceSymbolReferences As String
string ForceSymbolReferences { get; set; }
property String^ ForceSymbolReferences {
    String^ get ();
    void set (String^ value);
}
abstract ForceSymbolReferences : string with get, set
function get ForceSymbolReferences () : String
function set ForceSymbolReferences (value : String)

属性值

类型:System.String
一个表示符号引用的字符串。

备注

ForceSymbolReferences 公开链接器的 /INCLUDE(强制符号引用) 选项或管理员的 生成导入库和导出文件 选项的功能。

用逗号或分号分隔不同的符号名称。

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

示例

下面的示例在集成开发环境 (IDE) 中修改/INCLUDE 管理员选项:

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim mystring As String
        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("VCLibrarianTool")
        tool.ForceSymbolReferences = "symbol1,symbol2"
    End Sub
End Module

.NET Framework 安全性

请参见

参考

VCLinkerTool 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间