Open xperiandri opened 2 months ago
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?
Current behavior
Build error with:
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-L34to 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