VCConfiguration.ConfigurationType 属性

获取或设置此配置生成的输出的类型。

命名空间:  Microsoft.VisualStudio.VCProjectEngine
程序集:  Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

语法

声明
Property ConfigurationType As ConfigurationTypes
ConfigurationTypes ConfigurationType { get; set; }
property ConfigurationTypes ConfigurationType {
    ConfigurationTypes get ();
    void set (ConfigurationTypes value);
}
abstract ConfigurationType : ConfigurationTypes with get, set
function get ConfigurationType () : ConfigurationTypes
function set ConfigurationType (value : ConfigurationTypes)

属性值

类型:Microsoft.VisualStudio.VCProjectEngine.ConfigurationTypes
一个 ConfigurationTypes 枚举。

备注

使用 ConfigurationTypes 枚举更改此属性的值。

示例

有关如何编译和运行此示例的信息,请参见 如何:编译项目模型扩展性示例代码

下面的示例在集成开发环境 (ide) 中修改 ConfigurationType 属性 (IDE):

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

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs As IVCCollection
        Dim cfg As VCConfiguration
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        cfg.ConfigurationType = ConfigurationTypes.typeStaticLibrary
    End Sub
End Module

.NET Framework 安全性

请参见

参考

VCConfiguration 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间