Looking for extension similar to GitLense for Azure DevOps - azure-devops

On my private projects I am using Git. I have installed GitLense for Visual Studio Code, which is awesome. I can click on a line, and see who changed it when within which changeset. See red arrows where I have deleted code and so on.
I have a VS2017 project using azure DevOps. I have read about CodeLense, which does not apply on my C++ projects, even in C# it is barely helpful.
Does someone know a similar extension here?

You could install the extension Code Compare to check the file changes.
Also, if you are using Azure DevOps and clone the repo local, we could open Team Explorer->Changes->Actions->View History->select commit and right-click->View Commit Details to check the changes, you could refer to this doc for more details.

Related

Azure devops keeps building those projects that are set not to build in VS Configuration Manager

I setting up a build in Azure devops.
My project is mvc application.
Visual studio 2019
Everything build fines except that I do not want to build one of my projects(It has some issues. I do not want to remove it so i checked it to not be built) and in the configuration Manger the Build check mark is not checked . But the devops keeps building it and it breaks my build. No issue in visual studio 2019. Not sure what to do . Here is my yml file
Any help will be much appreciate it
But the devops keeps building it and it breaks my build.
For this issue, please check the following two points:
1.Whether the changes are committed and pushed to remote azure repo.
2.Since you're build with release+any cpu mode in CI pipeline, you must make sure you unchecked the Build box for Release+Any CPU page instead of Debug+Any CPU page.
In addition, Lance Li gave a detailed analysis about this issue in this case, you can refer to it for details.
I think in some of these project someone might have manully changed the project file or solution file.Beacuse using the configuration manager was not fixing the issue .So We had to remove all the project and set them up again

How pull and push code in tfvc repo in Azure DevOps Organization?

I want to pull and push code from my local ubuntu machine to Azure Repo. I have used repo type tfvc. How can we perform this option from Linux machine?
How pull and push code in tfvc repo in Azure DevOps Organization?
First we need install the Visual Studio code on Linux.
Then, we could use the official Azure Repos which released by Microsoft.
It supports both TFVC and GIT version control type.
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:
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 Linux, please take a look at this similar answer.
Hope this helps.
First Download Team Explorer Everywhere client - https://github.com/Microsoft/team-explorer-everywhere/releases
Then on Download Azure DevOps Services Plugin for IntelliJ IDEA --https://learn.microsoft.com/en-us/previous-versions/azure/devops/java/download-intellij-plug-in?view=azure-devops
Select get from Version Control
Then select your Azure TFVC DevOps Repo and then clone.select AzureDevops TFVC

Azure devops page conflict

2 developers are updating the same file in the same project. the last update gives an error. Because the first updated codes are not found in the file that the 2nd developer is trying to update. Migrate error.
This way, the first updated user's codes are deleted. How can I solve this problem?
Azure devops Repos style.css
a{}b{}
Developer's style.css (First updater)
a{}b{}c{}d{}
2.Developer's style.css
a{}b{}e{}
updated Azure devops repos style.css
a{}b{}e{}
c{} and d{} disappeared
Your team needs to select and adhere to a version control workflow that meets your needs and that is supported by Git (the distributed source control you have apparently chosen). I suggest starting here: Azure Repos Git tutorial.
You might even question whether Git is the appropriate source control choice given your needs. See Choosing the right version control for your project

VSTS reporting capabilities

We're looking at moving from TFS to VSTS. However, one of the features I rely on is the ability to see which developers have got code checked out, when it's getting checked in, and to which branch. I need to see this at the collection level, not per project. Does this functionality exist in VSTS?
Tks
No such built-in features in Azure DevOps (VSTS).
However you can try below workarounds:
To see which developers have got code checked out, you can use the
tool Team Foundation Sidekicks which can retrieve the status
locked/checked out by other users. But the latest version is Version 6.0 only for Visual Studio 2015. Based on my test it's also available for VSTS. Please reference my answers in below threads:
Is there a way in Visual Studio and TFS to view items checked out to local workspaces?
List of checked out files
For when it's getting checked in, and to which branch, you have to
navigate to the specific repository to check the changesets which
include the history. You can also try calling the REST API
(Changesets - Get) to get the information.

