8

I created a ASP.Net Web Application (MVC) to publish it onto a Azure VM. However, I am getting the following error.

enter image description here

In the folder structure given, there isn't a file called PublishProfiles\AppService.pubxml created. Can someone help me solve this ?

Illep
  • 16,375
  • 46
  • 171
  • 302
  • Have you checked the permissions for the folder and on the vm? https://learn.microsoft.com/en-us/answers/questions/99545/visual-studio-unable-to-create-publish-profile.html – PerfectlyPanda Jan 09 '21 at 01:02
  • I believe that some of the folders in the path doesn't exist, or as @SamaraSoucy said, you don't have permissions to create folders or create files... – Alberto León Jan 09 '21 at 19:34
  • I am currently having exactly the same problem. In my case, it turns out that the admin on the Azure account has not set up an Azure Hosting subscription. He still hasn't, so I am not sure if it is going to solve the problem. Did this apply to you? – Martin Vaughan May 28 '21 at 15:45

4 Answers4

3

Try to login with the same account on Visual Studio and publish profile that works for me.

Screeshot

EricSchaefer
  • 25,272
  • 21
  • 67
  • 103
luiarhs
  • 43
  • 6
2

I was having the same issue on Visual Studio 2022 when trying to publish a function. I installed the "Azure development" workload and updated to version 17.1.1 and the problem went away.

Steps that I took...

Download the Visual Studio installer from Microsoft https://visualstudio.microsoft.com/downloads/ or search for it on your computer

If there is an update available then click "Update"

enter image description here

When updated, click "Modify" to show what components are installed.

enter image description here

Ensure that "Azure development" workload is checked then click "Modify" in the bottom right corner.

enter image description here

Kevin Brydon
  • 12,524
  • 8
  • 46
  • 76
1

Check if there's any important component missing from your Visual Studio Installer, in my case I needed to have the Azure Webjob component to be able to create a publish profile.

This is an error message that gives you no insight of what is going on.

Gustavo
  • 11
  • 1
0

Both the your Azure service Authentication and Visual studio profile should be same.

Once I loggedin with the same account. This issue got resolved.

enter image description here

enter image description here

Deepak paramesh
  • 495
  • 1
  • 8
  • 19