简体   繁体   English

ASP.net核心应用程序的Visual Studio Team Services中的Azure App Service部署失败

[英]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.

相关问题 从Visual Studio Team Services到Azure App Service的连续部署 - Continuous deployment from Visual Studio Team Services to Azure App Service 使用Visual Studio Team Services将带有SQL db的asp.net核心Web应用程序部署到Azure - Deploy a asp.net core web application with sql db to azure using visual studio team services 使用Visual Studio Team Services将ASP.Net Core应用程序部署到Azure网站会出现ERROR_DESTINATION_NOT_REACHABLE错误。 - Deploying ASP.Net Core application to Azure Website using Visual Studio Team Services has an ERROR_DESTINATION_NOT_REACHABLE error. 是否可以通过Visual Studio在Linux服务计划上将ASP.NET Core应用发布到Azure AppService中? - Can I publish a ASP.NET Core app into an Azure AppService on a Linux Service Plan from Visual Studio? Team Services Azure应用服务部署失败-虚拟应用程序角色? - Team Services Azure App Service Deploy failure - Virtual Application characters? 从具有多个项目的Visual Studio Team Services进行Azure持续部署 - Azure Continuous Deployment from Visual Studio Team Services with multiple projects ASP.NET Core后发布未在Visual Studio Team Services上执行 - ASP.NET Core post-publish not executed on Visual Studio Team Services 在Visual Studio Team Services中打开Azure应用服务 - Open Azure App Service in Visual Studio Team Services 使用Visual Studio 2017在Azure应用服务中发布ASP.NET应用程序后获取HTTP错误404 - Getting HTTP ERROR 404 after publishing ASP.NET application in Azure App Service with Visual Studio 2017 Azure App Service上的ASP.NET Core无法从应用程序设置中读取连接字符串 - ASP.NET Core on Azure App Service not reading Connection string from Application settings
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM