'Is there an option to force VisualStudio to generate a xxx.deploy.ps1 file at Publish time instead of a xxx.deploy.cmd file?

We're developing an ASP NET Core Web App using Visual Studio 2019.

Our .pubxml file sets <WebPublishMethod> to Package, and when we Publish, VisualStudio creates a file name xxx.deploy.cmd

Is there any way to get the Publish action to generate a xxx.deploy.ps1 file instead of xxx.deploy.cmd?



Sources

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

Source: Stack Overflow

Solution Source