Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Problem in migrating VS 2005 guidance package to VS 2008
 

Problem in migrating VS 2005 guidance package to VS 2008

Hi All

I am quite new to Guidance Automation Toolkit(GAT).

Ourcompany have a full fledged guidance package based on GAT Jun 06 which works fairly well on VS 2005.

Recently I joined this group in my company & I got the job to migrate this package from VS 2005 to VS 2008.

I have both versions of GAT July 07 as well as Feb 08 .

Initially when i started migrating I got stuck up somewhere with build errors. Now I am able to register my guidance package . When I try to create a new solution with this package, it works fairly well till WizardPages & upto some actions but after reaching a point where we are calling some arguments from recipe in t4 template file , it fails.

The error is as below

Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe CreateSolution. Error was: Action TestT4ForStringName failed to execute:
Exception of type 'Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TemplateException' was thrown..
You can remove the reference to this recipe through the Guidance Package Manager. ---> Running transformation: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.TextTemplatingf23db43f623945b788c302714ba18930.GeneratedTextTransformation.get_DOProjectName() in \bin\Debug\Templates\Text\DOEntity\TestTemp.t4:line 7
at Microsoft.VisualStudio.TextTemplatingf23db43f623945b788c302714ba18930.GeneratedTextTransformation.TransformText() in \bin\Debug\Templates\Text\DOEntity\TestTemp.t4:line 16
----------------------------------------------------------------------------------------------------

--- End of inner exception stack trace ---
at Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)
at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)
at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)
at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.GuidancePackage.ExecuteFromTemplate(String recipe, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.ExecuteRecipe(Boolean executeActions)
at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.RunFinished()

When i tried to debug the t4 template , the arguments in the template file was showing error message :

DOProjectName threw an exception of type System.NullReferenceException

When i looked inside in the inner exception was _COMPlusExceptionCode = -532459699

Can anybody give me an idea why this error is coming.

I would like to mention that our factory is quite a big one which generates all layers of N-tier architecture , supports WCF,

It has got many Custom Wizard Pages, Custome Actions & custome Arguments

haritosh  Friday, April 25, 2008 9:21 AM

Hi Jose,

First of all thanks for replying,

I would like to inform you that Ihave sorted out the issue as of now.

It may seem strange to you that I had Debug=true for all my t4 templates & this was the problem I suppose.

Probably you might be knowing that VS2005 comes with CLRDebugger (generally in Program Files\Microsoft Visual Studio 8\SDK\v2.0\GuiDebug\DbgCLR.exe), but in case of VS2008 , as far as I know, there is no CLRDebugger so thatmight be the reason for the failure. As soon as I removed Debug=true, it worked perfect.

Please correct me, if I am wrong. It would really help me in understanding the GAT/GAX.

But now I am struggling with the same package's setup issue.The previous setup, even after converting to VS2008 & replacing all references with releavent VS2008 references, is still targetting VS2005. I haveposted the same issue in another thread here Any help in this regard from your side will be highlyappreciated.

Thanks & Regards,

Haritosh

haritosh  Saturday, May 17, 2008 4:08 AM
Hi,

please, set your textemplate in debug mode (you can do this adding the debug=true attribute @ template directive), then run your template in order to get the exception. After that try to find out in your %temp% directory the dll and source code for that template (you should order the files by date).

Try to post the template cs code, tt code and exception trace so I'll try to help you in what is happening there.

thanks.
jose.
Jose Escrich  Friday, May 16, 2008 5:46 PM

Hi Jose,

First of all thanks for replying,

I would like to inform you that Ihave sorted out the issue as of now.

It may seem strange to you that I had Debug=true for all my t4 templates & this was the problem I suppose.

Probably you might be knowing that VS2005 comes with CLRDebugger (generally in Program Files\Microsoft Visual Studio 8\SDK\v2.0\GuiDebug\DbgCLR.exe), but in case of VS2008 , as far as I know, there is no CLRDebugger so thatmight be the reason for the failure. As soon as I removed Debug=true, it worked perfect.

Please correct me, if I am wrong. It would really help me in understanding the GAT/GAX.

But now I am struggling with the same package's setup issue.The previous setup, even after converting to VS2008 & replacing all references with releavent VS2008 references, is still targetting VS2005. I haveposted the same issue in another thread here Any help in this regard from your side will be highlyappreciated.

Thanks & Regards,

Haritosh

haritosh  Saturday, May 17, 2008 4:08 AM

You can use google to search for other answers

Custom Search

More Threads

• Add File/Folder to default GAT installation error
• Creating Data Repository classes.
• Unable to update Guidance Automation Extensions to new version
• Why does my SmartClientApplication can only be resized like a mac?
• 2008 New Nike Football Shoes in www.shoes198.com
• Problem with Specifying Command Bars
• how to run multiple class file with Main() method on each of them independently in a project?
• GAX/GAT 2008 install problem
• SharePoint recipe problems
• Solution no longer GAT solution