Setting Compiler Types in Templates
By default, templates use the project's default compiler type. If you
change the default compiler type for a project, the templates also start
using the new default compiler type.
You can edit a template's properties to use a specific compiler type
instead of the project's default compiler type. Once you change a compiler
type for the template, the template's compiler type does not change when the
project or the project's default compiler type change.
You can also create custom templates and set compiler types for them. When
a file is created from the custom template, the file is assigned that
compiler type instead of the project's default compiler type.
To set a compiler type for a template:
- From the main window, choose Tools
Options.
- In the Options window, expand the Templates node, expand the
appropriate template category node, and select the template you want to
change.
- Click the Execution tab.
- Click the value for the Compiler property and choose a compiler from the
combo box list.
To create a custom template and assign it a compiler type:
- Create a file from a template and give the file the name you want to use
for the template.
- In the Source Editor, make any modifications you wish to the file's
source code.
- Right-click the file in the Explorer and choose Properties.
- In the Properties window, click the Execution tab.
- Click the value for the Compiler property and choose a compiler from the
combo box list.
- Right-click the file in the Explorer and choose Save as Template.
- In the Save as Template dialog box, select a template category and click
OK.
The new template is available in the template chooser.
Legal Notices