<p>I have a source XML file that is used to create C# files that are then compiled as part of a project.<br>
Currently I have a BeforeBuild target that runs my XML to C# converter.<br>
The problem is that by the time the BeforeBuild step is run the old files appear to have been stored by the build system so the new files are ignored.</p>

<p>How can I get around this? It seems that Transforms would be the way but they are limited in what they can do.</p>

Well we have something similar-ish here. We gen a .cs off an xml file using a .tt. Both files are part of a specific csproj. Going properties->BuildEvents on the csproj gives this little snippet in the Pre-build event command line:
```
```
del "$(ProjectDir)MyCsFile.cs"
copy /b /y "$(ProjectDir)\MyXmlFile.xml" "$(TargetDir)"
"$(ProjectDir)tt.bat" "$(ProjectDir)MyTemplateFile.tt"
```
```
No idea if that's of any use to you, I hope it might suffice as a last chance workaround.