Checkout, Add, Checkin

I've got a little MSBuild file I'm working up that will execute from my build process template after a successful build. The idea is to take the output of the build (binaries) from the drop folder, then check them into TFS (shared binaries, of course).

I can check out and check in just fine. What I'm having trouble with is TfsSource TaskAction="Add." The parameters for this just evade me. It seems to me that if I check out the binaries from the folder in TFS, then add the files
from the drop folder, then check them in, that would do what I need. Like this:

I just get "Exit Code 100. Nothing Succeeded: Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'." on the Add action.

$(BinaryPath) is passed in from the build definition to the build template.
$(SolutionRoot) is the build server's working folder for the build
$(FilesToAdd) is the ItemGroup of all the files from the drop folder

I suspect I don't understand the Add function properly. Can anyone help?

I went with a copy instead of an Add, and have gotten this to work. However, I've still got a hard-coded path that I need to parameterize in order to make this generic.

<!-- Add the files from the drop folder back to TFS and check them in. --> <MSBuild.ExtensionPack.VisualStudio.TfsSourceTaskAction="Checkout"ItemPath="$(BinaryPath)"Version="2010"WorkingDirectory="$(SolutionRoot)" /> <CopySourceFiles="@(FilesToAdd)"DestinationFolder="$(SolutionRoot)\Sources\Main\MT\_MTDependencies\GCBaseClasses"OverwriteReadOnlyFiles="true"/> <MSBuild.ExtensionPack.VisualStudio.TfsSourceTaskAction="Checkin"ItemPath="$(BinaryPath)"Version="2010"WorkingDirectory="$(SolutionRoot)"ContinueOnError="true"Comments="Auto-checkin"OverrideText="JR" />

<!-- Check out the binaries from TFS--><MSBuild.ExtensionPack.VisualStudio.TfsSourceTaskAction="Checkout"ItemPath="$(BinaryPath)"Version="2010"WorkingDirectory="$(SolutionRoot)"/><!-- Add the files from the drop folder to the Build Agent working folder. --><CopySourceFiles="@(FilesToAdd)"DestinationFolder="$(MyAbsolutePathProperty)$(WorkSpacePath)"OverwriteReadOnlyFiles="true"/><!-- Check in the updated binaries to TFS --><ExecCommand="$(TF) checkin $(BinaryPath) /comment:"***NO_CI***" /bypass /noprompt /recursive /override:"Auto-Build: Version Update" "WorkingDirectory="$(SolutionRoot)"/>

$(BinaryPath) and $(SolutionRoot) are passed in from the calling workflow. @(FilesToAdd) is the enumeration of the files in the Drop Folder (also passed in from the workflow). I used the /bypass parameter of the tf.exe command to override the
gated builds that would have otherwise been triggered by this check-in. It's also the reason I didn't use the Extensions checkin command. As a matter of fact, I could easily have done this whole thing without the extensions altogether.