Brian Rak
Brian Rak

Reputation: 5124

Cannot see Azure resources in Visual Studio 2022 (17.5.3) Publish wizard

I've published my ASP.NET MVC web site to Azure App Service countless times. Today, though, when I tried to do so, I got a publish error. Thinking it might be related to a recent password change, I signed out of my Microsoft account and deleted my old publishing profile so I could start fresh.

However, now, when I use the Publish wizard to set up a new publish profile, it won't even show me my Azure resources. Here's what I'm doing:

  1. Sign out of Microsoft account in Visual Studio.
  2. Right-click web project > Publish...
  3. Click Add a publish profile
  4. Select Azure as the target
  5. Select Azure App Service (Windows) as the specific target
  6. The wizard asks me to sign in.
  7. Sign in.
  8. When the sign-in window goes away, the Publish window momentarily shows the UI for picking the target Azure App Service, but then it immediately switches back to the screen telling me to sign in.

Here are some images:

Prior to signing in...

Prior to signing in

For just a few moments after signing in...

For just a few moment after signing in

Immediately afterward...

Afterward

No matter what I do, I can't see my Azure resources. Is anyone else hitting this? Do I need to delete a folder somewhere to clear out some cruft? Thanks in advance?

Upvotes: 3

Views: 4375

Answers (6)

Shashank
Shashank

Reputation: 101

I had a similar issue. I was trying to publish .NET core API to Azure WebAPP from visual studio community edition in MacOS, but my newly created webapp was not appearing in my visual studio. Eventually I figure out while creating my azure webapp I selected Linux OS, I created new one in Windows OS it started appearing in my visual studio communinty edition.

I am sure OS should not be a reason for this, or I need to do some settings in my visual studio community edition which I am not aware of, but it was working as I wanted and I deployed the my app to Azure WebAPP which I created by selecting the WindowsOS

Thanks

Upvotes: 0

WiseyD
WiseyD

Reputation: 26

Had a similar issue, no azure subscription was showing despite being logged into my account and having a valid subscription. What I found that resolved it for me was ensuring that under account options (Tools > Options > Environment > Accounts) I had "Authenticate across all Azure Active Directories when adding accounts" selected. This wasn't selected under my sign in options, once I selected this I was able to access my Azure subscription from within Visual Studio.

account sign in options

Upvotes: 0

WirelessG
WirelessG

Reputation: 229

I tried all of the above answers with no luck. The only thing that helped was the work-around to download the publishprofiles from the Azure app service and use them. Now however, with VS 17.6.4 it works again. It appears the whole "publish" flow is a bit different in the new version and this finally fixed it for me.

Upvotes: 0

Arpan Paramanik
Arpan Paramanik

Reputation: 11

Try to set "YES" to Access management for Azure resources in the Azure portal. Log in to the Azure portal > Azure Active Directory.

enter image description here

Now click on Properties and set Access management for Azure resources to Yes. I hope this will work. If this does not work then, click on Manage security defaults and set it to Disabled (Not recommended).

enter image description here

Now you can see the Azure resources.

enter image description here

Upvotes: 0

CodeMonkey
CodeMonkey

Reputation: 1

Just for reference I was having the exact same issue as above but it came down to my Azure Access Priveledges having being changed. Once the correct priveledges were restord to my Azure AD profile the visual studio plugin started to work again

Upvotes: 0

Harshitha
Harshitha

Reputation: 7297

This type of issue occurs when there are any pending updates for the Visual Studio.

Check for the update, update / use any latest version of Visual Studio.

  • Install the latest Visual Studio version by selecting Azure development.

enter image description here

  • Check whether the Azure Subscription is in Active state by login in Azure Portal.

  • In Visual Studio => Tools => Options => Azure Service Authentication => Account Selection, select the Azure account.

enter image description here

  • In VS,File => Account Settings, check the Account options.

enter image description here

  • Here Iam using VS 2022 17.5.0 version.
  • Now, try to publish he Application, select Azure App Service=> click on Create new or Create a new Instance.

enter image description here

Upvotes: 1

Related Questions