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 (強制符號參考) 選項或管理員的 建置匯入程式庫和匯出檔案 選項的功能。

以逗號或分號分隔符號名稱。

如需如何編譯及執行範例的詳細資訊,請參閱 HOW TO:編譯專案模型擴充性的範例程式碼

範例

下列範例修改在整合式開發環境 (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 命名空間