Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Synchronizing - GAT Package Changes
 

Synchronizing - GAT Package Changes

I have been assigned the task of being the guardian of my teams patterns & practices assets. I'm the gatekeeper for enterprise library for my team, since I have done the most research on the topic. When I came across GAT, I thought that this was a great way of saving me from having to walk any team member through our basic enterprise library setup for all Windows Forms projects (Data Access, Logging & Tracing , Exception Handling).

As we are early in development of a new application (the first one using Enterprise Library) I forsee changes needed to be made in GAT packages; how can I easily synchronize these changes? Would I have to redistribute a whole MSI? Is it possible for me to introduce new t3 templates for example without, having to recreate the msi (via xcopy for example)? Can my Guidance Package be distributed using Click Once, maybe?

Ease of update is an important aspect in any code generation utility we use, and its because of this why much of the code generation my team uses is vis VS Macros because anyone can go in an simply update them (we all share a set of core macros). I find the macros limiting and feel that GAT and t3 would help us since what we really need is temlate based code generation that conforms to a specific pattern under certain situations.

Sorry for the wordiness of this post.
KiddKane  Tuesday, June 14, 2005 7:47 PM
Very reasonable concerns, for sure.

There is only one restriction on what you can xcopy-deploy: the guidance package configuration itself cannot change once it has been installed. You can definitely xcopy deploy T3 templates and VS templates, but in order for new ones to be used, you will most probably have a new recipe.

The reason for requiring a re-installation is that at that time we're registering information with VS that is required for the commands and templates to appear. Unless you run the registration process again, it's just not possible to have them displayed. There is a workaround, though, that you can take advantage of, which we're using to ease the authoring experience too (you don't need to build and install the MSI everytime you recompile a package).

The installation classes in GAT support what we call a debug mode, which is a more forgiving one regarding uninstallation of previous versions of a package. Basically it just goes and overwrites whatever information was there before, and registers the package again with the framework. In order to do this, after xcopying the files for a guidance package, you have to run the following command:

[.NET sdk install path]\installutil.exe "/ShowCallStack /i /DesignMode=true /Configuration="[path to your package config file]" "[output of your package installer class library project]"

If you open your guidance package with a text editor and look for the postbuild event commands, you will see that that's exactly what's executed whenever you recompile the package.

Deploying with ClickOnce will be hard as it doesn't support any concept of post-deploy actions as an MSI does, but a simple batch file would do the work... it's an area we could definitely explore in the future.

Hope this helps!
kzu  Friday, June 17, 2005 5:39 PM
Very reasonable concerns, for sure.

There is only one restriction on what you can xcopy-deploy: the guidance package configuration itself cannot change once it has been installed. You can definitely xcopy deploy T3 templates and VS templates, but in order for new ones to be used, you will most probably have a new recipe.

The reason for requiring a re-installation is that at that time we're registering information with VS that is required for the commands and templates to appear. Unless you run the registration process again, it's just not possible to have them displayed. There is a workaround, though, that you can take advantage of, which we're using to ease the authoring experience too (you don't need to build and install the MSI everytime you recompile a package).

The installation classes in GAT support what we call a debug mode, which is a more forgiving one regarding uninstallation of previous versions of a package. Basically it just goes and overwrites whatever information was there before, and registers the package again with the framework. In order to do this, after xcopying the files for a guidance package, you have to run the following command:

[.NET sdk install path]\installutil.exe "/ShowCallStack /i /DesignMode=true /Configuration="[path to your package config file]" "[output of your package installer class library project]"

If you open your guidance package with a text editor and look for the postbuild event commands, you will see that that's exactly what's executed whenever you recompile the package.

Deploying with ClickOnce will be hard as it doesn't support any concept of post-deploy actions as an MSI does, but a simple batch file would do the work... it's an area we could definitely explore in the future.

Hope this helps!
kzu  Friday, June 17, 2005 5:39 PM
Thanks this was helpful. You guys have been out doing yourself producing quality tools and frameworks. Keep up the good work.
KiddKane  Friday, June 17, 2005 8:59 PM

You can use google to search for other answers

Custom Search

More Threads

• Uninstalling the older version of Guidance Automation Extensions
• Execute Action when content of Combobox changes
• registry entry for GAT and GAX
• Creating unbound reference to project template
• Refrence troubles
• The Key combination (ctrl+R, ctrl+R) for word wrap not working
• Unable to add data connection
• Installing Web Serivce Software Factory failing
• Problems installing SCSF source code may 2007
• How to pass parameters to T4 templates using GAX?