|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
How to: Add New Project Items
Adding a project item is one way to extend the functionality of an application. Examples of project items include HTML pages, Class files, Web Services, ASP.NET pages, Dataset files, and Style sheets.
The types of files that you can add to a project are determined by the project template used to create it. For example, you can add a new file with extension .vb to a project created with a Visual Basic project template. However, you cannot add a new .vb file to a project created with a Visual C++ project template.
If your anti-virus software displays an alert offering to block script that the project template or wizard is running, choose not to block script; otherwise, Visual Studio shuts down. You can prevent this alert from showing when script is run by clearing the anti-virus software's setting for blocking script; however, changing this setting disables all script blocking, not just for Visual Studio.
To add a new project item
In Solution Explorer, select a target project.
On the Project menu, select Add New Item.
In the Category pane, select a category.
If only one category exists, this dialog box only contains the Templates pane.
In the Templates pane, select an item template.