4

I have recently upgraded to VS2017 and building with TeamCity. I have a new project that I need to build using TeamCity. I tried to install MS Build on the CI server from the following link https://www.visualstudio.com/downloads/ it said that it has successfully installed it. Restarted the CI server trying to build the project and still cannot find the new Build tools.

I checked under C:\Program Files (x86)\MSBuild\15.0\ but I dont see the MSBuild.exe

pantonis
  • 5,601
  • 12
  • 58
  • 115
  • 1
    Any update for this issue? Have you resolve this issue? If not, please let me know, I will keep follow it. – Leo Liu Sep 26 '17 at 08:31

2 Answers2

8

MSBuild 15 missing after installation

If you want use MSBuild without install Visual Studio, you should download and install vs_BuildTools.exe from below link:

https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15#

After installation complete, you will find the MSBuild.exe under the path:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin

enter image description here

For more detail information, you can refer to: How can I install the VS2017 version of msbuild on a build server without installing the IDE?

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
5

MSBuild is now local to Visual Studio 2017 and multiple versions can be installed side-by-side (e.g. build tools, previews, community + enterprise, etc.)

So a path to msbuild.exe could look like:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin
Martin Ullrich
  • 94,744
  • 25
  • 252
  • 217
  • But I dont want to install Visual Studio on the Continuous Integration server. – pantonis Sep 23 '17 at 09:31
  • You can also install the build tools. But their path will look similar (afaik `BuildTools` instead of `Enterprise`) – Martin Ullrich Sep 23 '17 at 09:39
  • No they are not installed on same path. VS 2017 installs MSBuild on C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\, whereas standalone MSBUilTools are installed on C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0. Problem I am facing is TeamCity is looking VS path not the one where is is actually installed. – WSK Mar 14 '18 at 19:04
  • @WSK maybe you could go with a symlink (https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/) – bnu Mar 16 '18 at 07:19