I am having the same issue so I am following this.
VS2019 - Unable to create publish profile - Azure Virtual Machine (Windows Server 2019 Datacenter)

Hi there,
I'm unable to create a publish profile for deploying an ASP.NET 4.7 web application to an Azure Virtual Machine, when using VS2019 Community Edition (16.8.2).
The error shown is "Unable to create publish profile C:\<path>\Properties\PublishProfiles\AppService.pubxml":
The Azure Virtual Machine has been configured with IIS, etc, and has Web Deploy 3.6 installed (as per tutorial-import-publish-settings-iis).
Port 8172 has been opened up (via the Azure Portal).
I can workaround the issue by manually creating a Publish Profile (.publishsettings file) in IIS directly and then importing that into VS2019. The .publishprofile allows me to successfully connect to the server, publish my site and run it, etc.
To me, the VS2019 highlighted above suggests the wrong type of publish profile file is being created.
My VS2019 info is below:
Could yourselves look into it and resolve the bug please?
Many thanks,
John
Azure App Service
5 answers
Sort by: Most helpful
-
-
JayPothuri 6 Reputation points
2020-12-01T15:45:59.71+00:00 Hmm. I have the same problem too.
-
Balaji ch 6 Reputation points
2020-12-22T23:09:38.72+00:00 I am having same issue, how to resolve this.
-
Balaji ch 6 Reputation points
2020-12-22T23:18:51.343+00:00 I got work around.
Choose web deploy instead and manually give all details.
-
Brian Droncheff 1 Reputation point
2021-01-07T23:55:58.21+00:00 While I'm still having the problem, I found a work around which at least allows me to deploy to a folder on the VM. This is done by creating a publish profile and then importing it, the instructions are here