Be.Stateless.BizTalk.Transforms
Build Pipelines
Latest Release
Release Preview
Overview
Be.Stateless.BizTalk.Transforms is part of the BizTalk.Factory Runtime Package. This component provides a transform class library for general purpose Microsoft BizTalk Server® development.
Debugging Composite Microsoft BizTalk Server® Maps with Extension Objects
Provided the map fixture class derives from TransformFixture base class and that both Be.Stateless.BizTalk.Transform.Unit and BizTalk.Server.2020.Utilities NuGet packages are referenced, it is possible to debug XSLT maps that make use of extension objects or combine other XSLT stylesheets through xsl:include or xsl:import top-level elements.
Notice that the URIs accepted by the href attribute of these top-level elements are resolved by the XslMapUrlResolver class and must conform to its prescribed grammar. Technically though, during a Microsoft Visual Studio®’s debugging session, it is the MapCustomXsltPathResolver helper class that will actually resolve these URIs, trying to locate an XSLT source file on disk instead of inlined in a TransformBase-derived type or embedded as a resource. This resolution will only succeed provided that:
-
The to-be-debugged
XSLTstylesheet file is lying by convention next to the source.btmfile —or equivalently, next to the generated.btm.csfile— in the case of a Microsoft BizTalk Server® map defined by a customXSLT; -
The to-be-debugged
XSLTstylesheet file included or imported through aURIof the formmap://type/<map strong type name>is lying next to the source.btmfile of the included or imported map type; -
The to-be-debugged
XSLTstylesheet file included or imported through aURIof the formmap://resource/<embedded resource name>is lying by convention in a folder, located relatively to the including or importing map, that corresponds to the resource name suffix starting right after what the resource name has in common with the including or importing map type’s full name; -
The to-be-debugged
XSLTstylesheet file included or imported through aURIof the formc:\folder\file.xsltexists on disk.
Tips Run the following commands in an elevated session of the “Developer PowerShell for VS 2019” prompt should the error “Retrieving the COM class factory for component with CLSID {E6756135-1E65-4D17-8576-610761398C3C} failed due to the following error: 80040154 Class not registered.” occurs while debugging map unit tests:
regsvr32 $(Join-Path $env:VSINSTALLDIR 'Common7\IDE\Remote Debugger\x64\msdia140.dll') regsvr32 $(Join-Path $env:VSINSTALLDIR 'Common7\IDE\Remote Debugger\x86\msdia140.dll')Do not forget to reference the
BizTalk.Server.2020.UtilitiesNuGetpackage should the error “Could not load file or assembly Microsoft.VisualStudio.Dia.dll.” occurs.
Customizing To-Be-Debugged XSLT File Resolution
Should the default resolution of the XSLT source file not be conclusive, due to other file layout conventions for instance, the map fixture’s developer can control the resolution mechanism by overriding the TransformFixture.TryResolveXsltPath method, which will always have the precedence over the default resolution used during debugging sessions.
Developer Help
Detailed developer help has been provided as XML comments directly embedded in source code. Though developers usually browse through this documentation while developing thanks to, for instance, JetBrains ReSharper quick help —ctrl+shift+F1, an online version of this inlined help has also been provided here for greater reachability: