Reputation: 3354
As per the title, we have multiple .Net Core Web application projects in a single solution. In order to deploy these we have to right-click publish on each project and the warm up the sites manually.
I would like to automate this process and assume I can do this via e.g. scripting in powershell? However, I wondered if there would be a way to do this via visual studio configuration, or is the scripting methods preferable in this situation?
I'm not sure where to start with this automation process, searches have not turned up any similar results.
Upvotes: 0
Views: 1259
Reputation: 24529
would like to automate this process and assume I can do this via e.g. scripting in powershell?
Please have a try to use the following code, I test it on my side, it works correctly. More details about Publish-AzureWebsiteProject
please refer to the document.
Add-AzureAccount
$websitesName = @('WebAppName1','WebAppName2') # website name
foreach ($name in $websitesName)
{
Publish-AzureWebsiteProject -Name $name -Package 'C:\Tom\netcoreApp.zip' # package
}
How to get the zip file, I test it with Visual Studio 2017.
Upvotes: 1