Command scripts to Checkin files to TFVC in Azure DevOps Pipeline
Agree with Daniel, the first thing I need to make clear whether we take source from source control for build or not, storing file(s) into source control by scripts is not a recommended way. It may pollute our source code.
If you insist on doing this, then you need to be aware of the risks involved in doing this before you check into your TFVC source control.
To check-in files to TFVC source control, we could use the tf.exe
in the command line, like:
"Path\TF.exe" checkin $/Path/Files/recursive
The path for TF.exe
is depend on Visual Studio version and installation settings, for Visual Studio 2017:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe
You could check this thread for some more details.
Hope this helps.