Status of git clone running in background in Visual Studio 2019 - visual-studio-2019

I just initiated git clone from Visual Studio 2019 Community Edition. The repo is quite large so I clicked "Continue in Background" so the progress window went away. But now I am not seeing anything in the UI indicating the status of the operation. How do I monitor/pause/resume/abort a git clone running in the background in Visual Studio 2019 community edition?
Edit: I can see the progress in the Output Window if I select "Source Control - Git" under "Show output from:".

Related

Why did my automated Visual Studio builds suddenly stopped building?

I have a Visual Studio project that I have been automatically building in GitLab CI for quite some time without any issues. I'm building the solution simply with:
devenv.exe MySolution.sln /Build "Release|x64"
Today, the builds suddenly and silenty started to fail. I have made no changes at all and the build command provides no output either. What is going on?
The most likely cause for Visual Studio builds suddenly starting to fail is an expired Visual Studio license.
Resolving silent build failures
The reason you're not seeing any output is that you're invoking devenv.exe, which is not designed to output to stdout as it's a desktop application.
In your build scripts, you're going to want to use devenv.com. Once you do so, you'll see the following output instead:
Microsoft Visual Studio 2019 Version 16.8.3.
Copyright (C) Microsoft Corp. All rights reserved.
The license for Visual Studio has expired.
The evaluation period for this product has ended.
Resolving expired license
On your build machine, open Visual Studio and check if the license is still valid. Note however, that you need to start Visual Studio with the same user account your build runner uses.
For GitLab CI on a Windows machine, where it's running as a service, Visual Studio will run as the SYSTEM user. So you need to start is as the SYSTEM user as well.
To do so, use psexec. For example:
PsExec.exe -si "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.com"
You will most likely be greeted by a dialog asking you to log in to update your license. Upon completion, your builds will be running smoothly again.

How to connect Visual Studio 2019 to TFS?

Visual Studio Professional 2019 looks to be all set for use of Azure DevOps.
We are using Azure DevOps but also have a large code base still in TFS.
I was using Visual Studio 2017 Enterprise (with TFS) but it seemed this was a 90 day trial.
I have now been issued with Visual Studio Professional 2019.
I should be able to connect Visual Studio Professional 2019 to TFS also ?
How do I do this?
Richard suggested:
Team | Manage Connections then click on manage connections, from where you can connect to servers. "Connect to a Project" form/dialog ..
thanks for this comment !
i.e. in Visual Studio Pro 2019, the option is "Add Azure DevOps Server" even though wanting to add TFS server.
i.e.
In Visual Studio Pro 2017, it looks like this:
At first I have tried (successfully) File, Source Control menu options.
i.e. File | Source Control | Advanced | Open From Server ..
Question then was: "How do I switch Visual Studio Pro 2019 from TFS back to Azure DevOps?"
I have been using Git Gui and Git Bash for working with Azure DevOps so this wasn't so important.
I worked out how to switch between TFS and Azure DevOps projects also via use of this dialog form:

Unshelve to a different branch using Visual Studio Online

Is it possible to unshelve to a different branch using the new Visual Studio Online TFS repository? I've tried using TFS Power Tools 2015 and the following command:
tfpt unshelve /migrate /source:"$/Sportlabs.Sportbench/Development/Sportlabs.Sportbench" /target:"$/Sportlabs.Sportbench/Development6/Sportlabs.Sportbench" "SR-Coaching"
I ran this from C:\Code\TFS\Sportlabs.Sportbench, which is mapped to $/Sportlabs.Sportbench in my local workspace. I've tried using both the Visual Studio 2015 and 2017 Developer command prompts. However, I keep getting the unable to determine the workspace error.
I've read that MS have abandoned power tools in TFS 2017 and built most of them in to TFS. If that's also the case for VS Online, how do I go about unshelving into a different branch?
To identify the current Workspace, tfpt seems to use the Method:
Microsoft.TeamFoundation.VersionControl.Client.Workstation.Current.GetLocalWorkspaceInfo(workspacePath)
I've jsut tried with TFS 2015 API and the call returns no result againt a Workspace of a VSTS project. I've also try with the TFS 2017 API and it works.
I don't think it will ever be possible to use TFPT 2015 againt a VSTS project to do TFVC operations.

tfpt.exe on Visual Studio 2017

Even after installing Productivity Power Tools extension for Visual Studio 2017 I still cannot run tfpt.exe to execute the command suggested on this post:
C:\Development> tfpt unshelve "ShevesetName;UserName" /migrate /source:"$/Project/Source" /target:"$/Project/Target"
Where can I find this program?
The Productivity Power Tools are not the same thing as the TFS Power Tools, so that's why installing it didn't help.
There is no set of TFS 2017 Power Tools. From the TFS 2017 release notes:
Issue: No Power Tools have been released for TFS 2017.
Workaround: We are excited to let you know that most of the previous
Power Tools have been integrated into TFS 2017. The Process Template
Editor is one that has not been integrated, but we are going to
publish a Process Template Editor tool for TFS 2017 to the Visual
Studio Gallery shortly after TFS 2017 is available. We will provide
the link here as soon as it’s published
Just as Daniel said, they are two entirely different things. A supplement :TFS 2017 Process Template Editor is available
In your case, you are trying to use the unshelve command to unshelve a shelveset to another branch in TFS. As a workaround you could use tf Unshelve and Rename command to achieve this in two steps.
Or just install a earlier version VS and Power Tools such as VS2015 and Microsoft Visual Studio Team Foundation Server 2015 Power Tools. After all you just need to match the version of the TFS Power Tools with your Visual Studio client.
Possible workaround, which helped me!
Create a new workspace and do not download all the files.
Unshelve your changes to this new workspace, which would result in having only the modified files from your current branch.
Compare and manually merge your changes into the other branch.
You can use this VisualStudio extension witch does exacly what you want:
MultiMerge - https://marketplace.visualstudio.com/items?itemName=Jesusfan.MultiMerge2022
This extension allow you to unshelve to other branch.
You can use git-tfs to accomplish this. The steps you should perform are (after git and git-tfs have been installed):
create a git branch from the shelveset (git_branch_a).
initialize a git branch (git_branch_b) based on the TFS target branch (tfs_branch_b).
merge the git_branch_a into git_branch_b.
based on the git_branch_b create a shelveset.
the new shelveset can now be unshelved in the tfs_branch_b.

TFS 2015 Requires Test Agent with a Certain Version

When we are trying to queue a build with some coded UI tests, TFS 2015 complains about test agent not being of the correct version.
No agent found in pool 1 which satisfies the specified demains:
Agent.Version -gtVersion 1.94.0
I've downloaded and installed the Agents for Microsoft Visual Studio 2013 Update 5, but I'm not sure if it's the latest possible version we can get.
I'm 100% pretty sure TFS sees our agent.
Is there a way to ensure we have this 1.94.0 version? And where can I find a download link for it? Or maybe, the problem is not with the version?
It's looking for a build agent which version is equal to 1.94.0 rather than the test agent version. Please download the latest build agent from your TFS web portal and configure it.
If you are running tests using Build vNext tasks and want to install agents from a local directory, you need to download Agents for Microsoft Visual Studio 2015 Update 3 - Click on "Tools for Visual Studio 2015" and then select "Agents for Visual Studio 2015" from the left navigation bar.
Or you can add a Visual Studio Test Agent Deployment task in your build step. This task will deploy “Test Agent” to all the machines and configures them automatically for the automation run.

Resources