Tool to open the AzureDevop page from visual studio - visual-studio

I was wondering if there's a tool/extension that allows a user to open azure DevOps on the current file/position... every time I need to paste an URL in an email about DevOps git code I have to go on DevOps, search for the file, go to the lines...
Any suggestion?
Thanks

Related

What command does the Visual Studio "Publish Preview" feature run under the hood?

I have an ASP.Net Core 2.2 app that I deploy to Azure App Service using the "Publish" option in Visual Studio 2017 (after importing the *.PublishSettings file downloaded from the Azure portal).
There's this nice "Preview" feature which allows me to double-check all the changes that will be made on App Service before actually deploying (i.e. get a "diff" / do a "trial run" / do a "what if"). See image below.
My question: what command does Visual Studio actually run in the background to achieve this? For reasons I won't go into I'd like to know if this "preview" report can be reproduced on the command line.
This is the information I can get, just for your reference:
By using fiddler, when I click the Preview button, I can see it first gets the necessary files from the published azure web app, then I think the visual studio would use something like git to compare the files got from azure with local files. But I cannot get which command are using.
You can raise the issue on msdn of visual studio and azure web app, like here.
I am pretty sure it uses msdeploy with the -whatif flag set. An example of such a command may look like this:
msdeploy.exe -verb:sync
-source:package='path.to.zip'
-dest:auto,ComputerName='...',UserName='$user',Password='pwd',AuthType='Basic'
-enableRule:AppOffline
-whatif
-useCheckSum

TF30063:You are not authorized to access dev.azure.com but I can connect

