1

I have an ASP.net Core Web API application, hosted in an Azure App Service, setup for continuous deployment via Visual Studio Team Services (was Visual Studio Online).

This application has been deploying fine up until today, my most recent commit has lead to an error at the 'Generating deployment script' stage.

I haven't changed anything related to the project structure since my last successful commit (e.g. no changes to project.json, no projects added/removed from the solution). Just made some regular changes to the code, added an EF migration, etc.

The activity log for the failed deployment just has the following:

Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --aspNetCore "D:\home\site\repository\src\Authenticator" --solutionFile D:\home\site\repository\Authenticator.sln'. Project file path: .\src\Authenticator \r\nD:\Program Files (x86)\SiteExtensions\Kudu\58.50923.2428\bin\Scripts\starter.cmd "D:\Program Files (x86)\SiteExtensions\Kudu\58.50923.2428\bin\node_modules.bin\kuduscript.cmd" -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --aspNetCore "D:\home\site\repository\src\Authenticator" --solutionFile D:\home\site\repository\Authenticator.sln

and the log from the previous successful deployment has this:

Using cached version of deployment script (command: 'azure -y --no-dot-deployment -r "D:\home\site\repository" -o "D:\home\site\deployments\tools" --aspNetCore "D:\home\site\repository\src\Authenticator" --solutionFile D:\home\site\repository\Authenticator.sln').

I'm not sure why these scripts are different, and what the failure is, there are no specific errors listed.

The last successful commit was on the 9th September, so presumably something has changed on the Azure backend since then.

Any ideas what could be causing this, or how I could even get a more detailed log of what's going on?

Esther Fan - MSFT
  • 8,276
  • 4
  • 27
  • 25
David Grogan
  • 53
  • 2
  • 6
  • What's details of your build definition? Is there detail error in _diag folder if you are using on-premises build agent? – starian chen-MSFT Sep 27 '16 at 09:21
  • Have same problem. Last (=successful) deploy was on Sep 19. – Dmitry Sep 27 '16 at 10:46
  • There is no build definition, I'm just using the built-in integration in the Azure Portal that links to VS Online (so I presume no 'on-premises build agent' either - I looked around on the FTP server for a more detailed log, but couldn't find anything). – David Grogan Sep 27 '16 at 11:18

2 Answers2

0

Got the same problem today (previous=successful deployment had been at Sep 19).

Tried to detach and re-attach to Git repository, with clearing all files/folders under D:\home\site - nothing helps.

Finally, created new website (from same repo), inside the same AppService plan - everything deployed and works Ok.

Of course, copying all settings from old website to new one was a pain.

Dmitry
  • 16,110
  • 4
  • 61
  • 73
  • I don't want to do that at the moment, because I'm using the Data Protection service of asp.net core to encrypt some stuff, and that all gets lost when you drop and recreate an app in azure (need to create a thing to import/export all that data, or use an external service instead). In the meantime I've just used a manual publish from VS, which worked fine. – David Grogan Sep 27 '16 at 11:31
  • Only "visible" difference from old site is `WEBSITE_NODE_DEFAULT_VERSION` setting - now `4.4.7`. You can check your one and try to change at your own risk. – Dmitry Sep 27 '16 at 12:06
  • That was the problem! Thanks. – David Grogan Sep 27 '16 at 17:26
  • Wow, great. Will know it too. Posted it as separate answer, for future readers, please re-accept it. – Dmitry Sep 27 '16 at 21:46
0

From comments, as soon as it helps:

It looks that something updated in Azure since website was initially created.

Create new/empty web app and compare its WEBSITE_NODE_DEFAULT_VERSION setting with one in your current web app (it is 4.4.7 today, but can change in the future). Copy this new value to your old (broken) website and rerun deployment.

Dmitry
  • 16,110
  • 4
  • 61
  • 73