Tuesday, June 02, 2009

Gotcha with the BizTalk Pipeline Component Wizard

When I was in the BizTalk equivalent of "short trousers" I put lots of my integration functionality inside orchestrations (as the training courses suggest).  As I got further under the bonnet, especially when performance was critical or, more recently, when considering asynchronous ESB patterns, I have tried to put more functionality into the messaging infrastructure when designing my BizTalk architectures.  

The key to unlocking the messaging engine is pipelines, where you can manipulate messages and message context without having to fire up the orchestration engine.  However, when I first started to write my own pipeline components I mainly based them on the SDK.  This was OK, but there was a lot of cut&paste in there.  it was a blessing to get hold of the BizTalk Pipeline Component Wizard from Codeplex (http://www.codeplex.com/btsplcw) to use it as a software factory for creating pipeline components.

So there I was, merrily making pipeline components with the pipeline component wizard and all seemed OK.  I created a new project with the wizard when I got this....

So, I created a solution and then created some solution folders to help organise things, and then I right-clicked on a solution folder and chose the project template for PLCW:



And then putting in some options 









So, after this I hit the finish button and:



The actual text is as follows:

System.ArgumentException: Value does not fall within the expected range.

   at EnvDTE.Projects.Item(Object index)

   at MartijnHoogendoorn.BizTalk.Wizards.PipeLineComponentWizard.BizTalkPipeLineWizard.CreateProject(Solution mySolution)

   at MartijnHoogendoorn.BizTalk.Wizards.PipeLineComponentWizard.BizTalkPipeLineWizard.CreateSolution(_DTE IDEObject, Object[] ContextParams)

   at MartijnHoogendoorn.BizTalk.Wizards.PipeLineComponentWizard.BizTalkPipeLineWizard.Execute(Object Application, Int32 hwndOwner, Object[]& ContextParams, Object[]& CustomParams, wizardResult& retval)

This is a fully repeatable issue, and here is to work around this, right-click on the solution itself and then add the project to the solution directly.  If you do this it works like a dream.  Once the project has been created you can then move it under the correct solution folder.  

I am assuming that if you have read this the chances are that you have done a search on Google when you've run into this issue, so there's your answer.  Happy pipelining!

No comments: