How to: Change Project Templates for Applications

In Application Designer, you can change the project template for an unimplemented application on the application diagram. The project template determines the type of project that Visual Studio generates when you implement the application. You can select a predefined template or a custom template.

Note

You cannot change the project template or type after implementation. You cannot change the project template or type for a reverse-engineered application. Be aware of certain considerations when you select custom templates. For more information, see Project Templates for Applications on Application Diagrams and Considerations for Implementing Applications.

If you want to change an ASP.NET application's template to ASP.NET Web Application, set the following properties first:

  • Set the Project Location Type property to File System.

  • Set the Project property to a name, not a URL.

  • Set the Language property to the language you want.

If one of these properties contains an incompatible value, you will get an error message. To resolve this condition, change the incompatible value and then set the Template property.

To change the project template for an application

  1. On the application diagram, right-click the application and click Properties.

  2. In the Properties window, set the Template property to the project template you want to use.

    Visual Studio will generate the corresponding application project files when you implement the application. 

When you change the Template property on an Office application to a predefined Office template, Visual Studio will automatically update the application's Office Version setting. Visual Studio will validate this setting against the logical server's Office Version setting when you evaluate deployment.

Note

Changing the Office Version setting will not update the Template property. If you change this setting, update the Template property manually. To find this setting, right-click the application and click Settings and Constraints. In the Settings and Constraints Editor, click Application Settings. You will see the setting in the editor pane.

Visual Studio validates only the Office Version setting. It does not validate the Template property. You will not get a validation warning if the version in Template property does not match this setting. For more information, see Applying Settings.

To select a custom project template for an application

  1. On the application diagram, right-click the application and click Properties.

  2. In the Properties window, change the Template property to Custom Template.

  3. In the Open Custom Template dialog box, browse to the location of the custom template.

  4. Select the custom template (.vstemplate) file that you want to use.

    Note

    If you have a .zip file that contains the custom template file, unzip the .zip file first. Otherwise, you will get an error when you implement the application. For more information, see Considerations for Implementing Applications.

    Visual Studio sets the Template property to the template file that you selected. When you implement the application, Visual Studio will generate a project containing the files associated with the custom template.

    Note

    If you plan to distribute the application as a custom prototype, set the Template property to a relative path (without the leading backslash (\)) instead of an absolute path before you distribute it. For more information, see Project Templates for Applications on Application Diagrams and How to: Create Custom Prototypes from Configured Applications and Endpoints.

When you change the Template property on an Office application to a custom template, Visual Studio will not update the application's Office Version setting. 

Note

Update the Office Version setting manually so that Visual Studio can validate the setting correctly against the logical server's Office Version setting when you evaluate deployment. You will not get a validation warning if the version in Template property does not match this setting. To find this setting, right-click the application and click Settings and Constraints. In the Settings and Constraints Editor, click Application Settings. You will see the setting in the editor pane.

See Also

Reference

Application Types and Prototypes for Defining Applications

Other Resources

Implementing Applications on Application Diagrams

Assigning Project Templates to Applications on Application Diagrams