Question

The pre-build and post-build events can be added from the properties window of a visual studio project inside the IDE. But where are these scripts stored ? I need to check-in these scripts to our tfs server. So, what is/are the files that should be checked-in ?

Was it helpful?

Solution

MsBuild doesn't create any files for the pre/post build events (afaik; and if it did, they would have a randomly generated filename and end up in the systsm's temp directory anyway): what you enter in de dialogs in VS is passed directly as a string to the Exec command's Command parameter. Furthermore that string is also just stored as-is in your project file, which is likely checked in already.

So if you enter a plain command (like echo hello) as a build event, you don't have to do anything special. If you enter the path to a batch file or exe however, you better place that file in a directory that is also under source control and use a relative pathm, and you have to make sure that file is also checked in.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top