[英]Azure App Service Deployment failure from Visual Studio Team Services for ASP.net Core Application
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). 我有一个ASP.net核心Web API应用程序,托管在Azure应用程序服务中,通过Visual Studio Team Services(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 (eg no changes to project.json, no projects added/removed from the solution). 自上次成功提交以来,我没有更改与项目结构相关的任何内容(例如,没有更改project.json,没有从解决方案中添加/删除项目)。 Just made some regular changes to the code, added an EF migration, etc. 刚刚对代码进行了一些定期更改,添加了EF迁移等。
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'. 使用以下命令生成部署脚本:'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 项目文件路径:。\\ 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'). 使用缓存版本的部署脚本(命令:'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. 最后一次成功的提交是在9月9日,所以从那时起,Azure后端可能已经发生了一些变化。
Any ideas what could be causing this, or how I could even get a more detailed log of what's going on? 可能导致这种情况的任何想法,或者我怎么能得到更详细的日志记录?
Got the same problem today (previous=successful deployment had been at Sep 19). 今天遇到了同样的问题(之前=成功部署已经在9月19日)。
Tried to detach and re-attach to Git repository, with clearing all files/folders under D:\\home\\site
- nothing helps. 试图分离并重新连接到Git存储库,清除D:\\home\\site
下的所有文件/文件夹 - 没有任何帮助。
Finally, created new website (from same repo), inside the same AppService plan - everything deployed and works Ok. 最后,在相同的AppService计划中创建了新网站(来自同一个repo) - 所有部署并运行正常。
Of course, copying all settings from old website to new one was a pain. 当然,将所有设置从旧网站复制到新网站是一件痛苦的事。
From comments, as soon as it helps: 从评论中,只要它有所帮助:
It looks that something updated in Azure since website was initially created. 它看起来自Azure最初创建以来在Azure中更新了一些内容。
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). 创建新的/空的Web应用程序,并将其WEBSITE_NODE_DEFAULT_VERSION
设置与当前Web应用程序中的设置进行比较(今天为4.4.7
,但将来可能会更改)。 Copy this new value to your old (broken) website and rerun deployment. 将此新值复制到旧(已损坏)网站并重新运行部署。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.