Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Packaging both Vb and CS in one Guidance Package
 

Packaging both Vb and CS in one Guidance Package

Hi,

I want to get both the VB and CS based templates in the same guidance package for maximun maintainability. The same code need not be rewritten to another guidance package. But after having tried different ways to get both cs and vb templates in the same guidance package, I have not really obtained a perfect solution.The problem is that I have different set of recipes for the two templates (as the t4 templates have changed). Now if I simply add two vstemplates and develop my guidance package, I get all the recipes (both related to vb and cs) on the projects. This I dont want.

I thought of changing the project responsibilities to something like.."IsBusinessLayerProjectinVB" and "IsBusinessLayerProjectinCS". But what do I do for the recipes which are common for both responsibilities?

I also tries having two different configuration files in the same package. It did not work. I simply want to avoid creation of two different guidance packages. Can someone provide help on this??

Regards,

Sanjukta

Sanjukta  Thursday, June 21, 2007 5:40 AM

Hi Sanjukta,

There are a couple of different approaches to this. For example if the only thing that varies are the T4 files then depending on how you are referencing them maybe some conditional actions could help: i.e. include two actions in the same recipe, one is "UnfoldCustomerClassCSharp" and the other is "UnfoldCustomerClassVB"but you conditionally execute (conditional execution of actions is supported in SFT) only one of them based on the current language.

Or if you really want to go with different recipes then you should have unbound recipes with proper unbound references which will only active depending on the language of the selected project, i.e. let's say that you have a recipe that applies only to project items, you will now have to use an unbound reference and check the parent project language before deciding to shown or hide it.

Does this helps?

-Victor.

vga  Saturday, June 23, 2007 4:58 PM

Hi Sanjukta,

There are a couple of different approaches to this. For example if the only thing that varies are the T4 files then depending on how you are referencing them maybe some conditional actions could help: i.e. include two actions in the same recipe, one is "UnfoldCustomerClassCSharp" and the other is "UnfoldCustomerClassVB"but you conditionally execute (conditional execution of actions is supported in SFT) only one of them based on the current language.

Or if you really want to go with different recipes then you should have unbound recipes with proper unbound references which will only active depending on the language of the selected project, i.e. let's say that you have a recipe that applies only to project items, you will now have to use an unbound reference and check the parent project language before deciding to shown or hide it.

Does this helps?

-Victor.

vga  Saturday, June 23, 2007 4:58 PM

Yes, Victor.

Thanks for the response.

I have been able to figure out a simple solution to this. I just changed the project responsibilities to language specific responsibilities, eg, BusinessEntititesProjectVb and BusinessEntitiesProjectCS. And I have created recipes with unique names for both VB and CS. Then I just add bind the appropriate recipe to the Project with the appropritae responsibility.

Thanks a lot....

Sanjukta

Sanjukta  Monday, June 25, 2007 6:57 AM

You can use google to search for other answers

Custom Search

More Threads

• Customizing a wizard
• How to add an assembly reference when processing an item template?
• Clarius SFT (Jun07) and GAT (Feb08): do they work together?
• How does one get his/her posts removed?
• make wizard check in file after automated edit
• Set an "Overview" HTML page to the Guidance Package
• how begin?.. please help, I'm lost
• Dec '06 WSSF fails to install after installing Feb 07 GAX and GAT
• Is there any way to run an action when a project with my guidance package enabled is opened?
• Microsoft.Practices.RecipeFramework.ActionExecutionException