Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does Visual Studio save pre/post build scripts?

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 ?

like image 723
MrClan Avatar asked Nov 26 '25 12:11

MrClan


1 Answers

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.

like image 128
stijn Avatar answered Nov 29 '25 12:11

stijn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!