xbuild command not found

In this troubleshooting guide we learn how to fix xbuild command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

xbuild: command not found

or when using sudo you get the following error message

sudo: xbuild: command not found

Solutions to xbuild: command not found

How To Fix xbuild: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu xbuild is provided by mono-xbuild package.

mono-xbuild is:

Mono is a platform for running and developing applications based on the ECMA/ISO Standards. Mono is an open source effort led by Xamarin. Mono provides a complete CLR (Common Language Runtime) including compiler and runtime, which can produce and execute CIL (Common Intermediate Language) bytecode (aka assemblies), and a class library.

xbuild is Mono’s implementation of msbuild and allows projects that have a msbuild file to be compiled natively on Linux.

Microsoft Build (msbuild) is a build system developed by Microsoft similar in spirit to Nant (in that it uses XML files for describing the build process) and in the same spirit as make.

http://www.mono-project.com/Microsoft.Build

To fix this problem, we can install more using the command below.

sudo apt-get -y install mono-xbuild

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install mono-xbuild.

sudo apt -y install mono-xbuild

Or if you have aptitude installed you can use the following command.

sudo aptitude install mono-xbuild

Summary

In this tutorial we learn how to fix xbuild command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.