Adding 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 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.

Note   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

  1. In Solution Explorer, select a target project.
  2. On the Project menu, select Add New Item.
  3. Select a Category in the left pane.
  4. Select an item Template in the right pane.
  5. Select Open.

See Also

Removing, Deleting, and Excluding Items | Adding and Removing Solution Items | Managing Solutions, Projects, and Files | Using Solution Explorer | Item Management in Projects | Introduction to Solutions, Projects, and Items |File Types and File Extensions in Visual Studio .NET