【问题标题】:Octopus Deploy cannot find namespace in transform fileOctopus Deploy 在转换文件中找不到命名空间
【发布时间】:2013-09-23 19:19:26
【问题描述】:

一直在尝试将转换应用于我在 Visual Studio 2010 中的配置文件之一

目标文件是这样开始的:

forms.config

    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:x="http://www.sitecore.net/xmlconfig/">
        <sitecore> 
           <formsDataProvider type="Sitecore.Forms.Data.DataProviders.WFMDataProvider,Sitecore.Forms.Core">
             <param desc="connection string">connection string goes here</param>
           </formsDataProvider>

...

转换文件如下:

forms.Staging.config

<?xml version="1.0" encoding="utf-8" ?>
<!-- For more information on using transformations 
 see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:x="http://www.sitecore.net/xmlconfig/" xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <sitecore>
    <formsDataProvider type="Sitecore.Forms.Data.DataProviders.WFMDataProvider,Sitecore.Forms.Core">
      <param desc="connection string" xdt:Transform="Replace" xdt:Locator="Match(desc)">connection string for staging goes here</param>
    </formsDataProvider>
  </sitecore>
</configuration>

当临时构建在 Octopus 上运行时,日志中会显示以下内容:

DEBUG  [XML Transformation] The expected namespace http://schemas.microsoft.com/XML-Document-Transform was not found in the transform file. 

已尝试删除其他 xmlns 属性无济于事。

上述命名空间显然是在转换文件中作为配置节点中的一个属性。我们还有许多其他此类文件,并且可以很好地应用转换。所有转换文件的构建操作都设置为内容。

不确定我们是否可以让 Octopus 将此类消息记录为错误而不是调试。

有没有人遇到过类似的问题?

提前致谢。

【问题讨论】:

    标签: config configuration-files octopus-deploy config-transformation


    【解决方案1】:

    看起来它可能正在尝试将您的 forms.config 应用为转换文件而不是目标。

    您在部署步骤的附加转换中指定了什么?您是否不小心包含了 forms.config 本身?

    【讨论】:

    • 在部署日志中,forms.config 被列为目标文件。 Octopus 在“正在应用 forms.Staging.config 转换文件...”消息后立即抱怨。
    • 其他人在 SiteCore 和非调试|发布 .config 文件的配置转换方面遇到了类似的问题。 this 是你的问题吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-15
    • 2018-01-31
    • 2015-04-18
    • 1970-01-01
    相关资源
    最近更新 更多