共用方式為


VCCLCompilerTool.AdditionalUsingDirectories 屬性

取得或設定要搜尋,以解析傳遞至的檔案參考目錄# using 指示詞 (C++)指示詞。 AdditionalUsingDirectories 會公開編譯器之 /AI (指定中繼資料目錄) 選項的功能。

命名空間:  Microsoft.VisualStudio.VCProjectEngine
組件:  Microsoft.VisualStudio.VCProjectEngine (在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

語法

'宣告
Property AdditionalUsingDirectories As String
string AdditionalUsingDirectories { get; set; }
property String^ AdditionalUsingDirectories {
    String^ get ();
    void set (String^ value);
}
abstract AdditionalUsingDirectories : string with get, set
function get AdditionalUsingDirectories () : String
function set AdditionalUsingDirectories (value : String)

屬性值

型別:System.String
要搜尋的目錄,以解析傳遞給 # using 指示詞 (C++) 指示詞的檔案參考。

範例

請參閱HOW TO:編譯專案模型擴充性的範例程式碼如需如何編譯及執行這個範例。

下列範例會修改AdditionalUsingDirectories在整合式的開發環境 (IDE) 中的屬性:

' 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 VCCLCompilerTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCCLCompilerTool")
        tool.AdditionalUsingDirectories = "\MyPath"
        MsgBox(tool.AdditionalIncludeDirectories)
    End Sub
End Module

.NET Framework 安全性

請參閱

參考

VCCLCompilerTool 介面

Microsoft.VisualStudio.VCProjectEngine 命名空間