In my VS 2008 projects, I need to generate resource file from .resx file after each build (in case there were changes on the .resx file). Of cource I can do it manually but it is just not efficient at all.

Remember to put the quote " in the parameter. At the very first time, I do not realize the quotes are needed, and always get error "The command $(VS80COMNTOOLS)..\..\SDK\v2.0\Bin\resgen.exe {ResourceDirectory}\{ResourceName}.resx {OutputDirectory}\{ResourceName}.resources" failed and exited with code 9009.