Bound references must be attached to a given target. You create a SolutionReference, SolutionFolderReference, ProjectReference or ProjectItemReference pointing to a given recipe. Then, you hand that reference over to the IAssetReferenceService. All these reference classes exist in the Microsoft.Practices.RecipeFramework.VisualStudio.dll assembly. The constructor for those classes receive the concrete item being pointed (the target), so you will need to locate it first. For that, you can use the DteHelper.FindXXByPath, which receives the "virtual path" to the target. The "virtual path" is the path representation relative to the solution root in the Solution Explorer. With those two pieces, you are all set to store a bound reference in the IAssetReferenceService and have the recipe appear in the designated target context menu (as well as the task list). |