Geeks With Blogs
ErwinAI - Enterprise Application Integration (EAI) blog on BizTalk 2004, Visual Studio, and application integration

Custom functoids are very useful for extending the standard mapper toolkit with functionality you always wanted.

For the ad hoc problems, there is the scripting functoid which allows you to write an inline script, that will be included in the map's XSLT. The problem here is that the script needs to be repeated for each map link where it is required.

Therefore, I decided to write the reusable logic in a custom functoid. There are some excellent blog posts on setting up custom functoids, that I used to find out how this is done. See here  and here. Custom functoids are set up as separate .Net projects and can be added to the mapping toolkit, and used in the maps.

What I discovered when we deployed a BizTalk solution containing (generic) custom functoids to a non-development server is that the custom functoids are not installed along with the installer I generated for my solution.

What is the case?

  • The custom functoids and the solution using them are (in our case) different BizTalk solutions.
  • On the development machine, the BizTalk engine can find the functioids after they have been published. This is because we've added the custom functoid assembly (dll) to the GAC using a batch file that calls GACUtil (installed with Visual Studio)
  • On the non-development machines, the BizTalk installer does not add the custom functoids assembly to the GAC. Manual addition using GACUtil is not possible: since we only have Visual Studio installed on the development machine, we don't have the GACUtil tool available on the other servers.

How did we solve this? What follows is a horrifying story of a few manual actions taken to get it done. As far as I can see now, it is the approach that is advised in other blogs as well:

  • Thanks to this blog post, I found the solution for accessing the GAC, even without GACUtil available. See also the documentation by Microsoft.
  • I tweaked the registry of the server so that the GAC displays as a folder in Windows Explorer
  • I created a folder and subfolder for my custom functoids assembly, exacltly following the strtucture and names on the development machine's GAC
  • In this folder, I added the dll of the custom functoids assembly

That did the trick. Wonder what the auditors will think about this.

This is what I am going to look for now: a construct to be added to the installer of and BizTalk solution using the custom functoids, that:

  • Installs the correct version of the custom functoids assembly as part of this solution (this is the simple part, as the installer includes all references dll's in the package)
  • Adds the custom functoids assembly dll to the GAC as part of the installation process.


Posted on Monday, February 20, 2006 6:00 AM BizTalk 2004 Hints, Tips & Tricks | Back to top

Comments on this post: BizTalk 2004 - Deployment of a custom functoid class

# re: BizTalk 2004 - Deployment of a custom functoid class
Requesting Gravatar...

Nice article, very helpful. Thanks!!

nike air
Left by klecike on Sep 07, 2009 8:20 AM

# re: BizTalk 2004 - Deployment of a custom functoid class
Requesting Gravatar...
Wow. This blog is truly a gold mine. I have been wallowing on this for quite sometime and here I am reading about it! I will actually try these tips and let you know how they work out! Thanks again mate.
Left by opiate detox on Jul 07, 2010 12:15 PM

Your comment:
 (will show your gravatar)

Copyright © Erwin Homan | Powered by: