-
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
False NU5129 raised when a backward slash is involved in the path. #8806
Comments
I assume the issue specifically is what the warning is raising? I'd venture a guess that PackagePath is supported but the warning shouldn't be raised. |
We fixed it by changing it to forward slash. But It is a regression from 3.0.100. |
Can you be more specific? What's X and what's Y? The comments suggest 3.0.100 is the working version. |
Sorry, in 2.2.300 The upgrade from 2.2.300 to 3.1.100 is caused by azure devops automatic updating images. |
Thanks. |
The warning is not accounting for the path separators correctly here; https://github.com/NuGet/NuGet.Client/blob/48f67796ff38e98e3dfe4ab55fce000577b74fea/src/NuGet.Core/NuGet.Packaging/Rules/UpholdBuildConventionRule.cs#L97 An example of how things should be handled can be found here: https://github.com/NuGet/NuGet.Client/blob/48f67796ff38e98e3dfe4ab55fce000577b74fea/src/NuGet.Core/NuGet.Packaging/Rules/ContentFolderInPackageReferenceProjectRule.cs#L24 We should handle this in 5.5...//cc @rrelyea |
Also, maybe you should not check on the source files name and folder, but on the PackagePath Because right now it will fail, if you add a file "somewhere\foo.props.template" with a packagepath of "build/the.package.id.props" EDIT: See comment below |
That surprises me. Pack validations only have visibility of the path in the package. So if a packed file is renamed as part of the pack, the validation should have no way of seeing what the original file name was. |
I think @zivkan is correct. |
@zivkan & @nkolev92
As I can not reproduce it in a clean demo project. So I must have messed something up in my other project. |
I have managed to create a repro project. Somehow the source Identity comes into play. The following succeeds
And this fails:
You can find the code in the following repository NU5129-build-props |
Please read the following information before posting the issue.
After updating to 3.0.100, we get this in the CI. It is fine on mac and Windows
And this fixed it. Looks like PackagePath no longer tolerate backward slash on ubuntu
Details about Problem
dotnet.exe --version (if appropriate): 3.0.100
The text was updated successfully, but these errors were encountered: