-
Notifications
You must be signed in to change notification settings - Fork 250
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
Subdirectories are ignored when including files without extension #5898
Comments
I was trying to fix this now and this is what I can think of: foreach (var targetPath in targetPaths)
{
newTargetPaths.Add(PathUtility.GetStringComparerBasedOnOS().
Compare(Path.GetExtension(fileName),
Path.GetExtension(targetPath)) == 0
? targetPath
: Path.Combine(targetPath, recursiveDir));
} A condition can be added to check if the file extension isn't |
@jp2masa you are on the right track, i will look forward to a PR from you |
Unfortunately I won't be able to open a PR today, because I can't debug tests in VS, but I'll repair VS now and open a PR probably tomorrow. |
(I'll try to fix this and I know where the problem is, but if this behaviour is expected and this isn't a bug, please point me in the right direction. The behaviour is expressed in this statement: https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Build.Tasks.Pack/PackTaskLogic.cs#L426)
If I add this to my project file:
And I have for example these files:
"file" will be copied to "tools\", while "file1.cs" will be copied to "tools\folder1\" and "file2.cs" will be copied to "tools\folder2\"
The text was updated successfully, but these errors were encountered: