次の方法で共有


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 名前空間