I created a Visual Studio 2005 solution template that has served my
organization well using one vbscript. I have not seen a reference to anyone
else doing it this way, but it works so well and is so easy to maintain that
I decided to post it here.
The solution has multiple projects, project references, two starter webs
(intranet, and internet), dynamically generated namespaces, and a
documentation folder.
To update the template, I simply update a master solution. The projects in
the master solution have namespaces like MyCompany.TemplateDefault.BLL,
MyCompany.TemplateDefault.DAL, etc. After I update the master solution, I
delete all the dlls and pdb files, then copy the files to a network share.
The vbscript, which is on the same network share, asks the developer for a
solution name. Assuming the developer enters "NewApp", the script creates
the folder wwwroot/NewApp on the developer's workstation, copies all the
solution files under that, goes through all the files and replaces
"TemplateDefault" with "NewApp", and creates the webs in IIS.
The developer ends up with a fully functioning solution with the namespace
pattern of MyCompany.NewApp.<layer name>.
If anyone knows of any downsides to this approach, I'd be curious to hear
them.
After using this template for over a year, I have found it to be reliable
and very easy to maintain. I have not modified the vbscript once, so each
update simply involves updating the master solution, then copying files to a
share. The solution also upgrades to Visual Studio 2008 format with no
issues.
~ da Heathen
HeathenWorld.com
Michel LAPLANE (MVP) - 06 Mar 2008 17:40 GMT
Did you try to create your template in using export the template of the file
menu.
You can customize the generated file to change the project name for example
(look at the help)
Don't forget that you can also use Wizard extension in the .vstemplate file
that can be called by the VS wizard used to create your project and
allow you to execute VS command, to access the DTE2 class to add project,
item, folder, ... .
A lot of customization of your solution can be used
Enjoy with VS
>I created a Visual Studio 2005 solution template that has served my
> organization well using one vbscript. I have not seen a reference to
[quoted text clipped - 33 lines]
> ~ da Heathen
> HeathenWorld.com
HeathenWorld - 27 Mar 2008 01:44 GMT
The "export template" option was the first thing I tried. If it were capable
of exporting the entire solution with project references intact, I probably
would have continued down that path. Even if it were capable of exporting
the entire solution, I still would have ended up scripting the ability for
developers to easily generate a new namespace each time they create a new
solution from the template.
I ended up deciding that it was easier to make a basic vbscript that did
familiar file system and ADSI operations, and accomplished my goal of
creating a solution template without bothering to learn the details of
working with the Visual Studio template generating system.
It's all good. Using familiar tools was easier for me.
~ da Heathen
HeathenWorld.com
> Did you try to create your template in using export the template of the file
> menu.
[quoted text clipped - 44 lines]
> > ~ da Heathen
> > HeathenWorld.com