【发布时间】:2018-07-13 04:33:30
【问题描述】:
我将一个项目从 BizTalk 2010 迁移到 BizTalk 2016。我有一个带有 functoid 的地图,它调用外部 dll 文件 MyCompany.Common.Utilities.dll。
XSL 代码是这样的:
<xsl:attribute name="discountedExtendedPrice">
<xsl:variable name="rawDiscountedUnitAmt">
<xsl:value-of select="b:BETRG" xmlns:b="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/INVOIC02/INVOIC02/700"/>
</xsl:variable>
<xsl:variable name="processedDiscountedUnitAmt"
xmlns:myScriptPrefix="http://MyCompany.Common.Utilities"
select="myScriptPrefix:ProcessStringAsDecimal($rawDiscountedUnitAmt)"/>
<xsl:value-of select="$processedDiscountedUnitAmt"/>
当我运行或测试地图时,我收到以下错误:
XSL 转换错误:无法将输出实例写入以下
<file:///C:\Users\asdf\Desktop\Invoices.xml>。 找不到与命名空间关联的脚本或扩展对象 'http://MyCompany.Common.Utilities'.*
地图在旧环境中正常运行 (BizTalk 2010)。该问题仅出现在 BizTalk 2016 中
MyCompany.Common.Utilities.dll 在 GAC 中部署和注册
【问题讨论】:
-
我怀疑这是 32 位与 64 位的问题 - 您可以创建一个引用您的 DLL 的简单控制台应用程序,看看它在 64 位模式下运行时是否有效。
-
如果我删除 XSL 代码并将 dll 用作外部程序集,它可以工作。
标签: xslt biztalk biztalk-mapper biztalk-2016