I’ve always been fascinated with the concepts and technique of automating VS development through macros, add-ins, templates etc.By now at my clients site we have more or less standardised what our Biztalk “services” look like but since we are still in Biztalk 2004 I didnt want to waste time with VS2003 automation as things have become so much more polished and advanced in later versions. I recently spent a couple of days at another client site with v2006 setting up the solution tree and MSBuild scripts and then sat back and wondered why i didnt have a tool to set the whole thing up in 5 minutes. It would have saved so much time that could have been spent on more significant issues. So today, after much procrastination (and collecting links on the subject), I finally decided to take the plunge and create my own multi-project template.


There’s a wealth of material on creating Visual Studio Item and Project Templates and one of the best I’ve read is How to create starter kits (including multi-project templates). I gleefully put in the .net class library and test projects, schemas, maps etc and ran the Export Template Wizard. Imagine my horror when i found that it would not pick up Biztalk projects!!. So i got stuck for a while. I did have a look at Jon Flanders awesome videos on his Pattern Wizards including the facility to create biztalk project wizards from your own projects. I say, that guy is really something!! Anyway, that helps to some extent in that we can now “export” existing biztalk projects and use them later (and make them highly dynamic through wizards etc), but it still doesnt help create a multi-project template.


So I went ahead and decided to try and experiment. With the starter-kits article in hand I created the basic .NET projects and then decided to take a set of biztalk projects and add them in. I removed all the unncessary items, except for the btproj file. I then added in a .vstemplate file and a icon file (from the exported .net projects). I then edited the vstemplate file to set the links to the btproj files and so on. Ultimately having put them all together and zipped it up and dropped it into the Templates folder, voila, it worked. I have a multi-project solution with Biztalk projects in it.


In the btproj files i can set macros such as $safeprojectname$.Unfortunately no matter what I try it will not accept items such as schema files, maps etc. VS always complains that it cannot find the files even if they are included in the package. So i gave up that route and left the projects empty. I would like to try to set the Application Name as the name of the Solution in all the btproj files, but there doesnt seem to be a template parameter to do that


You can find the results of my handiwork at my new codeplex project site here . Feel free to play with it and let me know your thoughts and suggestions.


I’m thinking of extending this with add-ins and macros to create msbuild scripts to build and deploy the solutions. This would give projects a good kick start. Of course, people modularise Biztalk in many ways, some have multiple schema projects, some have multiple orchestration projects and the layout is not always the same. And of course, once you start using Jons tool, then the solution will morph into something very different from what the starter kit looked. So the Build and Deploy script generator tools must be capable of running at anytime and regenerating stuff from scratch. The codeplex site should see some growth very soon. It would also be interesting to hear how others lay out their projects especially how branching is done.


I’ve also written up another little tool to generate my source tree, taking inspiration from tools like TreeSurgeon. I should put that up soon. For now , i guess these tools will work together, but in a slightly disjointed fashion and in time i’ll get a deeper understanding of VS automation and with stuff like GAT, theres a lot that can be done.


The big limitation right now is that doesnt link in with Jons work in any way. All my project templates that i made are sitting in the Biztalk Project Wizards folder, but the vstemplate only shows its own collection of btproj files which arent dynamic in any way. If anyone has some experience on linking VStemplates with wizards and would like to sharet the info please let me know. I’d love to be able to link my templates to Jons wizards, thus making it a highly dynamic and rich experience in creating multiproject solutions.