Hello All,
I have a Guidance Package that includes a multi-proejct solution template. When the tempalte unfolds, I have a custom action that creates a Web Setup Project and adds it to the solution. I use sevear of the actions in the Microsoft.RecipeFramework.Library.Actions.Vsd namespace to manipulate and customize the Web Setup Project. However, I cannot figure out how to add the "Global Assembly Cache Folder" folder to the Web Setup Proejct File System, and subsequently add specific files for the local GAC to this folder.
I have an EnvDTE.Project referrenct to the Web Setup Project I've created, that I'm passing into an action called "CreateGACFolderAction", but I'm completely at a loss as to hwo to actually programatically add the "Global Assembly Cache Folder". This folder is normally added by choosing "Add Special Folder->Global Assembly Cache Folder" from the context menu of the root node in the File System Window.
Can anyone give me some advice/pointers on how I might accomplish this?
NOTE: I've tried using the Microsoft.Practices.RecipeFramework.Vsd.AddFolderAction, but this does nto work with "Special Folders such as the GAC folder. If also tried using the Microsoft.Practices.RecipeFramework.Solution.Actions.ExecuteVSCommandAction to execute "Action.GlobalAssemblyCache", however this returns the error that the command is unavailable.
TIA
Dave | | Dave803796 Monday, May 28, 2007 2:59 PM | Hi Dave,
Unfortunately there is no built-in action in GAT nor in the known libraries and extensions to support this.
VS Setup projects are much more limitad and hard to automate compared to using WiX that's the reason why -for example- focus on WiX support in the SFT instead of VS Setup.
I'm guessing your best bet may be to post the specific question about automation of VS Setup projec type in the VS extensibility forums to see if there is a way at all.
thanks, -Victor.
| | vga Tuesday, May 29, 2007 7:28 AM |
Hi Dave,
WiX is an XML dialect to define an installer. It's an open source project hosted in SourceForget and they have a very responsive mailing list to address users questions (very good learning resource too).
The beauty of WiX is that while you can keep yourself from the low level details most of the time (there are tools that will for example scan your target directory and generate WiX fragments ready to use, etc) if you ever have to, you can easily tweak it, which is something that -as you already know- is very hard to do with VS Setup projects. Of course in order to make these tweaks you would be required to at least have a grasp of the way a MSI is assembled, the different tables, fields, etc that make up a MSI db. All of this is totally hidden from you in a VS Setup.
. Also, WiX has its own set of msbuild targets so there is no need for a "custom" project type like VS Setup, you can just use a regular C# or VB project to contain the WiX sources.
There is also a Visual Studio package (named "Votive" last time I checked) which provides some extensibility inside VS for WiX, like a custom project, etc which offer some friendly UI, etc. Last time I checked it was kind of buggy, but I'm not sure about it's latest version.
I would highly recommend you to consider switching to WiX is you have the time.
SFT is the TLA for "Software Factories Toolkit" and is a toolkit (http://sofwarefactoriestoolkit.net) for extending the current feature setof GAT and DSL Tools and also for easily developing solutions that integrates both of them. For example when creating a guidance package SFT allows you to choose between using a VS Setup project type and a WiX-based setup.
Hope this helps!
-Victor. | | vga Wednesday, May 30, 2007 6:16 AM | Hi Dave,
Unfortunately there is no built-in action in GAT nor in the known libraries and extensions to support this.
VS Setup projects are much more limitad and hard to automate compared to using WiX that's the reason why -for example- focus on WiX support in the SFT instead of VS Setup.
I'm guessing your best bet may be to post the specific question about automation of VS Setup projec type in the VS extensibility forums to see if there is a way at all.
thanks, -Victor.
| | vga Tuesday, May 29, 2007 7:28 AM | Victor,
Thanks for the reply. I've found a work-around that would seem to be sufficient for this version of our Guidance Package. I've created an Action that executes the VS "Action.GlbalAssemblyCacheFolder" command. It's a bit of a hack, but it does what I need, and immediately after that command I execute "Action.Assembly" to prompt the user to select the required assemblies. This approach is certainly not the best, as it makes assumptions about the state of the solution/projects in the IDE as well as requiring input from the user/developer, but it gets the job done for now.
We'll re-visit the templating of deployment projects in a later release of our GP. I've never heard of WiX, and would be interested in evaluating it to replace VS Setup and Deployment Projects for delivering our applications. Could you point me in the direction of some resources? Also, I'm not familiar with SFT. What does it stand for?
Thanks,
Dave | | Dave803796 Tuesday, May 29, 2007 1:19 PM |
Hi Dave,
WiX is an XML dialect to define an installer. It's an open source project hosted in SourceForget and they have a very responsive mailing list to address users questions (very good learning resource too).
The beauty of WiX is that while you can keep yourself from the low level details most of the time (there are tools that will for example scan your target directory and generate WiX fragments ready to use, etc) if you ever have to, you can easily tweak it, which is something that -as you already know- is very hard to do with VS Setup projects. Of course in order to make these tweaks you would be required to at least have a grasp of the way a MSI is assembled, the different tables, fields, etc that make up a MSI db. All of this is totally hidden from you in a VS Setup.
. Also, WiX has its own set of msbuild targets so there is no need for a "custom" project type like VS Setup, you can just use a regular C# or VB project to contain the WiX sources.
There is also a Visual Studio package (named "Votive" last time I checked) which provides some extensibility inside VS for WiX, like a custom project, etc which offer some friendly UI, etc. Last time I checked it was kind of buggy, but I'm not sure about it's latest version.
I would highly recommend you to consider switching to WiX is you have the time.
SFT is the TLA for "Software Factories Toolkit" and is a toolkit (http://sofwarefactoriestoolkit.net) for extending the current feature setof GAT and DSL Tools and also for easily developing solutions that integrates both of them. For example when creating a guidance package SFT allows you to choose between using a VS Setup project type and a WiX-based setup.
Hope this helps!
-Victor. | | vga Wednesday, May 30, 2007 6:16 AM | Hi Victor
Thanks for the detailed reply. Very helpful and informative!
Regards,
Dave | | Dave803796 Wednesday, May 30, 2007 1:17 PM | not a problem and glad I could help!
| | vga Wednesday, May 30, 2007 4:51 PM |
|