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 folder where you are going to download and locally
store the source code.
- Open a command prompt window.
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.