Add New Item - Solution Items Dialog Box

Creates a new item in the Solution Items folder. Solution Items are available to all projects in a solution. Unless explicitly excluded, Solution Items are included in the solution build.

For example, bitmap files are common examples of shared solution items. When developing a multi-project application you can include a bitmap image, such as a corporate logo, in multiple forms belonging to different projects.

To access this dialog box, select the solution in Solution explorer, then select Add New Item on the Project menu.

  • Categories
    Displays folders for various categories of item types that you can select to filter the templates displayed in the right pane.

  • Templates
    Displays templates for creating an item in the Solution Items folder. If a template for the item you want to add to the Solutions Items folder does not appear in the Templates pane, you can try creating the file another way and then add it as an existing item to the Solution Items folder. For example, you could create the corporate logo bitmap and then add it to the Solution Items folder, but a template for a bitmap is not offered in the Templates pane.

    Note

    If your anti-virus software displays an alert offering to block script that the 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.

  • Name
    Type the name of the file you want to create. Names cannot contain the following characters.

    Specifies the unique identifier for projects in the destination root directory. Names cannot contain the following characters:

    • Pound (#)

    • Percent (%)

    • Ampersand (&)

    • Asterisk (*)

    • Vertical bar (|)

    • Backslash (\)

    • Colon (:)

    • Double quotation mark (")

    • Less than (<)

    • Greater than (>)

    • Period (.)

    • Question mark (?)

    • Forward slash (/)

    • Leading or trailing spaces (' ')

    • Names reserved for Windows or DOS such as ("nul", "aux", "con', "com#", "lpt#", and so on)

Open

Use this drop down menu to choose the editor with which to open the item. You can choose to open the selected file with an editor not provided by Visual Studio (Notepad, for example) on subsequent openings or accept the default editor.

  • Open
    Opens the file with the default editor associated with the file extension.

  • Open With
    Displays the Open With dialog box permitting you to choose the editor with which to open the file.

    Note

    You can always change the editor with which to open the file at a later time using the Open With dialog box. To do so, right-click on the file in Solution Explorer and choose Open With on the shortcut menu.

  • Large Icons
    Displays large icons for items in the Templates pane.

  • Small Icons
    Displays small icons for items in the Templates pane.

See Also

Tasks

How to: Add and Remove Solution Items

Concepts

Introduction to Solutions, Projects, and Items

Solution Items

Reference

Add Existing Item - Solution Items Dialog Box