I'm using a pre-build event in Visual Studio to run a batch (.bat) file that performs some code generation (specifically, I'm running SqlMetal.exe to generate LinqToSql code).
Is the batch file guaranteed to finish before the compilation begins? Or does it run the batch asynchronously?
Bottom line: I want to make sure the new code gets compiled, not the old code.
If it's not guaranteed -- what solutions are available?
Yes. But note that if you have more than one step in your pre-build, only the last step will be checked for errors. See Gotcha! Visual Studio Pre/Post-Build Events for more info.