共用方式為


VCMidlTool.AdditionalIncludeDirectories 屬性

取得或設定一個或多個要加入至 include 路徑的目錄。

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

語法

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

屬性值

型別:System.String
一個或多個要加入至 include 路徑的目錄。

備註

AdditionalIncludeDirectories公開 (expose) 的編譯器功能/I (其他 Include 目錄)選項,MIDL 編譯器的MIDL 屬性頁:一般選項,而資源編譯器的資源屬性頁選項。

如果要指定一個以上的目錄,請使用分號來分隔清單。

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

範例

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

[Visual Basic]

' 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 VCMidlTool
        Dim oldDeps As String
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCMidlTool")
        oldDeps = tool.AdditionalIncludeDirectories
        tool.AdditionalIncludeDirectories = oldDeps + "c:\dir1;d:\dir2"
    End Sub
End Module

.NET Framework 安全性

請參閱

參考

VCMidlTool 介面

Microsoft.VisualStudio.VCProjectEngine 命名空間