Engine.BinPath プロパティ
アセンブリ: Microsoft.Build.Engine (microsoft.build.engine.dll 内)

/** @property */ public String get_BinPath () /** @property */ public void set_BinPath (String value)
MSBuild.exe へのパス。

Engine オブジェクトを作成し、BuildProjectFile メソッドを使用してプロジェクト ファイルをビルドする例を次に示します。情報をファイルに記録するために、FileLogger クラスが使用されています。
Module Module1 'You need to 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 correct path that contains the 2.0 clr/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") If success Then Console.WriteLine("Build successful") Else Console.WriteLine("Build failed - view the log") End If End Sub End Module
using System; using System.Collections.Generic; using System.Text; using Microsoft.Build.BuildEngine; namespace BuildAProjectCS { class Program { static void Main(string[] args) { // Instantiate a new Engine object Engine engine = new Engine(); // Point to the correct path that contains the 2.0 clr/tools engine.BinPath = @"c:\windows\microsoft.net\framework\v2.0.xxxxx"; // Instantiate a new FileLogger to generate build log FileLogger logger = 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 a project file bool success = engine.BuildProjectFile(@"c:\temp\validate.proj"); if (success) Console.WriteLine("Success!"); else Console.WriteLine("Build failed - look at c:\temp\build.log for details"); } } }


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からEngine.BinPath プロパティを検索する場合は、下記のリンクをクリックしてください。

- Engine.BinPath プロパティのページへのリンク