Visual Studio 2019 msbuild directory "Current" instead of "15.0"

6

3

I installed the Visual Studio 2019 in my working machine and I noticed the following:

With Visual Studio 2017, the msbuild.exe path is:

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

With Visual Studio 2019, the msbuild.exe path is:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin

There is also a directory with version 15.0, but mine is empty

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\15.0\Bin

What is the goal to use the "Current" folder instead of "15.0"?

Thanks.

pncsoares

Posted 2019-05-20T10:48:41.223

Reputation: 61

What problem are you trying to solve. Microsoft changed the directory structure for MSBuild with VS2019. – Ramhound – 2019-05-20T11:55:31.977

I dont have errors or problems in the deployment. I just wanted to know if it's normal to have a folder named "Current" instead of "15.0" or another version. – pncsoares – 2019-05-20T14:05:12.547

You should ask if the directory path is correct, asking "what the goal is", isn't something we can answer. We are not Microsoft we cannot explain the reason the path changed, only confirm, if the path is correct. – Ramhound – 2019-05-20T15:21:18.830

Sorry for that but maybe someone here could work in Microsoft os just know. Meanwhile, is this path correct? Should I use this path to configure my automatic application deploy that executes the msbuild.exe file? – pncsoares – 2019-05-20T18:52:15.763

It certainly is the default MSBuild path for VS2019. – Ramhound – 2019-05-20T19:42:44.530

Answers

1

MSBuild now located inside VS folder.

Example:

  • c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\

  • c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\

  • c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\

To dynamically find VS - following can be used:

  • %ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe -latest -products * -requires Microsoft.Component.MSBuild -property installationPath

    • D:\Program Files (x86)\Microsoft Visual Studio\2019\Professional

vitrilo

Posted 2019-05-20T10:48:41.223

Reputation: 111