Add New Item Dialog Box
Use this dialog box to add an item to the currently selected project. When you select an item from the Categories list, the appropriate files and references are added to your project.
Items are displayed in the Categories list based on the selected project type and the targeted version of the .NET Framework. If development policies defined in an application template apply to your project, the policies might simplify the choices displayed in the dialog box or affect the properties of some items and their values.
Note
The options available in dialog boxes, and the names and locations of menu commands you see, might differ from what is described in Help depending on your active settings or edition. This Help page was written with the General Development settings in mind. To view or change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.
To access this dialog box, click Add New Item on the Project menu.
Categories
Lists the project item hierarchy.Note
If only one category exists, this dialog box contains only one frame, Templates.
Templates
Displays item templates for the related project item types. When you select a template or a category, a brief description of that item appears underneath the Categories frame.In addition to using the templates that were installed with Visual Studio, you can create your own templates. For more information, see Creating Project and Item Templates. Also, you can create a project item from a downloaded template. For more information, see How to: Add Items Using Online Item Templates.
Only templates that apply to the version of the .NET Framework targeted by the project type are displayed.
Large Icons
Displays large icons for items in the Templates pane.
Small Icons
Displays small icons for items in the Templates pane.
Name
Enter the name of the file that you want to create.Add
Use this button to add the item to the currently selected project.Note
If your anti-virus software displays a message that offers to block script that the project template or wizard runs, choose not to block. If the script is blocked, Visual Studio may shut down. To prevent this condition, you can clear the anti-virus software setting for blocking script. However, if you change this setting, all script blocking is disabled.
Place code in separate file
Use this option to separate the functionality of a Web item into two files. This option is only available for Web items that support code separation. For more information, see Walkthrough: Creating a Basic Web Page with Code Separation in Visual Web Developer.Select master page
Use this option to select a master page for the item. This option is only available for Web items that support master pages. For more information, see Walkthrough: Creating and Using ASP.NET Master Pages in Visual Web Developer and ASP.NET Master Pages Overview.
For information about adding new items in templates for Visual C++, see Using Visual C++ Add New Item Templates.
For information about adding new items in templates for SQL Server projects, see Item Templates for SQL Server Projects.
See Also
Tasks
How to: Add Existing Items to a Project
Concepts
File Types and File Extensions in Visual Basic and Visual C#