How to publish to a development slot in Azure from VS Code
Asked Answered
E

2

8

I have an App Service app and a development slot slot azure

I see them too on Vs Code VS Code

But when I publish I can not select the slot enter image description here

Any idea please?

Regards

Extensity answered 4/10, 2019 at 12:1 Comment(0)
E
10

The solution is right click the slot in VSCode and execute Deploy slot command

Thanks

Extensity answered 11/10, 2019 at 11:18 Comment(1)
For those facing the same issue, it is worth noticing that, while working, this approach won't build the application like the standard deploy option would do, so it has to be done manually. I had to publish the app first using dotnet publish -c release and then deploy to a slot like mentioned in this answer and selecting the publish folder which contains the web.config.Muimuir
M
0

As @kintela has identified it can be done by right clicking on the slot. But this does not always work as there seems to be a bug in the AZ VS Code extension that sometimes doesn't allow the slot to be selected for deployment even if it is right-clicked on.

It is possible to instead deploy from the AZ CLI. You'll first need to zip the contents of your dist folder.

Then:

az webapp deployment source config-zip --resource-group [resource-group] --name [web-app-name] --src [./path/source.zip] —slot [staging-slot-name]
Monah answered 21/4, 2022 at 5:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.