I am attempting to create a standardized database project for our organization that will mimick the project you select when creating a new project in Visual Studio 2005 under Other Project Types>>Database>>Database Project which will allow us to streamline our SQL server 2000/2005 script creation process as about 90% of customization business involves creating SQL scripts for various reporting and/or customization tasks.
I have examined thouroughly creating Visual Studio templates using the following URLs:
http://msdn2.microsoft.com/en-us/library/6db0hwky(VS.80).aspx
and
These templates appear to only be design for the following project types:
Visual Basic, C#, JScript, and XML
as described here:
http://msdn2.microsoft.com/en-us/library/5we0w25d(VS.80).aspx
We have also looked at modifying the files located here:
C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Templates
Which contains the database templates for the Database Projects located under Other Project Types>>Database>>Database Project and it doesn't appear that changes take effect when modifying these templates.
Our deliverables for this Visual Studio 2005 database project customization are as follows:
1. Allow for a customized Database Project to be created.
2. Allow for customized Item templates (http://msdn2.microsoft.com/en-us/library/ms247072(VS.80).aspx) so that we can have standardized stored procedure scripts, table creation scripts, etc
3. Allow for template parameters for our scripts such as the ones described here: http://msdn2.microsoft.com/en-us/library/eehb4faa.aspx
I have also looked at creating a custom template for SQL Server Management Studio in SQL 2005 however it does not appear that you can do that either from what I have looked at. When examining the following folder:
C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\sqlworkbenchprojects
There is a template file which I tried to edit, but it doesn't seem like it helps in our scenario. We want to have a project created with physical folders where various scripts will reside as we have different classifications for scripts that need seperate filesystem folders to be created on script creation. SQL Management Studio scripts lump everything together in the Queries subsection which is not desirable.
Regards,
Matt Olson
www.ottechnologies.com

Database Project Template (possible???)
MJC_Eagle
Unfortunately this is not a supported scenario. (got this answer from the product group)
/Ole
Steve Wertz
Hello Matt
The NEW style of templates in VS 2005 are called vstemplates. This is templates you have been reading about in the documentation referred to above. But VS 2005 is also compatible with the OLD style of templates which are very different. The database project template is installed in VS 2005 is still using the old style template! One quick way to observe this is that the project tempolate is NOT located in the ProjectTemplates folder as specified by the docs. If you want to create a new template for the database project type you should drop your files in %ProgramFiles%\Microsoft Visual Studio 8\Common7\Tools\Templates\Database Projects and add an entry in the vsdirs files. You can read more about vsdirs files and the old style of templates in the following link
http://msdn2.microsoft.com/en-us/library/2sc7ft4a.aspx
I think you should be able to achieve all your goals using the old style of templates. If you have more questions then fell free to reply to this post.
Thanks,
Ole
Alex Chertov
Thank you very much for the follow up. I have tried what you had mentioned before and I tried it again just to be sure however I am still stuck. What I have done is as follows:
1. I went to C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Templates\Database Projects and created a new .vsdir named (OTTDataProjects.vsdir) file with the following contents:
OTT Database Project.dbp|0|0|30|OTT TEST|{220A4C17-7E7C-4663-BBCC-5E607C6543CD}|1055| |OTT Database Project
2. I then created a OTT Database Project.dbp file with the following contents in the same folder as #1:
# Microsoft Developer Studio Project File - Database Project
Begin DataProject = "OTT Database Project"
MSDTVersion = "80"
Begin Folder = "COMPANY"
End
Begin Folder = "DYNAMICS"
End
Begin Folder = "OTHER"
End
Begin DBRefFolder = "Database References"
End
End
My custom project shows up in Visual Studio 2005 and I can create a new project with it. However I get the familiar "Change Scripts","Create Scripts", etc even though I changed it to show COMPANY, DYNAMICS, and OTHER instead of the "Change Scripts", "Create Scripts", etc.
How do I get it to create my folders correctly