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
属性值
类型:System.Object
配置。
备注
文件中的配置对应于在项目的配置。 有关如何编译和运行此示例的信息,请参见 如何:编译项目模型扩展性示例代码 。
示例
下面的示例在集成开发环境 (ide) 使用 FileConfigurations 属性 (IDE):
' 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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。