Change access modifier of .resx to public

Completed

Ahoi *,

I created a WPF application with Rider and I want to do my localization with resx. So, due to the solved issue https://youtrack.jetbrains.com/issue/RIDER-3108 it is possible to manually edit the .resx file and have the changes directly compiled to the .Designer.cs (Using a Designer like in VS would be preferred, but this is a know issue (see https://rider-support.jetbrains.com/hc/en-us/community/posts/115000356670-Designer-for-Resource-Files?input_string=Change%20access%20modifier%20of%20.resx%20to)).

BUT, what actually doesn't work, is that the resx only uses the ResXFileCodeGenerator, not the PublicResXFileCodeGenerator.
See picture:

 

This leads to have the access modifier of the .Designer.cs of internal, but I need public to make the localization work. How can I achieve that?

Thanks a lot for help!

1 comment
Comment actions Permalink

Solved it!

if anyone else runs into this problem, here is how to solve this:

- edit the .csproj file manually (context menu on project in Solution Explorer > Edit > Edit '<name>.csproj')
- search for the embedded resource tag that includes the Resources.resx file
- Change Generator child tag content to 'PublicResXFileCodeGenerator'
- save and enjoy


0

Please sign in to leave a comment.