Is there workaround for when TFPT is "unable to determine the workspace" and refreshing the cache does not work?
This suggestion from a similar discussion on MSDN forums helped me:
You need to make sure that you are running the commands from a mapped folder, you can run
tf workfold
to see if the current folder is mapped or not (i.e in your case run the commands fromC:\Temp
)
For those in vs2017: try firing up vs2015 (not 2017), make sure to connect to TFS server in vs2015, and then tfpt worked just fine.
But note: it sounds like the tf powertools commands are being integrated into the new tfs tooling, so tfpt is not really a thing in 2017. See Daniel Mann's answer here for more info and helpful links: tfpt.exe on Visual Studio 2017
I had this same error and the problem was that when I ran tfpt from the command line it was resolving to the 2008 version of the power tools instead of the 2010 version.
Run tfpt with no arguments and in the help it dumps out, it tells you which version it is.