How to: Change Project Templates for ApplicationsÂ
In Application Designer, you can change the project template for an application if it supports implementation and is unimplemented. When the application is implemented, Visual Studio uses the template to generate the corresponding project files in the solution.
Note
The project template affects only the initial creation of the project and cannot be changed once the application is implemented or set if an application is reverse-engineered. For more information, see Considerations for Implementing Applications.
You can also assign a custom project template to an application. However, before you can assign a custom template, the template must first exist. You can also create a custom template. However, be aware of certain considerations when choosing and creating custom project templates. For example, only Windows, Office, and Web site project templates are supported.
For more information, see the following topics:
To change the project template for an application
On the application diagram, select an application definition that supports implementation.
In the Properties window, set the Template property to the project template you want.
Tip
If the Properties window is not visible, open it from the View menu by choosing Properties Window or pressing F4.
When the application is implemented, the appropriate application project files are generated.
To assign a custom project template to an application
On the application diagram, select the application definition that supports implementation.
In the Properties window, change the Template property to Custom Template.
Tip
If the Properties window is not visible, choose Properties Window from the View menu or press F4.
In the Open Custom Template dialog box, navigate to the location of the custom template.
Tip
By default, custom templates are saved to the following directory: "…\My Documents\Visual Studio 2005\My Exported Templates". When choosing a custom template for a custom application prototype that you plan to distribute, set the template property to a relative path (without the leading backslash (\)) instead of the absolute path. For more information, see Project Templates for Applications on Application Diagrams.
Select the custom template (.vstemplate) file you want to use.
Tip
When custom template files are created, they are saved as compressed .zip files. Before you can select a custom template file, you must first unzip the .zip file.
The project template is now set to the template file you chose.
Tip
After you assign a custom template to an application definition, you can add the definition to the Toolbox as a custom prototype to define new applications.
Once the application is implemented, the associated project is generated with the files specified by the custom template.
See Also
Other Resources
Implementing Applications on Application Diagrams
Assigning Project Templates to Applications on Application Diagrams