'How to publish to a development slot in Azure from VS Code

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



Solution 1:[1]

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

Thanks

Solution 2:[2]

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]

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 kintela
Solution 2 user2528534