Engine.BuildProject 方法
定义
生成指定的项目。Builds the specified project.
重载
| BuildProject(Project) | |
| BuildProject(Project, String) |
生成指定 Project 的指定目标。Builds the specified target of the specified Project. |
| BuildProject(Project, String[]) |
生成指定 Project 的指定目标。Builds the specified targets of the specified Project. |
| BuildProject(Project, String[], IDictionary) |
生成指定 Project 的指定目标,并返回目标的输出。Builds the specified targets of the specified Project, and returns the outputs of the targets. |
| BuildProject(Project, String[], IDictionary, BuildSettings) |
使用指定的 Project 生成指定 BuildSettings 的指定目标,并返回目标的输出。Builds the specified targets of the specified Project with the specified BuildSettings, and returns the outputs of the targets. |
BuildProject(Project)
public:
bool BuildProject(Microsoft::Build::BuildEngine::Project ^ project);
public bool BuildProject (Microsoft.Build.BuildEngine.Project project);
member this.BuildProject : Microsoft.Build.BuildEngine.Project -> bool
Public Function BuildProject (project As Project) As Boolean
参数
返回
如果生成成功,则为 true;否则为 false。true if the build was successful; otherwise, false.
适用于
BuildProject(Project, String)
public:
bool BuildProject(Microsoft::Build::BuildEngine::Project ^ project, System::String ^ targetName);
public bool BuildProject (Microsoft.Build.BuildEngine.Project project, string targetName);
member this.BuildProject : Microsoft.Build.BuildEngine.Project * string -> bool
Public Function BuildProject (project As Project, targetName As String) As Boolean
参数
- targetName
- String
要生成 Target 元素的 Name 特性。The Name attribute of the Target element to build.
返回
如果生成成功,则为 true;否则为 false。true if the build was successful; otherwise, false.
适用于
BuildProject(Project, String[])
public:
bool BuildProject(Microsoft::Build::BuildEngine::Project ^ project, cli::array <System::String ^> ^ targetNames);
public bool BuildProject (Microsoft.Build.BuildEngine.Project project, string[] targetNames);
member this.BuildProject : Microsoft.Build.BuildEngine.Project * string[] -> bool
Public Function BuildProject (project As Project, targetNames As String()) As Boolean
参数
- targetNames
- String[]
一个数组,其中包含要生成的 Name 目标元素的特性。An array that contains the Name attributes of the Target elements to build.
返回
如果生成成功,则为 true;否则为 false。true if the build was successful; otherwise, false.
适用于
BuildProject(Project, String[], IDictionary)
public:
bool BuildProject(Microsoft::Build::BuildEngine::Project ^ project, cli::array <System::String ^> ^ targetNames, System::Collections::IDictionary ^ targetOutputs);
public bool BuildProject (Microsoft.Build.BuildEngine.Project project, string[] targetNames, System.Collections.IDictionary targetOutputs);
member this.BuildProject : Microsoft.Build.BuildEngine.Project * string[] * System.Collections.IDictionary -> bool
Public Function BuildProject (project As Project, targetNames As String(), targetOutputs As IDictionary) As Boolean
参数
- targetNames
- String[]
一个数组,其中包含要生成的 Name 目标元素的特性。An array that contains the Name attributes of the Target elements to build.
- targetOutputs
- IDictionary
生成的目标的输出。The outputs of the built targets. 如果不需要输出,则此参数可以是空引用(在 Visual Basic 中为 Nothing)。This parameter can be a null reference (Nothing in Visual Basic) if outputs are not required.
返回
如果生成成功,则为 true;否则为 false。true if the build was successful; otherwise, false.
适用于
BuildProject(Project, String[], IDictionary, BuildSettings)
使用指定的 Project 生成指定 BuildSettings 的指定目标,并返回目标的输出。Builds the specified targets of the specified Project with the specified BuildSettings, and returns the outputs of the targets.
public:
bool BuildProject(Microsoft::Build::BuildEngine::Project ^ project, cli::array <System::String ^> ^ targetNames, System::Collections::IDictionary ^ targetOutputs, Microsoft::Build::BuildEngine::BuildSettings buildFlags);
public bool BuildProject (Microsoft.Build.BuildEngine.Project project, string[] targetNames, System.Collections.IDictionary targetOutputs, Microsoft.Build.BuildEngine.BuildSettings buildFlags);
member this.BuildProject : Microsoft.Build.BuildEngine.Project * string[] * System.Collections.IDictionary * Microsoft.Build.BuildEngine.BuildSettings -> bool
Public Function BuildProject (project As Project, targetNames As String(), targetOutputs As IDictionary, buildFlags As BuildSettings) As Boolean
参数
- targetNames
- String[]
一个数组,其中包含要生成的 Name 目标元素的特性。An array that contains the Name attributes of the Target elements to build.
- targetOutputs
- IDictionary
生成的目标的输出。The outputs of the built targets. 如果不需要输出,则此参数可以是空引用(在 Visual Basic 中为 Nothing)。This parameter can be a null reference (Nothing in Visual Basic) if outputs are not required.
- buildFlags
- BuildSettings
要应用于生成的 BuildSettings。The BuildSettings to apply to the build.
返回
如果生成成功,则为 true;否则为 false。true if the build was successful; otherwise, false.