We use resx files for globalization, as well as finding a database for things that can be customized (for example, tab names that may vary by product) by our CS staff, and thus are not known at design time.
I created a custom tool that reads resx files and intelligently uploads key / value pairs to a relational database (corresponding values, so we donβt have duplicates).
This was a big help for our business - we do not need to send every resx for translation (and pay for duplicate translations of common words), and we have a "gold standard" with all our translations (in the database).
The tool I created also reads the database, collects key / value pairs and translations of each value and creates text files for each resx file (and each text translation of the text file) and automates the launch of resgen.exe, the command line tool that comes with Visual Studio, to compile resx files from generated text files.
I have no integration with the source, so we have to manually check the resx files and manually check the generated files when using this tool, but this was not a big problem.
My problem is that this method is not suitable for our new MVC projects: MVC projects require resx files for embedded resources using the "public" access modifier.
Thus, we fixed it manually, which introduces the possibility of human error and adds a non-trivial amount of work.
Is there a way to get the resgen.exe file to create embedded and public resource files? If not, is there another way to create resx files that will do this?
Update, additional question: The resx files that we generate using this method also raise a warning:
A custom tool 'PublicResXFileCodeGenerator' is associated with file '(resxname)', but the output of the custom tool was not found in the project. You may try re-running the custom tool by right-clicking on the file in the Solution Explorer and choosing Run Custom Tool.
The specified tool is the tool that we originally used to create resx files. Is there a way to prevent this warning?