0

I have an ASP.NET Core 6 website project in Visual Studio. The site needs to be published to Azure. I do this by right-clicking on the project, selecting "Publish", get to the publish page and press "Publish" again.

This used to work flawlessly when my app was an ASP.NET Webforms app. Since I transformed to using ASP.NET Core (new from scratch, using the VS supplied template), publishing no longer works.

I have to manually stop the running site, then "Publish", and finally restart the site.

How do I make this work without the manual step, like this used to work in webforms?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Thomas Woelfer
  • 533
  • 5
  • 21

1 Answers1

-1

Tips

Please upgrade your VS2022 to the latest version.


Please confirm the stack of the webapp you are currently using.

enter image description here

The Azure app service runs in a sandbox environment and supports webapps in many languages by default, such as nodejs, python, java...

But we can't rule out that this problem may occur because of this stack. My suggestion is that you can add an extension in kudu site. Please don't forget to restart the site.

enter image description here

After doing this, the sandbox environment can support both Asp.Net and Asp.Net Core.

If this solution not works, you can try to use github.

enter image description here

Jason Pan
  • 15,263
  • 1
  • 14
  • 29
  • I am using the latest version of vs 2022. i am targeting net 6. the runtimes are installed (becasue the app is running. only deployment fails.) – Thomas Woelfer Jun 23 '22 at 08:49
  • @ThomasWoelfer Do you mind using github for continuous deployment? – Jason Pan Jun 23 '22 at 09:09
  • Well we have hundreds of projects in tfs. it is rather inconvenient to put this single project into github. (also, i would like to use continuous deployment, but could never make it work for the website project: thus, i'm not using continous deployment.) – Thomas Woelfer Jun 23 '22 at 09:44