title: Generating Resx files for MVC
body: <p>We use resx files for globalization, along with database lookups for things that can be configured (such as tab names, which can be different by product) by our CS staff, and thus aren't known at design-time.</p>
  
  <p>I created a custom tool that reads resx files and intelligently dumps the key/value pairs into a relational database (matching values so we don't have duplicates).</p>
  
  <p>This has been a big help to our business - we don't have to send each resx for translation (and pay for duplicate translations of shared words) and we have a 'gold standard' with all our translations (in the database).</p>
  
  <p>The tool I created also reads the database, picking up the key/value pairs and the translations of each value, and creates text files for each resx file (and each language's translation of the text file) and automates running resgen.exe, a command-line tool that ships with Visual Studio, to compile the resx files from the generated text files.</p>
  
  <p>I don't have any source-control integration, so we have to manually check out the resx files and manually check-in the generated files when using the tool, but this hasn't been a big problem.</p>
  
  <p>My problem is that this method is failing for our new MVC projects: the MVC projects require the resx files to be embedded resources with the Access Modifier of 'public'.</p>
  
  <p>Thusfar, we have been fixing this by hand, which introduces the possibility of human error and adds a non-trivial amount of work.</p>
  
  <p>Is there a way to get resgen.exe to create resource files that are embedded and public?  If not, is there another way I can create resx files that will do so?</p>
  
  <p>Update, additional question:
  The resx files we generate with this method also raise a warning:</p>
  
  <pre><code>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. 
  </code></pre>
  
  <p>The tool mentioned is the tool we initially use to create the resx files.  Is there a way I can prevent this warning?</p>