How do I move an Azure DevOps project to a different organization?

I have got a project in an old org (from VSTS), that I want to move to my new one.
I can't see any options in Azure DevOps on migrating projects, or any information on the interwebs.
Anyone know how to do it?
If you just need to move repos, you can use the built in clone functions:
Go to the Azure Devops source repo -> Files
Click "Clone"
Choose "Generate Git Credentials"
Create the target repo in the target Azure DevOps
Choose "Import a repository"
Use the URL and credentials from Step 3
Done
This is not supported today. But this feature was planned to develop: make it possible to move a Team Project between Team Project Collections
If your Azure Devops project only tracks code versions using a single Git repo, hence no boards, user stories, tasks, pipelines, etc. then you can do the following:
Clone your project repo.
For example with Visual Studio.
You don't need to clone if you already have a local repo.
Destroy the association with the remote.
For this typically, you need to open a command line prompt in the folder that contains the .git database folder, most likely the solution folder of Visual Studio and type git remote rm origin.
Here is an example using git bash showing the content of the solution folder, including the .git database and the *.sln Visual Studio solution file:
Open the solution with Visual Studio if not already done.
It should now show that you have many commits waiting to be pushed to a remote. For illustration purpose, my toy project only have 8 commits in total.
Click the up arrow and choose your new remote, say a brand new Azure DevOps project, in the organization of your choice, then push.
You are now done cloning the project in another organization. If needed, then destroy the project in the old organization to complete the "move" operation.
There are 3 projects that I know of to achieve this.
A paid for option by Ops Hub -
OpsHub Visual Studio Migration Utility
An open source tool that requires making changes to the work item process template - Azure DevOps Migration tools
An lastly an Unofficial but still written by Microsoft tool to create Azure DevOps project templates - Azure DevOps Demo Generator & extractor tool
With the last one (the Demo Generator) you extract the project as a template, then apply it to the new organisation. As it is a tool for demo's there is no support provided and in my experience it works for simple projects but falls over on anything complex.
Expanding on others' answers, this post regards Pipelines.
Azure DevOps API
Migrating nearly all aspects of a project across organizations is doable, but it is a lot of manual work using the Azure DevOps API. The link below shows you all the end points, variables, etc. From there you'll probably want to write a Power Shell script and do a couple test runs to a dummy Organization.
https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-6.1&viewFallbackFrom=azure-devops-rest-6.0
In App options
If you avoid the API, there is no way to migrate pipelines that preserve build or release history, but you can preserve your configurations and processes by going into your Pipelines and selecting View YAML. From here you can either take this away as notes to recreate the GUI steps in your new org/project location, or actually adopt the YAML standard in your git repository.
I do not believe there is a way to migrate pipeline variables outside of the API. However, you can move the variables to Azure Key Vault and change your pipeline settings (YAML) to reference values from key vault. This is not a large amount of effort and is a nice process improvement.
Lastly, if you have any locally installed pipeline agents for releases, you will need to run the Power Shell script for your new organization on the boxes. Very simple 5m step, but right now the Agent Pools are not sharable across organization.
As #Frederic mentioned in his answer, we can actually easily do it with Visual Studio. I have done this without Visual Studio. The steps involved are below.
Add a User to Both Organization
Configure SSH Key
Update the SSH Key in Source DevOps and Clone the Repository
Check out all the Branches and Tags
Update the SSH Key in the Destination DevOps
Remove Old and Add New Origin
Push all the branches
The commands and detailed explanations can be found here.
BTW, if you need to change the entire Devops Organization tied to your personal Tenant (E.g. VS Enterprise Subscription) and move it to new Tenant, you can change the AAD and point it to the new one e.g. your EA Tenant on Azure commercial cloud.
Before you switch your organization directory, make sure the following statements are true:
You're in the Project Collection Administrator group for the
organization.
You're a member or a guest in the source Azure AD and a
member in the destination Azure AD
You have 100 or fewer users in
your source organization. Otherwise you will have to open a support ticket.
You may have to add the users back in destination org if they do not exist becuase they will loose access the moment you switch the AAD.
you could just download as a zip file and then download it to the destination repo