共用方式為


VCFile.FileConfigurations 屬性

所選取檔案的組態清單。

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

語法

'宣告
ReadOnly Property FileConfigurations As Object
Object FileConfigurations { get; }
property Object^ FileConfigurations {
    Object^ get ();
}
abstract FileConfigurations : Object with get
function get FileConfigurations () : Object

屬性值

類型:Object
組態的陣列。

備註

在檔案的組態對應於專案的組態。 如需如何編譯及執行範例的詳細資訊,請參閱 如何:編譯專案模型擴充性的範例程式碼

範例

下列範例在整合式開發環境 (IDE) 使用 FileConfigurations 屬性:

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

Public Module Module1
    Sub Test()
        Dim idx, idx2 As Integer
        Dim mycollection As IVCCollection
        Dim file As VCFile
        Dim prj As VCProject
        prj = DTE.Solution.Projects.Item(1).Object
        mycollection = prj.Files
        MsgBox(mycollection.Count)
        For idx = 1 To mycollection.Count
            file = mycollection.Item(idx)
            For idx2 = 1 To file.FileConfigurations.Count
                MsgBox(file.FileConfigurations.Item(idx2).Name())
            Next
        Next
    End Sub
End Module

.NET Framework 安全性

請參閱

參考

VCFile 介面

Microsoft.VisualStudio.VCProjectEngine 命名空間