共用方式為


VCPlatform.IncludeDirectories 屬性

取得或設定當建置 Visual C++ 專案時,要用來搜尋 Include 檔案的路徑。

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

語法

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

屬性值

型別:System.String
當建置 Visual C++ 專案時,要用來搜尋 Include 檔案的路徑。 IncludeDirectories 對應至環境變數 INCLUDE。

備註

根據預設,在Visual C++ 2010,這個屬性不會繼承自父代或專案預設值。若要繼承的預設值,當您將設定包含檔案路徑,請將附加專案**$(IncludePath)**巨集的路徑。繼承屬性類似這樣的專案預設值的範例,請參閱備註和範例ExcludeDirectories

範例

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

下列範例會修改IncludeDirectories在整合式的開發環境 (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 p As VCPlatform
        Dim x As String
        prj = DTE.Solution.Projects.Item(1).Object
        p = prj.Platforms(1)
        x = p.IncludeDirectories
        p.IncludeDirectories = x + ";something"
        MsgBox(p.IncludeDirectories)
    End Sub
End Module

.NET Framework 安全性

請參閱

參考

VCPlatform 介面

Microsoft.VisualStudio.VCProjectEngine 命名空間