We have a build definition in TFS 2015 that have worked fine with Visual Studio 2015 projects and solutions. We have now decided to upgrade to Visual Studio 2017 and thus we
I have a similiar issue and resolved by installing VS2017 in my build agent server and configuring MSBuild to point to my MSBuild 15.0 folder:
On the Advanced options, expand and fill the 'Path to MSBuild' like the image below:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin