IBuildEngine2.BuildProjectFile Method (String, array<String , IDictionary, IDictionary, String)
Initiates a build of a project file. If the build is successful, the outputs of the specified targets are returned, if any exist.
MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Namespace: Microsoft.Build.Framework
Assembly: Microsoft.Build.Framework (in Microsoft.Build.Framework.dll)
Syntax
'Declaration
Function BuildProjectFile ( _
projectFileName As String, _
targetNames As String(), _
globalProperties As IDictionary, _
targetOutputs As IDictionary, _
toolsVersion As String _
) As Boolean
bool BuildProjectFile(
string projectFileName,
string[] targetNames,
IDictionary globalProperties,
IDictionary targetOutputs,
string toolsVersion
)
bool BuildProjectFile(
String^ projectFileName,
array<String^>^ targetNames,
IDictionary^ globalProperties,
IDictionary^ targetOutputs,
String^ toolsVersion
)
abstract BuildProjectFile :
projectFileName:string *
targetNames:string[] *
globalProperties:IDictionary *
targetOutputs:IDictionary *
toolsVersion:string -> bool
function BuildProjectFile(
projectFileName : String,
targetNames : String[],
globalProperties : IDictionary,
targetOutputs : IDictionary,
toolsVersion : String
) : boolean
Parameters
projectFileName
Type: System.StringThe name of the project file to build.
targetNames
Type: array<System.String[]The names of the target in the project to build. Separate multiple targets with a semicolon (;). Null values are acceptable.
globalProperties
Type: System.Collections.IDictionaryAn IDictionary of additional global properties to apply to the project. The key and value must be String data types.
targetOutputs
Type: System.Collections.IDictionaryThe outputs of each specified target. Null values are acceptable.
toolsVersion
Type: System.StringDefault value = "3.5." Specifies the Toolset version for the build to use. Null values are acceptable.
Return Value
Type: System.Boolean
true if the build was successful; otherwise, false.
Remarks
If no targets are specified, MSBuild builds the default targets of the project.
Target outputs are returned as ITaskItem arrays indexed by target name.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.