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