uno
uno copied to clipboard
`The value "/**/*" of the "Include" attribute in element <ItemGroup> in file .nuget\packages\uno.sdk\5.2.161\targets\Uno.SingleProject.Desktop.targets`
Current behavior
Build error with:
The value "/**/*" of the "Include" attribute in element <ItemGroup> in
file ".nuget\packages\uno.sdk\5.2.161\targets\Uno.SingleProject.Desktop.targets (33,25)" is a wildcard
that results in enumerating all files on the drive, which was likely not intended. Check that referenced
properties are always defined and that the project and current working directory are not at the drive root.
Expected behavior
Restore works
How to reproduce it (as minimally and precisely as possible)
No response
Workaround
Go to Uno.SingleProject.Desktop.targets file and modify lines
https://github.com/unoplatform/uno/blob/57abfeaad51a495fa7512a19eec407bf77cd0739/src/Uno.Sdk/targets/Uno.SingleProject.Desktop.targets#L33-L34
to remove the forward slashes
Works on UWP/WinUI
Yes
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
5.2.161
Affected platforms
Skia (WPF), Skia (Linux X11), Skia (macOS), Skia (Linux Framebuffer), Skia (GTK)
IDE
Visual Studio 2022
IDE version
17.10.3
Relevant plugins
No response
Anything else we need to know?
https://github.com/unoplatform/uno/blob/57abfeaad51a495fa7512a19eec407bf77cd0739/src/Uno.Sdk/targets/Uno.SingleProject.Desktop.targets#L33-L34 look wrong as
https://github.com/unoplatform/uno/blob/57abfeaad51a495fa7512a19eec407bf77cd0739/src/Uno.Sdk/targets/Uno.Common.targets#L53 already contains a slash
Thanks for the report. Can you provide a repro?
Unless I give you my production solution I have no idea how to reproduce it.
But, even so, the leading slash in those MSBuild properties is definitely wrong.
As if the variable becomes "" it will do very wrong things
Why would DesktopProjectFolder be empty? Are you changing its value explicitly?
Hypothetically. I just deducting why MS never prepened paths with slash but append variables
Really I don't know how this error appeared but it had…
If the path is empty, this will cause all sorts of other issues, such as including all files from the root of the project, which is not the intent of that line. If you can provide a binlog of the issue, it will still help.
Here it is desktop.zip
Thanks. This is a very curious behavior and feels very familiar to https://github.com/dotnet/msbuild/issues/9351. Could you try moving your project to a very small path and see if it reproduces?