共用方式為


VCProjectConfigurationProperties.ConfigurationType 屬性

取得和設定這個組態產生的輸出型別。

命名空間:  Microsoft.VisualStudio.VCProject
組件:  Microsoft.VisualStudio.VCProject (在 Microsoft.VisualStudio.VCProject.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.VCProject.ConfigurationTypes
ConfigurationTypes 列舉型別。

備註

使用 ConfigurationTypes 列舉變更這個屬性的值。

範例

[Visual Basic]

下列範例程式碼修改在開發環境中的 ConfigurationType 屬性:

' 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 安全性

請參閱

參考

VCProjectConfigurationProperties 介面

Microsoft.VisualStudio.VCProject 命名空間