It's been my experience that VS2008 projects will not automatically add files to the project to build. If you are auto-generating the files, then I would suggest approach that Qt uses may work for you.
For each of the files that are going to be auto-generated, they will automatically add -
- A custom compiler tool command in the properties for the source file. You can add custom compiler/build commands to any source file. I would recommend you manually add a command string for the source file and look at generated XML in the project.
For the generated file, they then add the generated file into the build list. For this, it will look like below. Your have to create/maintain a <Filter></Filter>
section in the project. See VS Project Layout for format & sample. I would note that each <file></file
> is listed individually in the <files></files>
section.
<Files>
<Filter
Name="Source Files"
Filter="cpp;cxx;c;def"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\buildimages.cpp"
>
</File>
<File
RelativePath=".\main.cpp"
>
</File>
It really isn't very simple, but if you build simple "script"/program, you can automate most of the work to update the project file before you do the build. Once you output the updated project file, VS will automatically detect the change and ask you to reload the project.