Automating the Creation of a Custom Project

Topics: General Discussion Forum, July and December Releases Forum
Jul 7, 2007 at 7:05 PM

I'm trying to customize the Web Service Factory by adding a new action that will create an Error Reporting project. I have successfully created the project and added it to the factory. I can get the factory to create the project and add it if I reference the project directly in the Binding.xml file with the following line of code.

<Action Name="AddErrorReportingProject" Type="RefCreator" AssetName="Projects\ErrorReporting\ErrorReporting.vstemplate" ReferenceType="Microsoft.Practices.SoftwareFactories.ServiceFactory.References.SolutionOrSolutionFolderPropertyTemplateReference, Microsoft.Practices.SoftwareFactories.ServiceFactory" IsEnabledForProperty="IsSolution"/>

Unfortunatly I need to carryout a couple more actions in the process, such as collect some user data, create a reference for the Host project to the Error Reporting project. To do these things at the same time that the Error Reporting project is created I believe I need to call a recipe first and then call the sub actions to do the different tasks.

I have tried various ReferenceTypes in the above code but non have been successful.

Any clues would be appreciated.

Jul 10, 2007 at 9:52 PM
If you want to call a recipe from within a template unfolding process, then you may add a reference to your recipe in the .vstemplate file in nthe <WizardData><Template> section like the following:

    <Template xmlns=""
Then add your recipe to the manifest file with all the required stuff (Wizards, actions) that you need to be executed while the tempalte is about to unfold.
You may also set arguments in your recipe that the template will be able to use after finishing its work.