Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Sync not working as -collection specified in the command line #224

Closed
nigelgrannum opened this issue May 10, 2017 · 7 comments
Closed

Sync not working as -collection specified in the command line #224

nigelgrannum opened this issue May 10, 2017 · 7 comments
Labels

Comments

@nigelgrannum
Copy link

nigelgrannum commented May 10, 2017

When running any TFVC command it is failing unexpectedly. The command line has the -collection argument as in
tf get -noprompt -collection:https://ourcompany.visualstudio.com ******** -nosummary c:\Modules\User Interfaces\App -recursive

On my colleagues computer -collection is not an argument on the command line.

@jeffyoung
Copy link
Contributor

jeffyoung commented May 10, 2017

Hi @nigelgrannum. There are several commands where tf.exe prevents the use of the -collection argument while the TEE CLC (tf.cmd or tf) does not. That said, are both of you using the same toolset? If so, which one?

In the TFVC Output window, you'll see a message similar to either:
Using TFVC command line: C:\TEE-CLC-14.114.0\tf.cmd (14.114.0.201703081734)
or
Using TFVC command line: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe (15.112.26410.0)

The first is the TEE CLC, the second is TF.exe.

Can you enable debug logging and provide the log file here (you may want to scrub some of the information before posting)? I don't expect that it is failing due to the lack of the -collection parameter but something else. Also, it would be helpful if you ran the same command from a command prompt to see what output you receive (it may provide a clue as to what's going wrong).

EDIT: In my original post, I erroneously stated that tf.exe requires the use of the -collection argument. It actually fails if you do provide it.

@nigelgrannum
Copy link
Author

I am using C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\TF.EXE and so is my colleague. When I run the command in a cmd prompt without the -collection argument it works fine, but with it I get an Unrecognized command option 'collection'. The example command is "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\TF.EXE" get -noprompt -collection:https://XXXXXX.visualstudio.com ******** -nosummary c:\XXXXXX_Modules\User Interfaces\XXXXXXX -recursive

It works for my colleague because his vscode is not adding the -collection argument.

@nigelgrannum
Copy link
Author

@jeffyoung. See the attached file for debug info.
team-extension.zip

@jeffyoung
Copy link
Contributor

Thanks @nigelgrannum.

I believe the version of TF.exe that you have isn't quite a recent enough version (and the detection that I updated relatively recently doesn't seem to be sufficient to detect it). In your log the first error I see is TFVC errors: TF10120: The value xml is not supported for option format. The error about the collection parameter comes later. But at that point, the extension already checked the version by running tf add -noprompt -?. Unfortunately it didn't log the results (which I'm going to make a change pretty soon here to include). Can you run that command from the command line and provide the output? I have a hunch that it is 14.102.something but I'd like to know for sure.

I do try to detect the version and pop a message that the version isn't recent enough but the current minimum I look for is 14.102.0. I think there might be some version higher than 14.102.0 that still doesn't contain the XML support we need.

@nigelgrannum
Copy link
Author

@jeffyoung Here you go.

Microsoft (R) TF - Team Foundation Version Control Tool, Version 14.102.25619.0
Copyright (c) Microsoft Corporation. All rights reserved.

Adds new files and folders from a local file system location to Team Foundation
version control.

tf vc add [itemspec] [/lock:(none|checkin|checkout)] [/encoding:filetype]
[/noprompt] [/recursive] [/noignore] [/login:username,[password]]

@jeffyoung
Copy link
Contributor

Thanks @nigelgrannum. This is pretty embarrassing but can you change your TF.EXE to TF.exe in your user settings? I was able to reproduce what you're seeing with the exact same version of TF.exe. I'm pretty sure that'll fix it (and I'll be pushing a fix for this soon).

@nigelgrannum
Copy link
Author

@jeffyoung . That fixed it. Thanks a lot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants