Jose Escrich

Extensibility Thoughts

Dealing with the UnfoldTemplateAction and parameter replacement.

There are a well known issue with the UnfoldTemplateAction which is provided in the GAX Library. Basically this action able you to unfold .vstemplate files by hand but it has a ugly issue in where you can't do any parameter replacements than the default ones.

In fact is not a bug into the action so the issue resides in that is using the AddFromTemplate method from the DTE automation model and there's no way to pass any replacement dictionary using that method directly.

So I wrote an action in order to have a workaround, basically what it does is create a copy of the vstemplate and its elements, perform all the replacements, then unfold the template through the UnfoldTemplateAction.

You can download the source from here.

Hope that helps!

Comments

Keirol said:

Hello,

I'm trying to implement the action class that you created. Can you give a sample recipe how this would consume the action class you created? I have created a recipe but I only implemented putting values to the TemplatePath (path to the vstemplate) and itemName(test name for the project) and I'm getting some object reference errors. Thanks.

# October 9, 2007 5:57 AM

jescrich said:

forums.microsoft.com/.../ShowPost.aspx there you'll find a description of each parameter.

# January 3, 2008 12:42 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)