Open colejohnson66 opened 1 week ago
I thought it was a simple thing to solve this issue, but in reality it is quite complicated.
It is not directly attributable to Avalonia but XamlX
@workgroupengineering Thanks! I've opened an issue on XamlX's side linking back here.
Describe the bug
It is documented that ResX localization must use
PublicResXFileCodeGenerator
:If these resources are in an external library, this would make perfect sense; You can't access an
internal
property of another assembly. However, if the resource and usage are in the same assembly, there's no accessibility concerns. Regardless, you get a cryptic compiler error:According to @maxkatz6, this is a bug. See: #16906
To Reproduce
Add a
Resources.resx
file to your project as so:Add a string resource:
In that same assembly, try to use it in a
UserControl
view:Expected behavior
As the resources are in the same assembly as the
UserControl
, compilation should work.Actual behavior
Avalonia version
11.1.3
OS
No response
Additional context
No response