Hi folks,
I am playing with the GAX / GAT to get an understanding of how it works and if it is reasonable to use it in a customer project. To get into it I did the Hands on lab (http://www.guidanceautomation.net) and it was no problem for me up to exercise number 2.
I performed the steps given in the HOL and when I reopen my solution after registering the Data Solution Package againI only get one recipe in it. I only have the "HelloUnbound" - all others (AddDataAccess, AddBusinessEntity, ...)are away. This issue takes even place if I did not change anything in the Data Solution Package, but only un- an reregister it. There are no errors doing the registering.
Does anyone have an idea what I am doing wrong?
Thanks in advance.
Kind regards,
Matthias
|
| mschuldes Monday, August 13, 2007 2:19 PM |
This is what I could investigate. Basically there are two kind of recipes: Bound and Unbound.
The unbound recipes are those that you define in the Binding recipe. It's recommended to use Unbound recipe every time it's possible.
One example of bound recipes are those that you add in the .vstemplates (for example the Project Templates that adds the HoL).
The thing is that when you disable a Guidance Package from the Guidance Package Manager you will lose all recipes. Then when you re-enable the package you will get only the *Unbound* recipes defined in the Binding Recipe. This behavior is by design. I will propose to update the HoL to use Unbound recipes instead of bound recipes.
-Adrian
|
| Adrian Alonso Thursday, August 16, 2007 1:36 AM |
Hi Matthias, the other recipes should be registered in other directories of the DSP. For example: You should be able to create a 'Business Entity' doing a right click over the 'BusinessEntities' folder. Here you have a XML fragment with the references definition:
<References> <RecipeReference Name="HelloBoundRecurring" Target="\BusinessEntities" /> <RecipeReference Name="HelloBoundNonRecurring" Target="\BusinessEntities" /> <RecipeReference Name="HelloWithMessage" Target="\UserInterface" /> <TemplateReference Name="Projects\BusinessEntity\BusinessEntityProject.vstemplate" Target="\BusinessEntities" /> <TemplateReference Name="Projects\DataAccess\DataAccessProject.vstemplate" Target="\DataAccess" /> <TemplateReference Name="Projects\DataClient\DataClient.vstemplate" Target="\UserInterface" /> </References>
You can take a look at the DataSolution.vstemplate in order to understand how you can add references for recipes or other .vstemplates.
HTH -Adrian
|
| Adrian Alonso Monday, August 13, 2007 4:18 PM |
Hi Adrian
thanks for your answer. But I think my problem is a little bit different. I am able to generate the DataAccess project and all the other stuff. In exercise 2 you have to modify the DSP and after the modifications I am not able to use it. After modifing and compiling I registered the DSP again and got no errors. All seems to be fine.But when I open the lab solution after that I have no entries in the Guidance Manager Console - I can disable and enable the DSP but I get no entries any more exept the UnboundBlaBla. The other three are missing, also all context menue entries are missing for the DSP.
Even if I do no changes on the DSP and only compile and do a new register all entries went away in the lab solution. If I open a blank solution in the VS 2005 I have no problems and can generate all stuf like displayed in the HOL.
I amconfused 
Anyone a hint for me...?
Thanks and regards,
Matthias |
| mschuldes Monday, August 13, 2007 6:14 PM |
After registering the modified DSP did you try to create a new GAT Hands On Lab Data Solution and verify if the recipes are availables?
-Adrian
|
| Adrian Alonso Tuesday, August 14, 2007 3:10 AM |
Hi Adrian!
Yes, this is what I did. I changedthe DSP, compiled and registered it and in a new solution is it all fine. But when I reopen the HOL solution I have no recipes. I cannot enable them in the Guidance Manager - there is the DSP but no recipes for it.
Greets Matthias |
| mschuldes Tuesday, August 14, 2007 11:44 AM |
That's the expected behavior. When you activate the Guidance Package from the Guidance Package Manager you will get the recipes that were added for the current opened solution. This can be done through the binding recipe or adding the references for the recipes in the .vstemplate. The binding recipe only contains the 'HelloUnBound' recipe so if you don't create a solution you won't get the other recipes because the DataSolution.vstemplate add the references for them. This post may help. -Adrian |
| Adrian Alonso Tuesday, August 14, 2007 1:50 PM |
Hi Adrian!
Thanks for your help - but I have a little problem of understanding what to do. What have I to do to get the recipes in the existing HOL solution again? Can you give me a hint, please?
Thanks for your patiance,
Matthias
|
| mschuldes Tuesday, August 14, 2007 2:17 PM |
Just in case... when you say the HoL Solution, it's the solution you have created with the DAP, isn't it? Or it's the HoL itself?
Take a look at the .gpstate file that should be in the root of the project directory. If the references are not there AFAIK you won't be able to get them again in the previous solution.
-Adrian
|
| Adrian Alonso Tuesday, August 14, 2007 3:04 PM |
Hi again!
Yes it is the solution which I generated with the DSP package.
I will have a look on the file tomorrow when I am back in my office and give you a reply.
Do you know why the references disappear from the gpstate file when I compile and register the DSP again. I think this is a show stoper: if I have asolution with many projects, classes... which are based on a GAT package, I am not able to make any changes on my GAT packagewithout loosing my references in the application solution. I think there is always a fault in my doing it because I do not think that MShad not realized this issue!?
Thanks for your help until now.
Regards
Matthias |
| mschuldes Tuesday, August 14, 2007 5:01 PM |
Hi Adrian!
I tested your solution and yes: the gpstate-file contains no entries anymore to any recipes. I copied the content of another gpstate-file into the HOL solution file and all is fine. Now I know what I have to do, to complete Exercise 2 from the HOL.
But I have always the big question: why does the GAT behave like that? Is this not a failure because it will oftwen happen that a GAT package will be modified an reregistered during the developement process. What am I doing wrong? In the HOL is nothing mentioned about this - so I thin I am the only guy with this issue!?
Thanks so far and have a nice day,
Matthias |
| mschuldes Wednesday, August 15, 2007 12:15 PM |
Hi Matthias, I tried to reproduce your scenario with no luck. I re-register the DAP and the recipes are still there. The references should not be deleted from the .gpstate. This is something that should not happen. I will try to digg a little more in it and I will keep you posted if I find some issues.
thanks, -Adrian
|
| Adrian Alonso Wednesday, August 15, 2007 1:16 PM |
Hi Adrian,
to give you a liitle help what I did I write you the steps I made:
1) Install GAX and GAT
2) Extract the HOL
3) Attached the Northwind DB
4) Compiling the Guidance Package Solution
5) Registering it
6) Open new VS 2005 instance and generating the sample app with the GAT Hands On Lab Data Solution template
7) Doing all the steps in Exercise 1
8) Compile the sample app and test it --> All is going fine
9) Closing the VS 2005 instance with the sample app
10) Unregister the GAT Hands On Lab Data Solution
11) Insert a comment line in the GAT Hands On Lab Data Solution
12) Compile it and register it
13) Open the sample app solution --> all recipes are gone away
13a) Close this solution
14) Open a new instance of the VS 2005 and generate a new solution with sample app with the GAT Hands On Lab Data Solution template
15) Test the recipes and save it -->All is fine with the new solution
16) copy the content of the gpsate-file from the solution from step 14) intothe the gpstate-file of the sample app of the HOL
17) save the modified gpstate file
18) open the sample app solution --> everything is ok
I hope this discription will help you a little bit helping me 
Regards and thank you
Matthias |
| mschuldes Wednesday, August 15, 2007 1:32 PM |
This is what I could investigate. Basically there are two kind of recipes: Bound and Unbound.
The unbound recipes are those that you define in the Binding recipe. It's recommended to use Unbound recipe every time it's possible.
One example of bound recipes are those that you add in the .vstemplates (for example the Project Templates that adds the HoL).
The thing is that when you disable a Guidance Package from the Guidance Package Manager you will lose all recipes. Then when you re-enable the package you will get only the *Unbound* recipes defined in the Binding Recipe. This behavior is by design. I will propose to update the HoL to use Unbound recipes instead of bound recipes.
-Adrian
|
| Adrian Alonso Thursday, August 16, 2007 1:36 AM |
Hi Adrian!
Thanks for your help and your investigation for me. I will have a closer look at the unbound recipes and check if this could be a solution for our "real live project".
Regards,
Matthias
|
| mschuldes Thursday, August 16, 2007 6:40 AM |
HI Adrian,
why bound and unbound recipes are introduced, general recipe i mean is one type is not sufficient?
Also could you tell me what is the default recipe type, I mean in the HOL PACKAGE I could see CreateDataAccessRecipe has no parameter set for bound, so if we dont use bound parameter what does GAX assumes by default
and also from Wojtek's blog http://blogs.msdn.com/wojtek/archive/2005/05/17/418706.aspx
this statement--- "If you define a recipe as unbound, you have to create a reference instance yourself" , here what does creating reference instance means what we need to do or what is it mean could you eloborate it more..
Please help me
thanks
satish |
| satish padidem Friday, October 12, 2007 11:40 AM |