本文整理汇总了VB.NET中Microsoft.Build.BuildEngine.Engine.Engine构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET Engine构造函数的具体用法?VB.NET Engine怎么用?VB.NET Engine使用的例子?那么恭喜您, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类Microsoft.Build.BuildEngine.Engine
的用法示例。
在下文中一共展示了Engine构造函数的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