本文整理汇总了VB.NET中Microsoft.Build.BuildEngine.ConsoleLogger.Parameters属性的典型用法代码示例。如果您正苦于以下问题:VB.NET ConsoleLogger.Parameters属性的具体用法?VB.NET ConsoleLogger.Parameters怎么用?VB.NET ConsoleLogger.Parameters使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了ConsoleLogger.Parameters属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Module1
Module Module1
'Add references to Microsoft.Build.Framework and
'Microsoft.Build.BuildEngine
Sub Main()
'Create a new Engine object
Dim engine As New Engine()
'Point to the path that contains the .NET Framework 2.0 CLR and tools
engine.BinPath = "c:\windows\microsoft.net\framework\v2.0.xxxxx"
'Instantiate a new FileLogger to generate a build log
Dim logger As New FileLogger()
'Set logfile parameter to indicate the log destination
logger.Parameters = "logfile=c:\temp\build.log"
'Register the logger with the engine
engine.RegisterLogger(logger)
'Build the project file
Dim success As Boolean = engine.BuildProjectFile("c:\temp\validate.proj")
'Unregister all loggers to close the log file
engine.UnregisterAllLoggers()
If success Then
Console.WriteLine("Build succeeded.")
Else
Console.WriteLine("Build failed. View C:\temp\build.log for details.")
End If
End Sub
End Module