views:

17

answers:

1

Hey all,

I'm trying to use SubWCRev to get the current revision number of our SVN repository and put it in a file so I can show it in the UI.

As I'm working with a Web App, I use the following post build command line:

"SubWCRev.exe" "$(SolutionDir)." "$(ProjectDir)Content\js\revnumber.js.tpl" "$(ProjectDir)Content\js\revnumber.js"

It works great, but now I want to make sure I have SubWCRev before running it, so I can skip this post build if a fellow developer is not running TortoiseSVN.

I tried a few batch codes here, but couldn't figure this out.

Any ideas?

Thanks!

+1  A: 

Maybe it is acceptable in your situation to add the following after the subwcrev.exe call:

SubWCRev.exe "$(SolutionDir)." ...
exit 0

That way Visual Studio does not know that the post build generated an error and the build is successful even if some developers do not have the subwcrev.exe. If you perform other things in the post build then my proposal is probably not suitable.

Stefan Egli
It worked in this case, since I'm doing anything "fancy" in my post build event!Thanks!
wtaniguchi