title: Running PublicResXFileCodeGenerator at compile time
body: <p>We are using <code>PublicResXFileCodeGenerator</code> to generate <code>*.Designer.cs</code> files from <code>*.resx</code> files.  Currently these are generated whenever the <code>.resx</code> is saved or when we right click and choose "Run Custom Tool".</p>
  
  <p>I want to be able to run this tool automatically at build time, rather than having to do it manually.  The <code>Designer.cs</code> files are not kept under source control, so it gets annoying to have to manually generate them every time someone else changes the resource, or on the first checkout.  It's all right if the files are generated on every build, since they aren't very large, but doing it only when they're out of date would be even cooler.</p>
  
  <p>Note: This would be part of a Visual Studio build, not a command line build.  I found an answer to another question saying that it is possible from within VS, just not command line: <a href="https://stackoverflow.com/questions/894806/run-a-visual-studio-custom-tool-at-build-time">Run a Visual Studio custom tool at build time</a></p>