Open aomader opened 4 months ago
Superficially, it doesn't look unicode-related. My guess would have been that multiple frameworks are involved (I notice the repro mentions 7.0 but the issue mentions 8.0), but @javiercn might know more about this area.
@amcasey When I replace the Информация за съвместната отговорност по отношение на субектите на данни съгласно чл. 26, параграф 2, точка 2 от ОРЗД.pdf
file in the provided example by another zero byte file having only ASCII characters in its name and having the same amount of characters (asdasdasdasdasdasdasdadasdasdasd asd asd asd asd ads ada dasd ads ads asd asd asd ads asd asd asd adas asd asd asd as.pdf
) everything works just fine.
So I assume it is related to the characters contained in the filename, rather than the net7.0
target framework I specified (although I have a .NET 8 SDK installed as well).
@aomader Crazy. Thanks for confirming!
@aomader thanks for reporting the issue.
It seems that the expression is missing quotes
$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\staticwebassets\joint-controllership-agreement\bg-bg\38222\Информация за съвместната отговорност по отношение на субектите на данни съгласно чл. 26, параграф 2, точка 2 от ОРЗД.pdf))
This is likely not a problem in most situations until non ascii characters get introduced. I did a quick test and quoting the expression should fix the issue, we'll keep this issue around to produce a fix, which will have to go into the SDK.
$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\staticwebassets\joint-controllership-agreement\bg-bg\38222\Информация за съвместната отговорност по отношение на субектите на данни съгласно чл. 26, параграф 2, точка 2 от ОРЗД.pdf'))
Addressed as part of https://github.com/dotnet/sdk/pull/41244 since that code had to change
Is there an existing issue for this?
Describe the bug
I am creating a simple RCL that comes with static web assets.
The project is very simple and defined like
with some files in the
wwwroot/
containing unicode characters.Packaging it works fine (except for some long file name warnings), but that should not be a problem for now I assume.
When consuming the package in another project, I receive the following error (multiple of the same actually)
The mentioned
.nuget/packages/PKG/VER/build/Microsoft.AspNetCore.StaticWebAssets.props
contains the following entry at the echoed location:It is not clear to me what the issue is, since those files are generated automatically and I do not see anything obviously offending.
Expected Behavior
I would expect that the consuming project loads/builds just fine.
Steps To Reproduce
The following simple minimal example allows to reproduce the issue (at least on a Mac M1 with .NET 7). example.zip
Extract
example.zip
and then running the stepsshould result in the same error
Exceptions (if any)
No response
.NET Version
8.0.101
Anything else?