Hi
I had a similar problem and resolved it as follows. I created a new unbound recipe called "BindRecipesToExistingSolution". I instructed the developers to use the "Guidance Package Manager" option in Visual Studio to enable my guidance package on the existing solution. Once my guidance package is enabled the unbound recipes will be available in the Guidance Package Manager window. I instructed the developers to then execute my BindRecipesToExistingSolution recipe. It asks the developers toassociate the names of the projects in the existing solution to arguments in the recipe.
I then used a custom action to associate the recipes / templates to the projects:
<Action Type="Test.GuidedAutomation.Actions.AddNewBoundReferenceToProject, TestCGuidancePackage" Name="AddCreatorRecipe">
<
Input Name="CurrentProject" RecipeArgument="CreatorProject" />
<
Input Name="RecipeName" RecipeArgument="CreatorRecipeName" />
<
Input Name="TemplateName" RecipeArgument="CreatorTemplateName" />
</
Action>
My custom action code looks like this. I firstly add a bound reference to the project using the reference service.
IBoundAssetReference addedReference;
// firstly add a new bound reference in the given project for the given recipe
DTE vs = GetService<DTE>(true);
IAssetReferenceService referenceService = GetService<IAssetReferenceService>(true);
addedReference =
new ProjectReference(recipeName, currentProject);
referenceService.Add(addedReference);
then I needed to add a new BoundTemplateReference to associate the given template with the given project (where templatePath is a path to wherever my templates are installed)
VsBoundReference vsTarget = null;
vsTarget =
new ProjectReference(templatePath, currentProject);
IBoundAssetReference newReference = new BoundTemplateReference(templatePath, vsTarget);
referenceService.Add(newReference);
Hope this helps ...
K