title: TeamCity Azure Resource Manager Template: Missing MSBuild
body: <p>I'm using the <a href="https://github.com/JetBrains/teamcity-azure-template" rel="nofollow noreferrer">Azure Resource Manager Template</a> to generate an Azure TeamCity server with an agent on the same Linux CoreOS Azure VM. All the tools are there for building .NET Core projects, but for Xamarin projects, I need the Visual Studio Build Tools enabled on the box.</p>
  
  <p>Following the instructions on <a href="http://www.mono-project.com/download/vs/#download-lin" rel="nofollow noreferrer">http://www.mono-project.com/download/vs/#download-lin</a>, I tried logging onto the agent by connecting to the VM via SSH, and then running:</p>
  
  <pre><code>docker exec -it [container id] bash
  apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
  apt install apt-transport-https
  echo "deb https://download.mono-project.com/repo/ubuntu vs-xenial main" | tee /etc/apt/sources.list.d/mono-official-vs.list
  apt update
  apt install mono-devel #Also apt-install mono-complete
  </code></pre>
  
  <p>However, even after rebooting the TeamCity VM, there is still an unmet requirement, listed as "Mono4.5_x86 exists".</p>
  
  <p>Installing Mono on the agent works; however, every time I restart the agent, the installation is removed.</p>
  
  <p>How can I install Mono on the build agent so that it persists when I restart the agent?</p>