dotnet build
The dotnet command that compiles a project or solution and its dependencies into assemblies.
In more detail
It restores packages first unless told not to, then asks MSBuild to compile. Build the whole solution in continuous integration so a broken test project cannot hide behind a green application build. The -warnaserror switch turns every warning into an error for that build.
Examples
dotnet builddotnet build -warnaserrorRelated terms
- dotnet CLI — The dotnet command-line tool that creates, restores, builds, runs, tests and publishes .NET projects.
- MSBuild — The build engine behind .NET that reads project files and runs the steps that restore packages, compile code and produce output.
- solution — A file (.sln or the newer .slnx) that groups related .NET projects, such as an API, its libraries and its tests, so they can be opened and built together.
- TreatWarningsAsErrors — The build property that turns every compiler and analyzer warning into an error, so code with warnings fails to build.
Taught in
- Solutions, Projects, and Target Frameworks — Modern .NET Core, C# & Enterprise Microservices
- Directory.Build.props, global.json and Central Packages — Modern .NET Core, C# & Enterprise Microservices
- Code Quality: .editorconfig and Roslyn Analyzers — Modern .NET Core, C# & Enterprise Microservices