【TIPS】vsts-agentのdocker imageで.Netがビルドできない


Note: 本記事は、2018年11月時点の内容です。

【Q】vsts-agentのdocker imageで.Netのプロジェクトをビルドしたらエラーになった。なんでエラーになるの?

Docker Hub : vsts-agent

Github : vsts-agent-docker

  • ビルド時のエラーメッセージ例
No agent found in pool Default which satisfies the specified demands:
     msbuild
     visualstudio
     Agent.Version -gtVersion 2.115.0 

【A】vsts-agentには、完全なMSBuild(.Net Coreのみ)が入っていないので.Netのビルドはエラーになるよ。docker imageを使わずに、Windows環境で、Build Toolをインストールしてね。

  • vsts-agentに入っているツールは以下の通り。
Basic command-line utilities (curl, ftp, etc.)
Essential build tools (gcc, make, etc.)
Ansible 2.6.3
Azure CLI 2.0.38
CLang 6.0
CMake 3.10.2
Erlang/OTP 21
Firefox 61.0.1
GCC 5.4.0
Go 1.9.4 and 1.10
Google Chrome 68.0
Haskell 2014.2.0.0
Helm 2.9.1
Heroku CLI 7.7.10
HipHop VM (HHVM) 3.27.1
ImageMagick 6.8.9-9
Java OpenJDK 7 (1.7.0_95), 8 (1.8.0_181), 9 (1.9.0_4), 10 (1.10.0_2), and 11 (1.11.24)
Java tools (Ant 1.9.6, Gradle 4.6, Maven 3.3.9)
jq 1.5-1
kubectl 1.11.1
Mercurial 3.7.3
Miniconda 4.5.4
Mono 5.14.0.177
Microsoft SQL Server Client Tools 17.2.0.1
MySQL Client 5.7.23
MySQL Server 5.7.23
.NET Core SDK 2.1.400 (runtime 2.1.2)
Node.js 8.11.3 LTS (with bower, grunt, gulp, n, parcel, and webpack)
PhantomJS 2.1.1
PHP 5.6, 7.0, 7.1, and 7.2 (with composer, phpunit, and xdebug)
Pollinate 4.33
Powershell Core v6.1.0-preview.2
PyPy2 (6.0.0) and PyPy3 (6.0.0)
Python 2.7.15, 3.4.8, 3.5.5, 3.6.5 and 3.7.0 (available through the Use Python Version task)
rebar 3.6.1
rsync 3.1.1
Ruby 2.3.7, 2.4.4 and 2.5.1 (available through the Use Ruby Version task)
Scala sbt-extras
ShellCheck 0.3.7-5
Sphinx 2.2.9
Subversion 1.9.3
Terraform 0.11.8
xsltproc 1.1.28 and xalan 1.11
Xvfb 2:1.18.4
yarn 1.9.2
  • ↓今後公開される可能性もありそうだが、まだの模様。

Github : MSBuild support

Github : Any plans for releasing images for Windows Containers ??

  • ↓公式ではないが、こんなのを公開している人もいる。ご参考まで。

Github : Building Windows Server Contianers with VSTS