Automating installation of custom FIM workflow assemblies during development cycle

Last night I was chatting with my ex-co-worker, who just dived-in the world of FIM development. He have had several questions about workflow development for FIM. I have pointed him to my FTE Owner Requirement workflow mentioned before in this blog, and published on CodePlex to serve as an example of FIM workflow for people who are starting out FIM coding.

One of the things that I found annoying, and therefore worth automating is the "deployment" of your activity on the system. When you are working on workflow, and especially when your workflow has a visualization (Admin UX) class, you need to do many routine "moves" before you can successfully attach to the process for debugging. So after your DLL is compiled you need to

  1. Remove previously GACed library form Global Assembly List
  2. GAC your new assembly
  3. Copy assembly to "Portal" folder (along with your symbol’s file)
  4. Restart FIM Service
  5. Restart IIS (if you are writing Admin UX, and not using XOML)

In my book, this counts as tedious routine, especially when you need to do this time and time again over the development cycle.

So, I’ve wrote rather basic CMD file to automate this routine. It is parameterize to allow multiple DLLs to be deployed with the same script. Script uses GACUtils.exe to work with Global Assembly Cache. Utility comes with .NET SDK, I think, and uses dependency library – msvcr71.dll. To simplify everybody’s life I’ll include both in this ZIP file.

As an alternative you might want to consider "converting" this script logic to be a post-compilation job in Visual Studio. Personally, I have found that adding this script as post-build operation is a little bit time-prohibitive, since restarting FIM and IIS services takes some time, however you might want to think about it.


It is worth mentioning that if you are intending to leave your activity behind you might want to make your administrator’s life easier by writing an MSI package that would deploy your custom activity on the production FIM portal. Even though this post provides simple command-line script to deploy your activity during development cycle, mentioned above FTE Owner Requirement activity on CodePlex contains WIX installer project that will reliably deploy your activity on any FIM 2010 portal without you explaning where to place your DLL, how to GAC it and else you need to do with it.

Happy coding!

  1. Dmitri … here’s a blog post of mine on our internal UNIFY wiki on just this subject … I’m a bit confused, but what does your method offer over and above this?

    When deploying your custom workflow assemblies to the GAC you should take advantage of creating a Deployment Project ( to achieve this. Follow the link above to see how this is done quickly and easily, and makes for a smooth deployment of your assemblies. You should then use an appropriate PowerShell script to install your Activity Information Configuration (then IISRESET) to complete the process.
    Also see this article ( for some background of why this approach is preferred over GACUTIL.

    • Bob, thanks for pointing out other available methods for library deployment. I have to agree that “real” deployment project is a better overall solution than a batch file with GACUtil. However, described method provides light and easier way to deploy assemblies. This method is NOT designed for end-product shipment, but rather serves as an automation method during development time, when programmer needs to deploy an assembly every few minutes during debugging/re-writing state of the process. If memory serves me correctly, as this was happening many moons ago, I’ve used this script as post-build event in Visual Studio.
      Additionally, at the time I’ve wrote this blog entry, I was part of FIM product team (if you recall I was ILM2 back then), so material was targeting very first wave of people coding against FIM. Nevertheless, I have published several projects back in 2009/2010 timeframe that are providing rich WIX based installer for FIM activities. WIX is my “weapon of choice”, so to speak when we are talking about writing an actual customer-facing installers. One of them is published here:, which can be served as a template for FIM activity deployment.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: