Use Team Foundation Service and Git Support from Monodevelop - tfs

NOTE: This question was asked before the release of git support in the TFS Service, and this works quite well now. Read more about using tfs service with monodevelop here: http://sviluppomobile.blogspot.se/2013/02/how-to-use-team-foundation-service-with.html
We decided to try out Team Foundation Service (the TFS cloud version) because it has Git support which would (we hoped) help us manage both our VisualStudio and MonoDevelop code in one place.
The question is how to connect to the TFS service in MonoDevelop? From what I can see, I should use HTTPS protocol, for server I just type the name of our TFS service, and for user I type in my live id user#live.com and try to connect.
The problem is the url which becomes something like this
https://user#live.com#projectname.visualstudio.com/
Note the two # signs in the url. Seems that whatever git Tools are used behind MonoDevelop barfs on that:
NGit.Api.Errors.JGitInternalException: Exception caught during execution of fetch command ---> NGit.Errors.NotSupportedException: Invalid URL
If I try to omit the user name from the dialog, I get another error about unauthorized access.
Is there a way to enter/store git username and password somewhere on the mac or in MonoDevelop? I'm pretty sure this would work eventually.

Team Foundation Service (tfs.visualstudio.com, formerly tfspreview.com) does not host git repositories, only Team Foundation Server repositories.
It sounds like you may be conflating two different concepts:
Codeplex, Microsoft's hosting site for open source software, does support both TFS and git hosting, as well as Mercurial.
Microsoft recently announced the git-tf project that allows you to create a local git repository that tracks a remote Team Foundation Server repository.
git-tf was designed with cross-platform users in mind, who use an IDE that does not have native support for Team Foundation Server source code control. It sounds like using git-tf would probably be the most applicable for you.

Related

How to migrate a TFVC project from TFS to AZDO?

How to migrate a TFVC project from TFS to AZDO ?
Goal:
Is to migrate host projects on (TFS 2017) using TFVC, to switch them to Azure DevOps Service (AZDO) using TFVC there too.
My context:
TFS 2017 server version 2 hosting current source projects.
AZDO 2019 service wanting to host projects targeted on TFS.
Context wish:
Keep the history of source projects (TFS) on AZDO services.
I Just want to migrated the projects (TFS) in TFVC to (AZDO) in TFVC, without doing any TFVC -> GIT conversion.
I would like to avoid updating the TFS 2017 server for 2018 then to
the AZDO server to switch to AZDO services afterwards.
You understand
that is a lot of step to just want to switch a project in TFVC on
TFS2017 to a TFVC on AZDO
The easiest way to migrate is to upgrade your TFS2017 server to Azure Devops Server 2019 and then using the full fidelity import feature to upload your whole database backup to Azure Devops Service.
At the moment migration tools support TFS2018u3 as well as Azure Devops Server 2019 and 2019u1 as well as 2020 can be imported into the service. We do these kinds of imports regularly and it's a very straightforward process to restore your TFS server backup to a temporary SQL server, install the correct version of TFS/Ads and have it perform the upgrade in-place during the installation. Then use the migration tools to import the collection into Azure Devops Server. Depending on the size of your collection this may take between a couple of minutes to a couple of hours. I've done the upgrade on my laptop on certain occasions as well, installing Azure Devops Server and SQL Server Developer edition directly on Windows 10. Even a trial versions will do.
For all the details on the. Import process, see:
https://learn.microsoft.com/en-us/azure/devops/migrate/migration-import
If you want to import your tfvc project from one TFS servers to another TFS server/Azure Devops Server, you can detach the project collection on you current TFS server and bacmup/restore the database on another server. It will automatically be upgraded
If your project collection has multiple projects, you can delete the projects you don't need after attaching and upgrading your collection.
There are a few tools to perform a history replay from one server to another, those tools can't import everything, your changes id's will change and you'll lose the exact date a commit was made (and possibly the user who made the commit if that account no longer exists). Tools like:
https://www.opshub.com/products/opshub-visual-studio-migration-utility/
Depending on how old and how big your collection is, it may take many hours to migrate the data. If data has previously been deleted/destroyed or branched across projects or edited during branch operations, then the replay may fail or may be forced to perform alternative actions, some of these operations are no longer supported. I've used opshub on a couple of projects and some it completely failed to migrate, others migrated with incomplete or incorrect data. This was 4 years ago, maybe these were bugs and they were fixed, but since the import tools have been released we've used those almost exclusively.
PS: using tfs-git to convert (part of) your TFVC repo to git would be an alternative which I'd recommend you look into further. TFVC has been declared feature complete and has received very little love in the past few years. It's not supported by the new Multi-stage YAML pipelines, the integration for VS Code has been deprecated, the cross platform commandline tool for tfvc has been deprecated and therefore support for eclipse and rider and intellij as well. Team Explorer in VS 2019 is now pushed to the background with the release of the new git features which have escaped the Team Explorer window. It's clear that TFVC is fighting for a lost cause and that Git is winning, you'll need to switch over at some point.

JetBrains Rider - errors when connecting to on-prem TFS

I am trying to connect latest version (2019.3.4) of Rider to TFS (on premise, TFS 2010).
I went through the steps in their community support (https://rider-support.jetbrains.com/hc/en-us/articles/360000335099-How-to-use-Visual-Studio-s-TFV%D0%A1-local-workspace-in-Rider), and got stuck on the step #6.
Go to VCS -> TFVS -> Manage Workspaces, select your server, and press "Reload workspaces"
I am getting the following error when clicking reload:
If I try to click 'Edit' button, I get a different error:
When I try to view file history, I get this warning
13:50 Problems while loading file history: HTTP 401 Unauthorized
Rider never asked me to authenticate with my VCS (and I see no way of doing that).
What should I do to make it work?
Thanks
The documentation you refer to is using Visual Studio's TFVС local workspace, while TFS 2010 only supports Server workspace. Local & server workspace:
https://learn.microsoft.com/en-us/azure/devops/repos/tfvc/decide-between-using-local-server-workspace?view=azure-devops
Azure DevOps plugin supports working with Git and TFVC repositories on Azure DevOps Services or Team Foundation Server (TFS) 2015+, and support Local workspace only.
So, the answer by Cece is helpful, but does not solve the problem.
It simply turned out that I need a different plugin to Rider.
The one installed by default in recent releases is for Azure DevOps.
There is another one, called TFS - and that's the one to use.
https://plugins.jetbrains.com/plugin/4578-tfs/

Unable to install Test Manager extension on Azure DevOps Server 2019

Recently we have upgraded our TFS server to the latest 2019 version.
As the Admin, I was trying to install the downloaded Test Manager extension just like we did in TFS2017 and TFS2018.
However, I was unable to install it even with full access and TFS test plan subscription.
This extension does not support the version of the Server you are
currently using. See Works With for supported Server versions.
What should I do, am I missing something? Why it not work with TFS2019? Appreciate your help.
This is the expected behavior when you try to install the extension in Azure DevOps Server 2019. You do not need to install extra Test Manger for Azure DevOps Server 2019.
The official link is also clearly: This extension does not support the version of the Server you are currently using. See Works With for supported Server versions.
It only work Works with
Team Foundation Server 2017
Team Foundation Server 2018
Note:
Manual testers do not need this extension and can execute tests as a
Basic user in an Azure DevOps organization/collection. Read more on
this here.
This extension is available out-of-the-box in Azure DevOps Services and Azure DevOps Server (2019 onwards) and hence doesn't need to be acquired for them.
We strongly recommend you to use Azure Test Plans or the Test hub in Azure DevOps Service/Server (a fully featured Test management solution) over Microsoft Test Manager for all your test management requirements. There will be no new versions of Microsoft Test Manager.Microsoft Test Manager 2017 (which shipped with Microsoft Visual Studio 2017) is the last version.
More details please take a look at our official tutorial here.
Besides, to use Azure Test Plans in Azure DevOps service you need some License requirements
Azure Test Plans uses an access level called Basic + Test Plans, which is available from Azure DevOps.
For the Manual testing permissions and access suggest refer this link: https://learn.microsoft.com/en-us/azure/devops/test/manual-test-permissions?view=azure-devops#license-requirements
Hope this helps.
As mentiond in the Extension page:
This extension is available out-of-the-box in Azure DevOps Services and Azure DevOps Server (2019 onwards) and hence doesn't need to be acquired for them.
So you don't to install it, it's exist :) just go to the "Test Pans" tab in the left menu (maybe you need give permissions in the settings).

