Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Problem with Package Building (2 projects included as .vstemplate, but references not being resolved)
 

Problem with Package Building (2 projects included as .vstemplate, but references not being resolved)

Hi,

I am fairly new to GAT and facing an issue. The June 2006 CTP version is installed on my system.

I have created a new GAT package. It includes 2 projects (2 .vsTemplate files in the Templates\Solutions\Projects folderof my GAT package project)which are to be created when my GAT project is registered. These 2 .vsTemplate files are in the folders named Event and EventAndDelegate. Event.vstemplate is supposed to be a project of type Class Library and EventAndDelegate is essentially a WindowsApp which comsumes the Event.dll as a reference.

Now the problem arises when I try to build the GAT solution, the Event class has been refered in the EventAndDelegate's Form1.cs (Event eventObj = new Event();), but there is no build Event.dll file to refer to for the type Event. Could somebody please suggest me how will I get around this problem and build the GAT package successfully. I don't think including the bin/Debug/Event.dll file as a part of the GAT project atdesing time will be a smart idea.Please let me know if any more information is needed. Waiting for a reply.

Thanks Subhadip

Subhadip  Saturday, November 18, 2006 4:20 AM

Hi Subhadip,

I think what you are looking for is a project (and not file) reference, so your project "EventAndDelegate" will have a project reference to "Event" project. Sadly enough, the .vstemplate format doesn't support specifying this declaratively so you will need to resort to some coding; good news is that there is an AddProjectReferenceAction action (in the Microsoft.Practices.RecipeFramework.Library.dll library)that takes the two projects as inputs and will create the reference for you. You should use this action in the same recipe from where you're unfolding both templates, so you can count on the projects being created and properly referenced after the recipe is executed.

HTH,
-Victor.

vga  Sunday, November 19, 2006 11:36 PM

Hi Subhadip,

I think what you are looking for is a project (and not file) reference, so your project "EventAndDelegate" will have a project reference to "Event" project. Sadly enough, the .vstemplate format doesn't support specifying this declaratively so you will need to resort to some coding; good news is that there is an AddProjectReferenceAction action (in the Microsoft.Practices.RecipeFramework.Library.dll library)that takes the two projects as inputs and will create the reference for you. You should use this action in the same recipe from where you're unfolding both templates, so you can count on the projects being created and properly referenced after the recipe is executed.

HTH,
-Victor.

vga  Sunday, November 19, 2006 11:36 PM

You can use google to search for other answers

Custom Search

More Threads

• Actions in Visual Studio 2005 Guidance Automation Toolkit (GAT) Very Slow
• Cannot Load smart client guidance in VS2008
• How to change which window form get executed first ?
• Adding an Item to a solution (as opposed to a project)
• Including a custom assembly with GAT
• Parse referenced assemblies
• Project templates do not appear in VS 2005 Pro after installing GAX and GAT?
• Parametrize TypeConverter?
• Guidance automation toolkit(February 2007 CTP) is unable to be installed
• Dec '06 WSSF fails to install after installing Feb 07 GAX and GAT