I am writing automation script for creating local workspace and modify few files in local workspace and finally push the changes to the TFS server and Build the changes using Shelveset build and then checkin the changes if build succeeded.
Is there any way we can push the changes and shelve those changes in C#. I am trying to use tf commands but its not working as expected.
Do we have any command similar to got push in TFS?
Thanks in advance
Is there any way we can push the changes and shelve those changes in C#. I am trying to use tf commands but its not working as expected.
According to the error message, it seems the path in your command line is not correct.
To download TFS code into local workspace, we need to have a local TFVC Workspace on your machine. If you don't have one (as it was my case), you need to create it. The following steps are partially extracted from https://stackoverflow.com/a/21785438/2816119:
Create a local workspace from your command prompt window with the following command:
tf workspace -new MyWorkspace -collection:<<<http://full.URL.of/your/repository>>>
Map your repository folder to your local folder with the following command:
tf workfold -map '$/your/repository/folder/path' /your/local/folder/path -collection:<<<http://full.URL.of/your/repository>>> -workspace:MyWorkspace
If everything went well, you'll see a new sub-folder ".tf" in your local folder.
Or you could use the command line "%PathToIde%\TF.exe" get $/Arquitectura/Main /recursive
to download the TFS code into local workspace, you still ned create a workspace first.
Please check this document and this thread for some details.
Hope this helps.