Question

Is it possible to just say to TFS that I have a file (call it Version.txt) and I want it to be checked in at a location (say $/MyProject/MyVersionLocation) and not have any workspace setup for that location?

Something like (pretend Syntax):

tf.exe c:\Version.txt CheckIn $/MyProject/MyVersionLocation /WorkSpaceOverride

If so, how do you do it?

Was it helpful?

Solution

It is not possible to checkin a file without a workspace mapping for that path.

One option would be to use a combination of "tf workspace" and "tf workfold" to dynamically create a workspace before checking in.

For example:

tf workspace /collection:http://server:8080/tfs/Collection /new TempWorkspace /noprompt
tf workfold /collection:<server> /workspace:TempWorkspace /map $/MyProject/MyVersionLocation/Version.txt C:\Version.txt
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top