build_msbuild_project
Build MSBuild projects or solutions with customizable configurations, platforms, and verbosity. Supports NuGet restore and parallel builds.
Instructions
Build an MSBuild project or solution (.sln, .csproj, .vcxproj) file using MSBuild.
This tool dynamically locates the MSBuild executable using the vswhere Python package. It supports flexible build configurations, including verbosity, platform, and additional arguments.
Parameters:
project_path: Path to the project or solution file to build.
configuration: Build configuration (e.g., Debug, Release).
platform: Target platform (e.g., x86, x64).
verbosity: MSBuild output verbosity (quiet, minimal, normal, detailed, diagnostic).
max_cpu_count: Maximum number of CPUs for parallel build (None for default).
restore: Whether to perform NuGet restore before build.
additional_args: Additional MSBuild command-line arguments.
Returns:
A string indicating the build result, including success or filtered error messages.
Use this tool to automate the build process for MSBuild projects, ensuring compatibility with various configurations and environments.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| configuration | No | Debug | |
| platform | No | x64 | |
| verbosity | No | minimal | |
| max_cpu_count | No | ||
| restore | No | ||
| additional_args | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |