Geeks With Blogs
Stephen W. Thomas BizTalk Blog 100% Pure BizTalk

As you know, a change was made to how custom pipelines components behave in BizTalk Server 2006.  Now they can be placed in the Global Assembly Cache (GAC) as well as in the \Pipeline Components directly.  So what does this mean?  Put them in both place, one place, who knows?

In general, when working with custom pipeline components on a development system the components must be placed in the \Pipeline Components folder to be available for the designer.  When working on a non-development server, putting the components only into the GAC can save on deployment time.  Although this is not really the approach the help guide says (under Developing Custom Pipeline Components), this approach works great in most cases.

Today, I found a big GOT YOU with this approach if the custom component is not put into the GAC before it is used inside Visual Studios.  I found that you must GAC the custom pipeline components BEFORE adding them to the Visual Studios Toolbox or you can run into runtime issues later on.

First, let us take a look at what happens when you add an unsigned and unGACed custom pipeline component to a project.

When you add the component to the Toolbox and drag it onto the Visual Studio design surface, a reference is added to the pipeline component.  As seen below, when the component is not signed and not in the GAC a reference is added to the component in the \Pipeline Components folder.

Not In the GAC

Fig 1: Unsigned and UnGaced 

 

Now, let us take a look at what happens when you add a signed and GACed custom pipeline to a project.

When you add the component to the Toolbox and use it in a pipeline, a reference is added to the pipeline component (same as before).  But this time, the signed and GACed pipeline is referenced to the GACed version of the pipeline component.

 In The GAC

Fig 2: Signed and GACed

 

So why does this matter?  The problem I ran into was I added my custom pipeline component to my solution before I signed it and put it in the GAC.  So when I went to deploy my solution to the development server with the pipeline component only in the GAC, I got a .net runtime error saying it could not find the pipeline in the \Pipeline Components folder. 

Something else to point out is that the pipeline must be put into the GAC before you add the pipeline component to the Toolbox.  Just being signed is not good enough.

The overall moral of the story is: If you only want to put your custom components into the GAC make sure you GAC it before you use it inside the designer.

Posted on Wednesday, September 27, 2006 10:18 PM | Back to top

Copyright © Stephen W. Thomas | Powered by: GeeksWithBlogs.net