1dotnet-msbuild(1)             .NET Documentation             dotnet-msbuild(1)
2
3
4

dotnet msbuild

6       This article applies to: ✔️ .NET Core 3.1 SDK and later versions
7

NAME

9       dotnet-msbuild - Builds a project and all of its dependencies.  Note: A
10       solution or project file may need to be specified if there  are  multi‐
11       ple.
12

SYNOPSIS

14              dotnet msbuild <MSBUILD_ARGUMENTS>
15
16              dotnet msbuild -h
17

DESCRIPTION

19       The dotnet msbuild command allows access to a fully functional MSBuild.
20
21       The  command  has  the  exact same capabilities as the existing MSBuild
22       command-line client for SDK-style projects only.  The options  are  all
23       the  same.   For  more information about the available options, see the
24       MSBuild command-line reference.
25
26       The dotnet build command is  equivalent  to  dotnet  msbuild  -restore.
27       When you don’t want to build the project and you have a specific target
28       you want to run, use dotnet build or dotnet  msbuild  and  specify  the
29       target.
30

EXAMPLES

32       • Build a project and its dependencies:
33
34                dotnet msbuild
35
36       • Build a project and its dependencies using Release configuration:
37
38                dotnet msbuild -property:Configuration=Release
39
40       • Run the publish target and publish for the osx.10.11-x64 RID:
41
42                dotnet msbuild -target:Publish -property:RuntimeIdentifiers=osx.10.11-x64
43
44       • See the whole project with all targets included by the SDK:
45
46                dotnet msbuild -preprocess
47                dotnet msbuild -preprocess:<fileName>.xml
48
49
50
51                                  2022-06-03                 dotnet-msbuild(1)
Impressum