How can I connect to on-premises TFS using Visual Studio Code?

How can I connect to on-premises TFS using Visual Studio Code? Is that possible the same way as in Visual Studio?
If you need to use Git, all you need is Visual Studio Code. Git is a built-in feature.
In order to also use TFVC you'll need to install an extension. You'll need Visual Studio Code and the Azure Repos Extension and a recent version of Team explorer and/or Team Explorer Command Line Client.
To edit Azure Pipelines (available in Azure DevOps Server 2019), you'll need to also install this Azure Pipelines extension.
The naming is a bit confusing, but these Azure DevOps extension also work with recent version of Team Foundation Server and Azure DevOps Server (new name).
First you need to install the official Azure DevOps Extension for Visual Studio Code which released by Microsoft.
It supports both TFVC and GIT version control type.
Clone your Git repository
With Git, the extension uses the remote origin of your repository to
determine how to connect to Team Services (or your Team Foundation
Server), in most cases you will need to have a Git repository already
cloned locally. If you intend on cloning an existing repository, do so
before proceeding. If you do not have a Git repository cloned locally
but already have a Team Services account (or a Team Foundation Server
instance), you may create a local repository (via git init) and once
you set the "origin" remote for that local repository, the extension
will detect the change to the remote and attempt to contact the Team
Services account (or Team Foundation Server).
Create your TFVC workspace
With TFVC, the extension uses information about the current workspace
to determine how to connect to Team Services (or your Team Foundation
Server). Workspaces can be created using the Visual Studio IDE,
Eclipse or with the JetBrains IDEs (e.g, Android Studio, IntelliJ).
Note: At this time, you will need to have a local TFVC workspace already available on your local machine. More information about the
difference between the two types (and how to determine which one
you're using) can be found here.
You could also take a look at below videos to help get you started using the extension quickly:
Set up the Team Services extension for Visual Studio Code - If
you haven't used the extension before, this video will show you how
to set it up, create a personal access token and get up and running.
Walkthrough of the Team Services extension for Visual Studio
Code - This is a walkthrough of most of the features of the Team
Services extension.
TFVC Source Code Control for Visual Studio Code - This video shows
you how to set up the TFVC support on Windows and demonstrates much
of the functionality available for Team Foundation Version Control.
Above is for Windows machine, if you are working on Mac, please take a look at this answer.
Note:
VS Code will leverage your machine's Git installation, so you need to install Git first before you get these features. Make sure you install at least version 2.0.0.
You need Team Foundation Server 2015 Update 2 or later.

Can we use TFS as Source Code Repository for Salesforce?

Can we use TFS as Source Code Repository for Salesforce? If yes then is there any TFS/Salesforce API which can be used to fetch the latest code from Salesforce Dev Org?
You can store your code in any SCM system. Salesforce orgs also have meta-data that affect configuration and this must be exported, usually via an SFDC plug-in to an IDE like eclipse. Deploying code to SFDC must be through their interfaces and requires test code. This could all be scripted in .NET / PS via SFDC API, but that is beyond the scope of a post like this IMO.
Yes. You can fetch the code from Project collection and deploy into Sandbox.
However, the command line fetch from TFS is still evolving and in TFS 2013 , there are some new changes.
AutoRABIT - a release management suite for Salesforce Applications has support for deployments from Team Foundation Server [ TFS 2013 ] - Salesforce Sandbox or auto-commit from Sandbox to TFS .
Niranjan

Resources