Ignore files and folders during deliveries

In the Visual Studio IDE, you can exclude specific files, folders, and file types from deliveries.

Edit ignore rules

To exclude items, you define ignore rules in a .dmignore file. For guidelines and examples of ignore rules, see Ignore files and folders.

To add or modify ignore rules:

  1. In Solution Explorer, select the project, solution, or folder where you want to edit ignore rules.
  2. Right-click, select Ignore Rules, and then select Edit .dmignore.

  3. Add and modify ignore rules.

Back to top

Ignore files and folders

You can apply ignore rules to one or more files or folders.

To specify files and folders to ignore:

  1. In Solution Explorer, navigate to the folder where you want to ignore files and/or folders.
  2. Select one or more items.
  3. Right-click, select Ignore Rules, and select one of these options:

    Option Details
    Ignore <file/folder name> Ignores a specific file or folder.
    Ignore <file/folder name> recursively Ignores a specific file or folder recursively.
    Ignore *.<file extension> Ignores all the selected file types.
    Ignores all the selected file types. Ignores all the selected file types recursively.

The appropriate ignore rules are added to the .dmignore file. You do not need to add them manually.

Back to top

Cancel recursive ignore rules

You can cancel all the recursive ignore rules inherited from parent ignore files.

To cancel recursive ignore rules:

  1. In Solution Explorer, select the folder where you want to cancel recursive ignore rules.
  2. Right-click, select Ignore Rules, and select Edit .dmignore.

  3. Enter: c:

Back to top

See also: