loresoft / msbuildtasks

The MSBuild Community Tasks Project is an open source project for MSBuild tasks.
BSD 2-Clause "Simplified" License
946 stars 272 forks source link

TfsClient task fails on VS 2017 #281

Closed Eagle3386 closed 5 years ago

Eagle3386 commented 5 years ago

The candidates for tf.exe's paths neither contain an entry for VS 2017 nor does the previous scheme (C:\Program Files (x86)\Microsoft Visual Studio <VS version>.0\Common7\IDE) work from this version onwards (according to MS).

Instead, the new path - depending on the user's VS edition - looks like this: C:\Program Files (x86)\Microsoft Visual Studio\2017\<edition>\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer

Valid example: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer

I've created a (hopefully future-proof) PR to fix this. Please review and merge or suggest improvements.

Eagle3386 commented 5 years ago

@pwelter34, are you able to have a look at the PR and eventually merge this in the next couple of days?

aolszowka commented 5 years ago

Because TfsClient simply extends ToolTask you should be able to Override ToolPath in your MsBuild Script (the PR will obviously fix the auto-magic discovery):

<TfsClient ToolPath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer"/>

Until the PR is merged.

Eagle3386 commented 5 years ago

Because TfsClient simply extends ToolTask you should be able to Override ToolPath in your MsBuild Script (the PR will obviously fix the auto-magic discovery): (...)

Thanks a lot for the hint! Will use it until merge completes..