Use this generator to create a class containing all keys and values from the Resources.resw file or any resw file which has Resources keyword in its name.(eg: Resources.Error.resw)
This generator reads the Resources\en-US\resources.resw file and extracts each key.
The result is a generated class similar to the following:
The generator locates the .resw files by filtering for en-US\Resources, so make sure your .resw file is placed inside the en-US folder and has a Resources in its name. Otherwise, the generator will not be able to find it.
How To Use it?
Just add an AdditionalFiles entry to your .csproj.
1 | <ItemGroup> |
Namespace
You can define your own namespace by adding a property to a PropertyGroup.
1 | <PropertyGroup> |
Result
1 | public sealed partial class Strings |