I am using Azure Devops and VS2017 15.9.7.
I am logged into Devops and can sync.
When I open my project I get a message
"TF30063": You are not authorized to access dev.azure.com/myproject
I have tried going into credentials manager and deleting all the credentials for the devops organisation.
I have looked at this question and tried logging out via the browser within VS
TF30063:You are not authorized to access dev.azure.com but I can connect
I have encountered the same issue. (I need to switch back and forth between work account and test account). Of course, there could be so many reasons and it could be different for each (cached another account, or modified the password).
To resolve this issue I have two methods/steps.
Step 1 is to clear the credential from credential manager:
Go to Control Panel (with small icon view)-->User Accounts-->Manage your credentials (on the left column)-->Select Windows Credentials-->Scroll down to the Generic Credentials section and look for your TFS server connection.
Step 2 is to click on the operation that Connects to the Team Projects which is the button/plug icon in the Team Explorer tab. Then to also right click the project you are getting this issue on and select Connect:
I also have tried other methods but not work for me, if possible, you can check if it is useful to you:
How To Fix TF30063 Error
Error TF30063: You are not authorized to access
The comment by Kirsten Greed in the accepted solution resolved the issue for me. Reproduced here:
The problem was that I was opening the project using the Recent Project section of the start page. I closed VS, re-opened and then opened the project via "connect: in Team Explorer. Then exited. Now it seems to open ok either way.
I had the same issue, It solved by simply rerunning the Visual Studio as Administrator.
Running this command in cmd prompt, forces the re-authentication screen to come up and worked for me:
tf.exe get . /r
NOTE: you may need to locate tf.exe on your disk. For instance I have it at this location: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe
Another reason for this error is that you might have to re-enter your credentials in Visual Studio:
Restarting Visual Studio and connecting to Azure DevOps did the trick for me.
If the is problem like below:
The solution will be like below:
And after that select:
Re-enter your credentials
Step 1: Add
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer" in the environment variable path
Step 2: remove azuredevops org related credential from credential manager
Step 3: Delete this folder:
C:\Users<UserName>\AppData\Local\Microsoft\Team Foundation\7.0\Cache
Step 3:
run tf workspaces /collection:https://dev.azure.com/royalmailgroup in cmd
It might be the case of a password change.
In my case I had update my account password in a different machine. So on machine #02 I went to Visual Studio > Account Settings. After the pop-up opened, there was a message to re-enter credentials.
Sometimes the password isn't updated across all used app/services and you have to enter that manually.
Hope that helps.
None of the other methods above worked for me. I tried this in visual studio 2022 and it worked.
Open the Developer PowerShell (search for PowerShell) and type in the following:
TF vc permission
This will bring up a login screen and allow you to log in.
After that you should have permission.
In Visual Studio>Navigate to Tools > Nuget Package Manager >Package Manage Settings>Azure Service Authentication>Verify/Change the account
Leo Liu's answer got me on the right track. My problem could have originated from having two different Azure DevOps accounts cached in Windows Credentials and Visual Studio started choosing which one to authenticate with at random.
Log out of both accounts in Windows Credentials.
(The Manage Connections window does not have access to source control now.)
Open up the Azure DevOps website and logout there.
Login on Azure DevOps website.
(Visual Studio's Manage Connections can access source control again.)
What did it for me was open VS without code and connect via Team Explorer, but then also it threw the same error and after some time I logged out of azure web and tried connecting via Team Explorer again and it worked.

This account has no subscription - Publishing to Azure from Visual Studio

Earlier this year I successfully deployed a MVC app to Azure from Visual Studio.
Now I'm trying to do the same thing again, but now I am told my azure account "has no subscription".
However I am 100% positive I do have a subscription associated with my email. My old MVC app still runs and I can see my Pay-as-you-go is properly charged.
What I Have tried to fix it
Emptied my browser caches, history, cookies etc.
Removed my account from Visual Studio, restarted, and added them again.
Formatted my computer and reinstalled everything (not really because of this problem, but the timing was perfect).
Updated the Azure SDK to the newest 2.9.5.
I did the following things above based on advice from these pages:
Visual Studio not finding my Azure subscriptions
Unable to publish to Azure with VS2015
No subscription found in windows azure account
But alas, no luck.
The only thing that comes to thought is I tried to add an Azure Pass to my account, but without luck. But I can't see how that should change anything...
So my question is: How do I make Visual Studio recognize my current Pay-as-you-go subscription, so I can publish my services, apps, etc. from Visual Studio directly?
Or at least: What has gone wrong? Whom can I contact to get help with this?
As always, thank you for your time and patience, and please write a comment if you need further information.
You may try to connect first via the server explorer (ctrl+alt+s). (The server explorer has an azure root node, if the azure sdk installed)
If you have connected, the publish wizard won't ask (usually) for sign in again.
In my case, the solution was as follows:
Open Server Explorer in Visual Studio, right-click on Azure and select "Manage and filter subscriptions":
Screenshot of Manage Subscriptions Dialog
Click the Certificates tab, click Import, then click Download subscription file. This will take you to the azure portal page where you can download a .publishsettings file for your subscription. After downloading that file, click the Browse button in the Import dialog shown above and select that file.
I had the same issue. To solve it I opened the server explorer (ctrl+alt+s) and refreshed the Azure connection. It still said 0 subscriptions, but in the publishing options I could connect without any issue.

Visual Studio loses password for Azure Website Publish

I am new to publishing to Azure websites straight from Visual Studio. I am running VS 2015, have setup my Azure website with 1 channel so far and have successfully published to the website. I then, went about my week (several reboots) and finally came back to the project, made some changes then tried to publish with the saved publish settings. The password was missing! And, as you know, it is not really a password but rather the hash of the password.
How do you save this information so you are not forced to build a new publish every time you restart Visual Studio? I now have a half dozen publish profiles, all for the one site!
In your publish profile, next to Resource Group, click "Manage in
Cloud Explorer".
In Cloud Explorer, navigate to your App Service.
In the bottom window, click "Download Publish Profile".
In this file you can find your password.
Make sure you are signed in with your azure account by entering your credentials every so often.
If you are signed in, try not changing or clicking on the password field. Just click on publish without touching the previous info.
I always either import the XML from Azure Web portal, or I select the website by signing into Azure in Visual Studio.
Please let me know if this helped.

how to fetch/import from github to visual studio 2013

Suppose that i have a web application solution on GitHub.
How do i fetch or import the whole web application solution from github to visual studio 2013?
I am expecting something like this:
File -> Open -> Open from source -> enter githublink and credentials -> auto create project and fetch from github
but seems like i cannot found the solution
P/S: I am not looking forward on solution that download the entire zip file from github, open in visual studio and recommit it into github.
Open the Team Explorer tab, at the bottom of the Connect page (power plug icon) you'll see a list of Git Repositories, enter the https uri to your github project and hit clone.
See also: https://stackoverflow.com/a/19893242/736079

Resources