How to use Visual Studio's TFVС local workspace in Rider
Rider is able to import TFS workspaces created by Visual Studio. Particular actions required to import a workspace depend on the Azure DevOps plugin installed.
As a prerequisite, you’ll be required to install the Team Explorer Everywhere command-line client (TEE-CLC release), and configure a path to it in Rider Settings | Version Control | TFVC | Classic TF command-line client (choose tf.cmd file on Windows, and tf file on macOS and Linux).
Azure DevOps 1.161 and newer
Local workspace
- Open a solution that is under Visual Studio version control.
- Select the main menu item VCS → Enable Version Control Integration… and select TFVC.
Server workspace
- Run the following command in the command line (as described here and here):
tf.cmd workspaces /collection:<collection-url>
(this command will update the Team Everywhere command-line client workspace cache, so it will know about your workspace) - Open your solution in Rider.
- In case the workspace wasn’t imported automatically (a TFVC tab didn’t appear), select the main menu item VCS | Enable Version Control Integration… and select TFVC.
Azure DevOps 1.160 (only local workspaces are supported)
- Open a solution that is under Visual Studio version control.
- Select a main menu item VCS | Enable Version Control Integration… and select TFVC.
Azure DevOps 1.159 and older (only local workspaces are supported)
- Run the following command in the command line (it is described here and here):
tf.cmd workspaces /collection:<collection-url> - Open your solution in Rider.
- Make sure that the tf.cmd tool is specified in Settings | Version Control | TFVC.
- Call VCS | Enable Version Control Integration.
- Go to VCS | TFVC | Manage Workspaces, select your server, and press Reload workspaces.
- Select the workspace that you use in Visual Studio and press Edit.
- You will see the OAuth window. Sign in to your account.
- After that, press Save Workspace and close the Manage TFVC window.
- After all, you will see a repository in Settings | Version Control | Team Services / TFS, and your project is now ready for working with VCS in Rider.
Please sign in to leave a comment.
If you use a new workspace you need to map remote and local folders by running the command
the <local folder> should be your solution folder with .sln file inside.
Do this step after the second step in this post.
Since release of Azure DevOps plugin v1.160, only items 1, 3 and 4 are required. After enabling of the version control integration, everything else will be performed automatically by the plugin.
On a mac and seem to be doing everything right but my workspaces never show up in Version Control / Azure Dev Ops Services / TFS ?
@..., hello! Please note this is an article about importing of existing workspaces on Windows. If you have any other problems on macOS, then, please, submit a separate request or report your issue directly into the issue tracker.
Ivan,
OK Great, then where do I find instructions for Mac ?
There're no instructions to import Visual Studio workspaces on Mac, because there're no workspaces created by Visual Studio on Mac. According to my knowledge, VS for Mac doesn't support the TFVC. So, you cannot import them, since there's nothing to import.
I am running evaluation copy of Rider 2020. The existing project is under Azure DevOps TFS VCS system (not Azure DevOps git). There are many branches in the project. I am trying to figure out to checkout only specific branches and do regular works like send "Request review", "Review other devs code", "Commit" etc. Merging code from one branch to another is also important part of the code flow. Can you please help with this?
Hello,
I am trying to use my existing VS workspace with rider 2020. When I run the command tf.cmd workspaces command It will open tfs login window, after entering the username and password it shows below error
An error occurred: You do not have permission to access the server.
TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.
TF400813: The user 'Windows Live ID\xxxxxxxx' is not authorized to access this resource.
I checked I have all the access on TFS server and username and password are correct and working, so why it showing Authorization error ? Can anyone please help me to solve the problem ?
Thanks!
Hello Namit Shah116,
To investigate this issue deeper please collect idea.log file after reproducing this behaviour once again (to find this file use menu "Help | Diagnostic Tools | Show Log in ..."). Then please attach it to the issue on Rider tracker I've just created according to your description: https://youtrack.jetbrains.com/issue/RIDER-49848.
Also, it would be great if you could make the following experiment:
- create a new organization on visualstudio.com https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/create-organization?view=azure-devops
If a new organization is created on azure.com, please turn off the setting "Use the new URL" in "Organization settings":
- then try running the command "tf.cmd workspaces" for this created workspace
- let us know about the results (if the issue persists)
Kind regards,
Sofia.
On Rider 2022.1.1 Mac, I cannot figure out how to checkout my existing TFS workspaces. Any guide?
Muhammad Farid, please install the Azure DevOps plugin.
Ivan Migalev I have already installed the plugin. I have already set the tf file. But there is no guide on how to pull down the TFS directories to my local.
<< You will see the OAuth window. Sign in to your account. >>
I don't have the OATH windows.
The TFS url is http://10.10.8.24:8080/tfs/progiciels.
When updating I hae the error
Failed to get changes from command line. roots=D:/Projects
javax.ws.rs.NotAuthorizedException: HTTP 401 Unauthorized
at com.microsoft.alm.plugin.idea.tfvc.core.TFSVcs.getServerContext(TFSVcs.java:287)
Anthony Breneliere,
Could you please collect idea.log file after reproducing this issue, and a screenshot of the window where you see this error message? Share this data via submitting a new support request via `Help | Contact Support`.
To find log files, please use the following paths:
/Users/{User}/Library/Logs/JetBrains/Rider{version}
~/.cache/JetBrains/Rider{version}/log
Thank you in advance.
K.R.
Sofia