You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<ItemGroup>
<AvaloniaResourceInclude="..\avaresdir\**">
<!-- LinkBase does not seem to matter - whether it is present or not -->
<LinkBase>avaresdir</LinkBase>
</AvaloniaResource>
</ItemGroup>
and the dir structure:
src\app.csproj
avaresdir\*.png
The resources get resolved as avares://AppProjectName/../avaresdir/resourcefile.png instead of avares://AppProjectName/avaresdir/resourcefile.png. The generated -AvaloniaResources resource stores resource paths as /../avaresdir/resourcefile.png.
This would all be ok, but it fails at runtime, because regardless how the resource is referenced in xaml (whether as avares://avaresdir/resourcefile.png or avares://AppProjectName/avaresdir/resourcefile.png or averes://AppProjectName/../avaresdir/resourcefile.png or avaresdir/resourcefile.png or /../avaresdir/resourcefile.png), it complains that file is not found, presumably because the asset loader loads resources as /avaresdir/resourcefile.png.
To Reproduce
Include resources from outside project folder:
<ItemGroup>
<AvaloniaResourceInclude="..\avaresdir\**">
<!-- LinkBase does not seem to matter - whether it is present or not -->
<LinkBase>avaresdir</LinkBase>
</AvaloniaResource>
</ItemGroup>
Expected behavior
Regardless of whether the files are physically coming from, they should be properly included/embedded. LinkBase should be taken into account when including such resources from external directories.
Avalonia version
11.1
OS
Windows
Additional context
Furthermore there are related issues:
File Symlinks are not supported - fails at compile time with totally unrelated error message. In other words if the included files, are not real files, but symlinks, it fails entirely, which is pretty disappointing since symlink support is important.
<AvaloniaResource> does not support Visible element is when included from external dir will not be shown in Solution Explorer in any case, again just because it is not coming from within the project dir should not make it not appear in solution explorer when LinkBase is specified.
The text was updated successfully, but these errors were encountered:
Describe the bug
Given referenced Avalonia resources:
and the dir structure:
The resources get resolved as
avares://AppProjectName/../avaresdir/resourcefile.png
instead ofavares://AppProjectName/avaresdir/resourcefile.png
. The generated-AvaloniaResources
resource stores resource paths as/../avaresdir/resourcefile.png
.This would all be ok, but it fails at runtime, because regardless how the resource is referenced in xaml (whether as
avares://avaresdir/resourcefile.png
oravares://AppProjectName/avaresdir/resourcefile.png
oraveres://AppProjectName/../avaresdir/resourcefile.png
oravaresdir/resourcefile.png
or/../avaresdir/resourcefile.png
), it complains that file is not found, presumably because the asset loader loads resources as/avaresdir/resourcefile.png
.To Reproduce
Include resources from outside project folder:
Expected behavior
Regardless of whether the files are physically coming from, they should be properly included/embedded.
LinkBase
should be taken into account when including such resources from external directories.Avalonia version
11.1
OS
Windows
Additional context
Furthermore there are related issues:
<AvaloniaResource>
does not supportVisible
element is when included from external dir will not be shown in Solution Explorer in any case, again just because it is not coming from within the project dir should not make it not appear in solution explorer whenLinkBase
is specified.The text was updated successfully, but these errors were encountered: