Sanjukta

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




Re: Visual Studio Guidance Automation Toolkit Packaging both Vb and CS in one Guidance Package

vga

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.






Re: Visual Studio Guidance Automation Toolkit Packaging both Vb and CS in one Guidance Package

Sanjukta

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