来自 Visual Studio 团队服务的 ASP.net 核心应用程序的 Azure 应用服务部署失败
Azure App Service Deployment failure from Visual Studio Team Services for ASP.net Core Application
我有一个 ASP.net Core Web API 应用程序,托管在 Azure App Service 中,设置为通过 Visual Studio Team Services 进行持续部署(Visual Studio 在线) .
此应用程序一直部署到今天,我最近的提交在 'Generating deployment script' 阶段导致错误。
自上次成功提交以来,我没有更改任何与项目结构相关的内容(例如,project.json 没有更改,解决方案中没有项目 added/removed)。刚刚对代码进行了一些常规更改,添加了 EF 迁移等。
失败部署的 activity 日志只有以下内容:
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.50923.2428\bin\Scripts\starter.cmd "D:\Program Files (x86)\SiteExtensions\Kudu.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
并且之前成功部署的日志包含以下内容:
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').
我不确定为什么这些脚本不同,失败的原因是什么,没有列出具体的错误。
最后一次成功提交是在 9 月 9 日,因此大概从那时起 Azure 后端发生了一些变化。
知道是什么原因造成的,或者我如何才能获得更详细的日志来了解发生的事情?
今天遇到同样的问题(之前=成功部署是在 9 月 19 日)。
尝试分离并重新附加到 Git 存储库,并清除 D:\home\site
下的所有 files/folders - 没有任何帮助。
最后,在同一个 AppService 计划内创建了新网站(来自同一个 repo)- 一切都已部署并且工作正常。
当然,将所有设置从旧网站复制到新网站很痛苦。
来自评论,如有帮助请尽快:
自网站最初创建以来,Azure 中似乎更新了一些内容。
创建 new/empty 网络应用程序并将其 WEBSITE_NODE_DEFAULT_VERSION
设置与您当前网络应用程序中的设置进行比较(今天是 4.4.7
,但将来可能会更改)。将此新值复制到您的旧(损坏)网站并重新运行部署。
我有一个 ASP.net Core Web API 应用程序,托管在 Azure App Service 中,设置为通过 Visual Studio Team Services 进行持续部署(Visual Studio 在线) .
此应用程序一直部署到今天,我最近的提交在 'Generating deployment script' 阶段导致错误。
自上次成功提交以来,我没有更改任何与项目结构相关的内容(例如,project.json 没有更改,解决方案中没有项目 added/removed)。刚刚对代码进行了一些常规更改,添加了 EF 迁移等。
失败部署的 activity 日志只有以下内容:
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.50923.2428\bin\Scripts\starter.cmd "D:\Program Files (x86)\SiteExtensions\Kudu.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
并且之前成功部署的日志包含以下内容:
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').
我不确定为什么这些脚本不同,失败的原因是什么,没有列出具体的错误。
最后一次成功提交是在 9 月 9 日,因此大概从那时起 Azure 后端发生了一些变化。
知道是什么原因造成的,或者我如何才能获得更详细的日志来了解发生的事情?
今天遇到同样的问题(之前=成功部署是在 9 月 19 日)。
尝试分离并重新附加到 Git 存储库,并清除 D:\home\site
下的所有 files/folders - 没有任何帮助。
最后,在同一个 AppService 计划内创建了新网站(来自同一个 repo)- 一切都已部署并且工作正常。
当然,将所有设置从旧网站复制到新网站很痛苦。
来自评论,如有帮助请尽快:
自网站最初创建以来,Azure 中似乎更新了一些内容。
创建 new/empty 网络应用程序并将其 WEBSITE_NODE_DEFAULT_VERSION
设置与您当前网络应用程序中的设置进行比较(今天是 4.4.7
,但将来可能会更改)。将此新值复制到您的旧(损坏)网站并重新运行部署。