VCProjectEngine.ShowEnvironmentInBuildLog 属性

获取或设置一个值,该值指示是否在 Visual C++ 项目生成期间将所有环境变量回显到生成日志中。

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

语法

声明
Property ShowEnvironmentInBuildLog As Boolean
bool ShowEnvironmentInBuildLog { get; set; }
property bool ShowEnvironmentInBuildLog {
    bool get ();
    void set (bool value);
}
abstract ShowEnvironmentInBuildLog : bool with get, set
function get ShowEnvironmentInBuildLog () : boolean
function set ShowEnvironmentInBuildLog (value : boolean)

属性值

类型:System.Boolean
如果将所有环境变量回显到生成日志中,则为 true;否则为 false。

示例

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

下面的示例在集成开发环境将显示 ShowEnvironmentInBuildLog 属性的值 (IDE):

[Visual Basic]

' 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
        Dim ProjEng As VCProjectEngine
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        ProjEng = cfgs.VCProjectEngine
        MsgBox("Show Env. in build log? " & _
          ProjEng.ShowEnvironmentInBuildLog)
    End Sub
End Module

.NET Framework 安全性

请参见

参考

VCProjectEngine 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间