Udostępnij za pośrednictwem


How to: Import or Export Resources

You cannot edit embedded resources in a Visual Studio project directly in the Visual Studio IDE; you must export and edit them in an external program, then import them back into the project.

Note

By default, all resources in a Visual Studio project are created as linked resources; you have to convert them explicitly to embedded resources. For more information, see Linked and Embedded Resources.

To export an embedded resource

  1. Select a project in Solution Explorer and then click Properties on the Project menu.

  2. Click the Resources tab. The Resource Designer page appears with a toolbar at the top.

  3. In the first dropdown box on the Resource Designer toolbar, select an embedded resource type that you want to import, such as "Images," "Icons," or "Audio." All resources of that type that exist in the project appear in the Resource Designer.

  4. Select the resource that you want to export, such as an icon or audio file.

  5. Right-click the resource and choose Export To File on the shortcut menu.

    Note

    This command is available only for embedded resources.

  6. In the Export resource to file dialog box, browse to the location where you wish to export the file, and then click Save.

To import a resource

  1. Select a project in Solution Explorer and then click Properties on the Project menu.

  2. Click the Resources tab. The Resource Designer page appears.

  3. In the first dropdown box on the Resource Designer toolbar, select an embedded resource type that you want to import, such as "Images," "Icons," or "Audio." All resources of that type that exist in the project appear in the Resource Designer.

  4. Select the resource that you wish to import, such as an icon or audio file.

  5. Right-click the resource and choose Import From File on the shortcut menu.

    Note

    This command is available only for embedded resources.

  6. In the Import file into resource dialog box, browse to the file you wish to import, and then click Open.

See Also

Tasks

How to: Create Embedded Resources

Concepts

Linked and Embedded Resources

Other Resources

Managing Application Resources

Resources Page, Project Designer