I have an ASP.Net Core web application (DotNetCore.1.0.1 VS2015Tools.Preview2.0.2) which I'm trying to publish to an Azure App Service via Visual Studio.
The Azure App Service and Resource Group are both completely new.
The publish process fails after several minutes on 'Executing command ["C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe"'. The 'web publish activity' log in Visual Studio says "Retrying the sync because a socket error (10054) occurred. Retrying operation 'Serialization' on object sitemanifest (sourcePath) Attempt 1 of 100." There are many more errors 100 but that is the first one.
I've had this problem a LOT with ASP.Net core and never really resolved it as it just seems to work occasionally.
Can anyone shed any light?
My Publish.ps1 is as follows
[cmdletbinding(SupportsShouldProcess=$true)]
param($publishProperties=@{}, $packOutput, $pubProfilePath)
# to learn more about this file visit https://go.microsoft.com/fwlink/?LinkId=524327
try{
if ($publishProperties['ProjectGuid'] -eq $null){
$publishProperties['ProjectGuid'] = '28343c8d-220f-435e-9b48-bf90a3b9068d'
}
$publishModulePath = Join-Path (Split-Path $MyInvocation.MyCommand.Path) 'publish-module.psm1'
Import-Module $publishModulePath -DisableNameChecking -Force
# call Publish-AspNet to perform the publish operation
Publish-AspNet -publishProperties $publishProperties -packOutput $packOutput -pubProfilePath $pubProfilePath
}
catch{
"An error occurred during publish.`n{0}" -f $_.Exception.Message | Write-Error
}