VCProjectEngine.BuildLogging 属性
获取或设置一个值,该值指示是否将创建日志文件并用有关生成活动的信息填充该日志文件。
命名空间: Microsoft.VisualStudio.VCProjectEngine
程序集: Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)
语法
声明
Property BuildLogging As Boolean
bool BuildLogging { get; set; }
property bool BuildLogging {
bool get ();
void set (bool value);
}
abstract BuildLogging : bool with get, set
function get BuildLogging () : boolean
function set BuildLogging (value : boolean)
属性值
类型:Boolean
如果将创建日志文件并用有关生成活动的信息填充该日志文件,则为 true;否则为 false。
备注
BuildLogging 属性在默认情况下为打开状态。
此属性公开功能可以从 “选项”对话框 ->“项目和解决方案”->“VC++ 项目设置” 属性页。
示例
有关如何编译和运行该示例的信息,请参见 如何:编译项目模型扩展性示例代码。
下面的示例修改集成开发环境 (IDE) (IDE) 的 BuildLogging 属性:
' 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(ProjEng.BuildLogging)
ProjEng.BuildLogging = False
MsgBox(ProjEng.BuildLogging)
End Sub
End Module
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。