msbuild
msbuild copied to clipboard
[Bug]: including files with `**\*.SomeExtension` may not be expanded in some cases
Issue Description
See https://github.com/unoplatform/uno.templates/issues/354
In csproj, we simply have <PRIResource Include="**\*.resw" />
Then, we run a target that adds these to AdditionalFiles as follows:
https://github.com/unoplatform/uno/blob/1c635068111de02977090c8379206a4caac40b3d/src/SourceGenerators/Uno.UI.SourceGenerators/Content/Uno.UI.SourceGenerators.props#L359
We end up with:
2>C:\Users\XXX.nuget\packages\uno.winui\5.0.0-dev.3568\buildTransitive\Uno.UI.SourceGenerators.props(366,66): error MSB4184: The expression "[System.IO.Path]::GetFullPath(*.resw)" cannot be evaluated. Illegal characters in path.
Steps to Reproduce
Not consistent, but detailed above.
Expected Behavior
**\*.resw
should be expanded properly.
Actual Behavior
Error
Analysis
No response
Versions & Configurations
No response
To add to this issue, here's the location where we include this item group. It's located inside an Otherwise
block, if that's relevant.
Very likely to be #406. @nickrandolph are there any files under the project directory with paths longer than MAX_PATH
(260 characters)? The intermittency might be because they appear under obj\
or bin\
, maybe?
That's interesting, so properly excluding default bin/obj folders may be of help, thanks for the insights!
@jeromelaban please tell us if the suggestion from @rainersigwald does not work for you.
@AR-May we've not been able to validate that it's still happening, but we'll be able to soon, we'll let you know! Thanks for the follow-up.
This issue is marked as stale because feedback has been requested for 30 days with no response. Please respond within 14 days or this issue will be closed due to inactivity.
@AR-May so far it's not been havening anymore, so we can close this issue. We'll comment further if it ever happens again, thanks!
@rainersigwald We're still seeing it. We are also excluding bin/obj:
https://github.com/unoplatform/uno/blob/03700e28c0ae658605a3dba9143e62ca420f8134/src/Uno.Sdk/targets/Uno.DefaultItems.targets#L38-L39
Team triage: this issue is currently blocked by #9609. We need to improve logging to be able to investigate.