Skip to content

Warn when Pack command excludes a file that starts with .  #3308

@gep13

Description

@gep13

I recently ran into an issue where executing a nuget pack wasn't working, resulting in the following error:

image

After doing some digging, it turned out that this was due to the fact that I was using .build within the paths of the files that I was trying to include. When I changed this to use BuildArtifacts instead everything started working again.

I reached out to @ferventcoder who mentioned that he had seen something like this before, and had in fact mentioned it here:

https://twitter.com/ferventcoder/status/505048107520765952

Back when there was no formal mechanism to report issues for NuGet.

The particular issue that Rob was referring to is due to the code that is located here:

https://github.com/NuGet/NuGet.Client/blob/a83e1070d7bd4d52d01ec960a5431d32874f9a8f/src/NuGet.Core/NuGet.Commands/PackCommandRunner.cs#L41-L46

More and more build systems/tools are using conventions where a . is included in either the file or a directory, so I personally think that this needs to be addressed.

Original bug report here: https://nuget.codeplex.com/workitem/4285

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions