
Description
Background and Motivation
The .NET Framework had ResX* functionality that allowed the use of .resx resource files. .NET Core and later, no longer has this functionality, but does have something similar in System.Windows.Forms of the dotnet / winforms SDK. The original implementation, and the winforms implementation both have security flaws related to loading of assemblies defined in the .resx files themselves.
We have requirements that these resource files must be in plain text on the file system, thus we can't use the compiled .resource assemblies that were implemented. It should be possible to come up with a different schema for these resource files that does not define the assemblies to use in the resource file itself. The new resource files need to retain support for externally linked files. All values should be available as either a string, a byte array, or a stream, and nothing else.
This is a replacement for #47795 which was closed due to the security issues.
Proposed API
TBD, but it should be similar to the original design, including culture support. It should be as simple as possible, similar to how configuration files were greatly simplified in ASP.NET. With the limitation discussed above the existing tooling in Visual Studio for .resx files could be reused with slight modifications. The tooling should include the creation of partial classes as well.
Alternative Designs
I have found a way to hack the current winforms DLLs into an ASP.NET application, but it has the security risks mentioned above, and is reliant of the specific version of the .NET SDK being used.
Risks
The entire purpose of this functionality is to provide functionality w/o the risks that currently exist. There should not be any risk by adding new functionality that itself is safe.