Share via


ConfigurationManager 接口

更新:2007 年 11 月

表示 Configuration 对象的矩阵,每个对象对应一个配置名和平台名的组合。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
<GuidAttribute("9043FDA1-345B-4364-900F-BC8598EB8E4F")> _
Public Interface ConfigurationManager _
    Implements IEnumerable
用法
Dim instance As ConfigurationManager
[GuidAttribute("9043FDA1-345B-4364-900F-BC8598EB8E4F")]
public interface ConfigurationManager : IEnumerable
[GuidAttribute(L"9043FDA1-345B-4364-900F-BC8598EB8E4F")]
public interface class ConfigurationManager : IEnumerable
public interface ConfigurationManager extends IEnumerable

备注

从根本上说,ConfigurationManager 对象是一个由项目/项目项配置名和平台名组成的矩阵。矩阵的每个元素都是一个 Configuration 对象。可以引用某个项目或项目项的 ConfigurationManager 对象,但是有些类型的项目不支持项目项级别的生成设置。

使用 EnvDTE.Project.ConfigurationManager 或 EnvDTE.ProjectItem.ConfigurationManager 引用此对象。

示例

Sub ConfigurationManagerExample()
   ' Before running, load a project.
   ' Set references to all necessary objects.
   Dim CM As ConfigurationManager = DTE.Solution.Projects.Item(1).ConfigurationManager
   ' List the configuration name used for the current project.
   MsgBox(CM.Item(2).ConfigurationName)
End Sub

另请参见

参考

ConfigurationManager 成员

EnvDTE 命名空间