【发布时间】: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