Skip to content

Pack: files and directories beginning with dot (.) included even with no default excludes #8798

Closed
NuGet/NuGet.Client
#3114

Description

@dtivel

Details about Problem

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): NuGet.exe

NuGet version (x.x.x.xxx): 4.1.0.2450

Worked before? If so, with which NuGet version: 3.5.0.1938

Detailed repro steps so we can see the same problem

  1. Extract the contents of repro.zip to your machine.
  2. Open a PowerShell prompt and execute repro\repro.ps1.

Expected result

Files beginning with a dot (.) will be excluded by default.

Actual result

Starting with NuGet 4.1.0 files beginning with a dot (.) are included by default. (Look for entry c/.f for each NuGet version below.)

Attempting to build package from 'repro.nuspec'.
Successfully created package 'C:\repro\repro.3.5.0.nupkg'.
Attempting to build package from 'repro.nuspec'.
Successfully created package 'C:\repro\repro.4.1.0.nupkg'.
Attempting to build package from 'repro.nuspec'.
WARNING: NU5119: File 'C:\repro\a\c\e.nupkg' was not added to the package. Files and folders starting with '.' or ending with '.nupkg' are excluded by default. To include this file, use -NoDefaultExcludes from the commandline
Successfully created package 'C:\repro\repro.5.3.1.nupkg'.
3.5.0 contents (7):
  _rels/.rels
  repro.nuspec
  b.txt
  c/d.txt
  c/.g/h.txt
  [Content_Types].xml
  package/services/metadata/core-properties/729ede12c39f4a48b01dcdba27f0826f.psmdcp
4.1.0 contents (8):
  _rels/.rels
  repro.nuspec
  b.txt
  c/.f
  c/d.txt
  c/.g/h.txt
  [Content_Types].xml
  package/services/metadata/core-properties/f36442aba46c409ca5af848420269e94.psmdcp
5.3.1 contents (8):
  _rels/.rels
  repro.nuspec
  b.txt
  c/.f
  c/d.txt
  c/.g/h.txt
  [Content_Types].xml
  package/services/metadata/core-properties/a87992ae82004e3bb3f47b3e60e1dbf4.psmdcp

I think this change inadvertantly affected default excludes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions