简体   繁体   English

尽管存在配置,但部署失败并在 VSTS CD 管道中出现错误

[英]Deployment failed with error in VSTS CD pipeline despite configs exist

I am deploying my artifacts to Azure portal, I am getting following error.我正在将我的工件部署到 Azure 门户,但出现以下错误。

Error: XML transformation error while transforming D:\a\_temp\temp_web_package_22187855225775688\Content\D_C\a\1\s\MyApp.Web\obj\ReleaseWeb\Package\PackageTmp\Web.config using D:\a\_temp\temp_web_package_22187855225775688\Content\D_C\a\1\s\MyApp.Web\obj\ReleaseWeb\Package\PackageTmp\Web.Testing.config.

while this file exist in my artifacts.虽然这个文件存在于我的工件中。

在此处输入图片说明

您在错误中的路径是release并且在您的资源管理器窗口中是它的releaseweb

I resolved the issue by permutation & combination with my transformations, it was the issue of transformations but error message mislead me.我通过排列和结合我的转换解决了这个问题,这是转换的问题,但错误消息误导了我。 There was an issue in my Web.Testing.config file.我的 Web.Testing.config 文件中存在问题。

I had the same issue but a slightly different cause - if you have a web.release.config file it will always be applied first.我遇到了同样的问题,但原因略有不同 - 如果您有 web.release.config 文件,它将始终首先应用。 So if you then have web.environment2.config file and are deploying to a that through a stage called environment2 in Azure devops, it actually runs both transforms, first the release one then the stage one.因此,如果您拥有 web.environment2.config 文件并通过 Azure devops 中名为 environment2 的阶段部署到该文件,它实际上会运行两种转换,首先是发布版本,然后是阶段一。

The problem with this is it tries to remove the debug attribute twice from system.web.问题在于它试图从 system.web 中两次删除调试属性。 The fix is to remove this line in web.environment2.config:修复方法是删除 web.environment2.config 中的这一行:

<system.web>
   <compilation xdt:Transform="RemoveAttributes(debug)" />   <!-- REMOVE THIS!-->

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在VSTS CD管道中执行cmd文件 - How to execute a cmd file in VSTS CD pipeline VSTS CI / CD管道NetStandard子目录 - VSTS CI/CD Pipeline NetStandard Subdirectory VSTS构建失败-错误:Web部署任务失败 - VSTS Build failing - Error : Web deployment task failed AngularJS1.5.11的CI / CD管道部署到蔚蓝的网站上,给出错误“由于提供者未知,无法实例化模块app.core:ENV_VARS” - CI/CD pipeline deployment of AngularJS1.5.11 to azure websites giving error “Failed to instantiate module app.core due to Unknown provider: ENV_VARS” 尽管测试成功,但VSTS测试任务失败 - VSTS test task failed despite of success tests 使用 VSTS CI/CD 部署 azure web app 和他们的 webjobs - deployment of azure web app and thier webjobs using VSTS CI/CD ARM错误的VSTS管道部署:找不到与模板文件模式匹配的任何文件 - VSTS Pipeline Deployment of ARM Error: Could not find any file matching the template file pattern 使用VSTS的Data Factory V1的CI / CD管道 - CI/CD pipeline for Data factory V1 using VSTS 具有多环境Azure的VSTS中Angular4应用程序的CI CD管道 - CI CD Pipeline for Angular4 Application in VSTS with Multiple Environment Azure VSTS-使用托管Mac的CI-CD管道 - VSTS - CI-CD pipeline using Hosted Mac
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM