Skip to content

Move ResXResourceReader and ResXResourceSet from System.Windows.Forms to System.Runtime #47795

Closed
@AchimStuy

Description

@AchimStuy

Hello everybody,

at first I'm neither sure, whether this is the right repository nor whether it is truely an API proposal. If not, please excuse and help me, where to open the issue.

Background and Motivation

In an ASP.NET Core application I have a requirement to change ResX-Files without recompile. I would implement a custom IStringLocalizer, which reads from the ResX-files instead of the compiled resources.

Proposed API

Now there is a ResXResourceReader inside the System.Resources, but it's in System.Windows.Forms.dll. So currently I build a package with the Microsoft.Net.Sdk.WindowsDesktop and add that package to my WebApplication. There are no compile errors, but still this sounds wrong. And I don't want to copy paste the RexXResourceReader-code.

So I propose to move ResXResourceReader and ResXResourceSet to System.Runtime.dll just like the ResourceManager class.

Usage Examples

ResXResourceReader should be usable inside Microsoft.Net.Sdk.Web-Projects.

Alternative Designs

Maybe ResXResourceReader is already usable in Microsoft.Net.Sdk.Web-Projects. Then please tell me, how?

Risks

Stuff compiled against System.Windows.Forms could break. So maybe there would need to be a workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-suggestionEarly API idea and discussion, it is NOT ready for implementationarea-System.Resourcesneeds-further-triageIssue has been initially triaged, but needs deeper consideration or reconsideration

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions