[Source: http://geekswithblogs.net/EltonStoneman]
Most of the interfaces you implement for a pipeline component are boilerplate code, so I tend to put them in a base class and just override what's needed. If the base class is in a separate assembly from other pipeline components, and you're using a CI build process to build them all, you may have an issue getting your subsequent pipeline projects to build.
In a typical MSBuild script, I'll get the projects from the solution file(s), and then:
- build the C# projects with MSBuild
- copy any pipeline component assemblies to Program Files\Microsoft BizTalk Server 2006\Pipeline Components
- shell out to devenv for the BizTalk projects
- GAC all the C# and BTS assemblies
When the application is packaged up, all the assemblies will go in the GAC but on the build server, I was getting failures building the pipeline projects, with: error BTP0004: Component 'x.y.z.Decoder' could not be initialized. Pipeline component 'x.y.z' could not be resolved (is an assembly reference missing?).
It turns out the library with the pipeline component base class wasn't being found. Using fuslogvw it seems when devenv builds the pipeline project, it looks in the Pipeline Components folder and finds the component, but when it looks for the base class library, it looks in two other places:
- Program Files\Microsoft BizTalk Server 2006\Developer Tools
- Program Files\Microsoft Visual Studio 8\Common7\IDE
If you don't want to put your pipeline component assembly and its dependencies in the GAC before building the BizTalk projects, this MSBuild snippet copies them to the relevant places:
<ItemGroup>
<PipelineComponents Include="$(BuildOutputDir)\**\x.y.*.PipelineComponents.dll"
Exclude="$(BuildOutputDir)\**\x.y.*.Test.dll"/>
</ItemGroup>
<ItemGroup>
<PipelineComponentsDir Include="C:\Program Files\Microsoft BizTalk Server 2006\Pipeline Components"/>
<PipelineComponentsDir Include="C:\Program Files\Microsoft BizTalk Server 2006\Developer Tools"/>
<PipelineComponentsDir Include="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE"/>
</ItemGroup>
<Target Name ="DeployPipelineComponents">
<Copy SourceFiles="@(PipelineComponents)" DestinationFolder="%(PipelineComponentsDir.Identity)" SkipUnchangedFiles="true"/>
</Target>