Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dtivel opened this issue Nov 7, 2019 · 0 comments · Fixed by NuGet/NuGet.Client#3114

Comments

@dtivel
Copy link
Contributor

@dtivel dtivel commented Nov 7, 2019

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.

dtivel added a commit to NuGet/NuGet.Client that referenced this issue Nov 12, 2019
Fix NuGet/Home#8798.
Progress on NuGet/Home#5016.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.