I use the TFSSource component to checkout a file.
I’ve provided the following properties:
Itemspec: “full path to local mapped file”
ToolPath: “full path to tf.exe to the build server”
WorkingDirectory: “path to the same directory for the checked out file”
I use Windows Server 2012 as a build machine and a hosted TFS for source control (mydomain.visualstudio.com). The build is created using VS 2012.
When I ran the build TFSSource displays this error message:
TF30063: You are not authorized to access [HOSTED TFS ULR]
Here is the full stack:
WorkingDirectory: [AS EXPLAINED ABOVE]
Itemspec: [AS EXPLAINED ABOVE]
Comments: new file added
Running C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\TF.exe checkout
“[FULL PATH TO THE FILE TO CHECKOUT – THE FILE EXISTS" /noprompt
TF30063: You are not authorized to access MYDOMAIN.visualstudio.com\DefaultCollection.
Local path [MY LOCAL PATH]
I understand that this component is just a wrapper to tf.exe so I tried to narrow down the issue doing the following:
I used InvokeProcess component to a bat file which has a call to tf.exe with the same parameters
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\TF.exe" checkout "[FULL PATH TO THE FILE” /noprompt
And it works ok.
I’ve got a copy of the project from codeplex and updated TfsSource.cs hardcoding the paths and removing ActivityContext and compiled it as a console application. I used InvokeProcess to run this console application
and it works as well.
I tried to provide the Login but it didn't help. Also it looks like the Collection property is not supported.
Both checkouts worked under the Account Service account which is one created by hosted TFS.
Is there anything else I need to provide to this component? Is there an issue with the user this extension runs under?