# Re: Running subwcrev from Visual Studio Build Events

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 06 Jun 2008 22:33:57 +0200

jdege_at_korterra.com wrote:
> I'd thought it would be trivial to add updating version numbers to the
> automated build process, in Visual Studio 2005, by adding a call to
> subwcrev to the project's Build Events.
>
> It's not working.
>
> I'm trying:
>
> d:\tools\TortoiseSVN\bin\subwcrev . \$(ProjectDir)LocalBuildInfo.cs.tpl
> \$(ProjectDir)LocalBuildInfo.cs
>
> I get an error "subwcrev ... exited with code 6." Which is
> ERR_SVN_ERR, which doesn't tell me much.

The exact subversion error is printed on stdout.

But you call SubWCRev with '.' as the first argument. My guess would be
that the current directory is not really defined in a VS build event.

And make sure that paths which have spaces in them are placed between
quotes!

Stefan

```--
___
oo  // \\      "De Chelonian Mobile"
(_,\/ \_/ \     TortoiseSVN
\ \_/_\_/>    The coolest Interface to (Sub)Version Control
/_/   \_\     http://tortoisesvn.net

```