← 返回命令列表

Linux command

msbuild 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Build solution

msbuild [solution.sln]

Build specific configuration

msbuild [project.csproj] /p:Configuration=[Release]

Build specific target

msbuild /t:[Clean]

Restore and build

msbuild /t:Restore;Build

Set verbosity

msbuild /v:[detailed]

Build with parallelism

msbuild /m:[4]

Build to output directory

msbuild /p:OutputPath=[bin/output]

说明

msbuild is the Microsoft Build Engine. It builds .NET applications and solutions. The tool processes project files. Supports parallel builds and custom targets.

参数

/t: _TARGET_
Target to build.
/p: _PROPERTY=VALUE_
Set property value.
/v: _LEVEL_
Verbosity level.
/m _N_
Maximum parallel builds.
/restore
Run restore before build.
/?
Display help information.

FAQ

What is the msbuild command used for?

msbuild is the Microsoft Build Engine. It builds .NET applications and solutions. The tool processes project files. Supports parallel builds and custom targets.

How do I run a basic msbuild example?

Run `msbuild [solution.sln]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does /t: _TARGET_ do in msbuild?

Target to build.