NuGet/NuGet.Client#909 fixes a few issues, but there are more.
PathResolver.IsWildcardSearch(...) only checks for presence of a star character (*), but PathResolver.WildcardToRegex(...) supports question mark character (?)./) and backslash (\), but it is not clear if NuGet intends to support both interchangeably on both Windows and Unix-flavored operating systems.Adding another issue to the list:
Here's the description from there:
Globbing patterns in nuspec using forward slashes do not match files. The same pattern with backslashes works.
Using NuGet.exe 3.5.0.1938 on Windows 10
TestPackage.nuspec
folder/
test.txt
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>TestPackage</id>
<version>1.0.0</version>
<authors>name</authors>
<description>description</description>
</metadata>
<files>
<file src="folder/*.txt" target="dir1/" />
<file src="folder\*.txt" target="dir2/" />
</files>
</package>
nuget.exe pack TestPackage.nuspecNuGet package contains:
<nupkg>/
TestPackage.nuspec
dir1/
test.txt
dir2/
test.txt
The globbing pattern for folder/*.txt does not match files, but folder\*.txt does.
<nupkg>/
TestPackage.nuspec
dir2/
test.txt
Threw in a couple of pack issues with forward/backward slashes.
Added all related issues I could find that deal with paths cross-plat both pack and push related ones.
Assigning @rohit21agrawal and @zhili1208 to this mega-issue as they are the ones that had multiple of these assigned to them.
The glob syntax doesn't seem to be documented anywhere. Would be nice to add this to the TODO list. In particular I'd love to know how to negate a match e.g. *!(preview)*.nupkg (find all .nupkg files without preview in the file name).
Most helpful comment
Added all related issues I could find that deal with paths cross-plat both pack and push related ones.
Assigning @rohit21agrawal and @zhili1208 to this mega-issue as they are the ones that had multiple of these assigned to them.