I have a XAML build who I migrated to vNext build. One step is a batch execution.
This batch modifies a version file and checks in TVFC the change.
In XAML build works like a charm. The same batch show me this log:
2019-08-07T18:10:07.7390807Z Current version: 2.0.13.17
2019-08-07T18:10:07.7546806Z C:\agent1\_work\1\s\Version.INI
2019-08-07T18:10:07.7546806Z 1 File(s) copied
2019-08-07T18:10:08.4098764Z TF14067: The item \agent1\_work\1\s\Version.ini could not be found in the ws_1_85;Project Collection Build Service workspace, or you do not have permission to access it.
2019-08-07T18:10:08.7374743Z There are no pending changes matching the specified items.
2019-08-07T18:10:08.7530742Z No files checked in.
It seems there are no files changed. I checked the Version.ini file has been modified successfully. Here the .bat:
\\VersionUpdater\VersionUpdater.exe /UPDATE VERSIONPATH="%~dp0Version.ini" SOLUTIONFOLDER="%~dp0Develop"
xcopy "%~dp0Version.ini" "%~dp0actualversion\" /Y
call %~dp0tf.bat checkout "%~dp0Version.ini"
set /p Version=<"%~dp0Version.ini"
\\VersionUpdater\VersionUpdater.exe /INCREMENT VERSIONPATH="%~dp0Version.ini"
call %~dp0tf.bat checkin "%~dp0Version.ini" /noprompt /comment:"Version upgrade %Version%"
To combat these issues I've built a set of tasks that perform the check-in for you.
See:
What you're likely running into:
Workspace changes:
tf vc checkout
isn't supported on local workspaces
TeamFoundation workspace cache directory moved
tf.exe
/ tf.bat
may be using a different object model cache than the agent.
Possible fixes:
tf checkout
tf
to the client object model of the agent.tf vc workspaces /collection:SERVERURI /computer:AGENTMACHINENAME
to refresh the workspace cache from your batch script.