I am trying to automatically configure the TF Workspace for all users when they login on a PC which is different from what they normally code on.
I am currently running the following to configure the workspace via a logon script
./TF.exe workspace /new /collection:azuredevops.url/project /permission:public /location:Server /filetime:current /noprompt
But when the user starts Visual Studio in Team Explorer it is not enabled /online for the user.
Even the "Connect to a project" is empty
How do I configure this in PowerShell or CMD using TF or any other function?
In the command line you are using, I see you set the value of the option /collection as "azuredevops.url/project".
According to the docs about tf workspace command (see here):
/collection: Specifies the project collection.
It seems that the value of the option /collection should be set as the collection URL.
I tried both the collection URL and the project URL in the command, only the collection URL did work, the project URL returned error.
In addition, you can manually try the following command on the machine,
tf.exe workspace /new /collection:<collection URL>
to see if it can normally pop-up the window like as the screenshot shows below.
This can verify if the tf workspace command is working on your machine.
[UPDATE]
The TF.exe is a tool that integrates some interfaces of Azure DevOps. It helps you set up the configurations of TFVC workspace on background, instead of manually filling the parameters via the VS UI. It's not a VS integrating tool that can fill parameters on the VS UI.
When you open VS, to automatically connect the project on the VS UI, you need to use the VS integrating API (or interfaces collection) to achieve the operation on the VS UI. However, currently, we have no such API or CLI to do this. So, you need to manually connect the project after opening VS.
Related
I'm using Git with WebStorm's version control already, but have to use TFS version control. After some research fond this plugin but there is no tutorial that aiming to configure that plugin.
Can anyone guide me?
You can opt for using git tfs, locally you can still use Git and all of the advantages you're used to. And then push from git to TFVC. You'll need to install Team Explorer or the Team Explorer Cross Platform Commandline Tools.
Or you can use the native plugin for, thelatest version of the TFS / Azure DevOps (Server) plugin can be found on the Jetbrains site. It requires TFS 2015 or newer. You can use the plugin you found for older versions of TFS.
A good explanation to get started can be found here. The part to configure TFVC is replicated below.
Visual Studio Team Services plugin and TFVC
Before starting with TFVC, we need an external tool. The tool in question is TF command line tool. It ships with the Microsoft Team Explorer Everywhere 2015 and you can download it here.
The file we are interested in is TEE-CLC-14.0.3.zip. Download it and unzip it in a folder of your choice. You should end up with something similar to this.
Now, open the command prompt, move into the folder where you have extracted the TF command line tool and run the following:
tf eula /accept
If command succeeded and you haven’t received any error, you are good to go.
Now back to IDEA. Open the settings panel.
and move to Version Control -> TFVC pane. In the select path to executable field, enter the exact path to the tf.cmd command file located in TF command line tool folder.
Once done, press the test button and you should see the following message
Confirm all of the open windows and get back to the IDEA welcome page. Now you are ready to choose Team Services TFVC (Preview) version control.
At this point, same as for Git, you will be prompted about the connection towards your TFS. The following dialog will be shown.
Move to the Team Foundation Server tab and specify the address of your TFS server, then click connect. You will now be prompted for the credentials and if everything is ok, you will be shown the list of available TFVC repositories.
You can now create a new workspace directly from IDEA and start working with your TFVC repositories.
I am trying to set up TFS for vscode. I am getting the error, unable to validate the collection assuming 'default collection', when signing in. Any recommendations oh how to resolve this issue.
Firstly make sure you have correctly set the TFVC support.
Below is a short list of steps to get up-and-running with TFVC support:
Install the Team Services extension for Visual Studio Code.
Team Foundation Server requires your domain credentials.
Ensure you have a TF command line client installed (either TF.exe or
the TEE CLC).
Set the tfvc.location VS Code setting to the full path of your TF
command line client.
Open a folder containing a Local TFVC Workspace and sign in when
prompted.
Set the SCM Provider to TFVC.
For more detail tutorial you could also take a look at my reply in this question How can I connect to on-premises TFS using visual studio code?
Back on the error message, it may related to the workspace. Check if you have correctly mapped the workspace. Just try to remap the existing workspace or create a new workspace and map sources to a new local folder, then check that again.
Also just try to specify the collection and team project name in the user settings like this:
{
"tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\tf.exe",
"team.remoteUrl": "http://server:8080/tfs/collection",
"team.teamProject": "TeamProjectName",
"tfvc.restrictWorkspace": true,
"window.zoomLevel": 2
}
I had been trying to setup my VS Code and plugin VS Team Services 1.22.0 (need to setup TEE-CLC). But I have been hitting the same wall.
Checks:
-Java Installl
-Download TEE-CLC
-Installed VS Team Services Plug In
-Setup "tfvc.location"
-Created a local folder in my documents
Over TEE-CLC 14.123.1 I had accepted the Eula(Easy process), created a workspace using the TEE in VSTS(with success):
tf workspace -new MyWorkspace -collection:https://dummy.visualstudio.com/
Workspace 'MyWorkspace' created.
Then the part where I get stuck is mapping my local folder.
I had try official setup process(plugging over VS Code)
Used this How do you create new windows workspace with TFS command line client that is running on unix
Follow videos to setup TEE-CLC without success.
I know I'm missing something but don't find yet what could be.
If you use on-premises TFS, you must be running Team Foundation Server 2015 Update 2 or later.
After installing Team Services extension and TEE CLC (see how to set it up by viewing this video), you also need the following steps:
Set the tfvc.location VS Code setting to the full path of your TF command line client.
Open a folder containing a Local TFVC Workspace and sign in when prompted. Refer to this site.
Set the SCM Provider to TFVC. Refer to this site for more information.
If you are unable to access the existing local workspace using TEE
CLC, try the steps below:
using the CLC, run the tf workspaces -collection:<collection-url> command, to help the CLC be aware of the workspaces in the specified
collection.
Run the tf workfold command from the local folder being accessed from Visual Studio Code.
Running both commands should make the TEE CLC aware of the workspace
and as well as verify that access to it is possible.
I'd like to suggest go through the website below:
https://github.com/Microsoft/vsts-vscode/blob/master/TFVC_README.md
Right now we are using the Cross-Platform CLI for Team Explorer Everywhere to do work on Linux. I want to have a check-in policy that forces users to add a comment to their checkin. Based on this page https://msdn.microsoft.com/en-us/library/gg475890(v=vs.100).aspx it seems like if I use the web interface or Visual Studio, or Visual Studio Command Line these policies won't apply. However, this page doesn't seem to give any information on how to do it using the command line and I can't find info anywhere else. Is there a way I can do this via the Linux command line or even a standalone app, or do I have to use Eclipse?
The Team Explorer Everywhere (TEE) Command-Line Client (CLC) cannot configure check-in policies and the TEE Eclipse plug-in must be used.
I can open internet explorer and login just fine.
Credentials are saved in the credential manager.
Trying to access any tf.exe command results in a TF30063 error.
I do not have VS installed on this machine.
Any suggestions on what to try?
UPDATE:
Here are the step I've taken to get this error.
Login to VS Team Services via IE
At the command prompt:
C:\>tf.exe status /collection:https://xxxxx.visualstudio.com/DefaultCollection
C:\>tf.exe workspaces /collection:https://xxxxx.visualstudio.com
C:\>tf.exe workspace /new /collection:https://xxxxx.visualstudio.com
I've also tried a few others and everyone of them return with the same unauthorized error.
These commands all work on another server that's connected to the same tfs repo with the same credentials, which leads me to believe it's something in IE and/or internet security options.
Taking add files and folders to version control as example, you can specify the user account /login:username,[password] in the command:
tf add itemspec [/lock:(none|checkin|checkout)] [/encoding:filetype]
[/noprompt] [/recursive] [/noignore] [/login:username,[password]]
More commands, see: https://www.visualstudio.com/en-us/docs/tfvc/use-team-foundation-version-control-commands
To use tf.exe command, you need either Visual Studio or Team Explorer is installed. More details please refer Command-line tools for TFS