Year or so hence, I modified a project of mine to include subversion revision in installer file name. I installed MSBuild.Community.Tasks.Targets and modified csproj file so that it contained:
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
...
<SvnVersion LocalPath="$(MSBuildProjectDirectory)" ToolPath="C:\cygwin\bin">
<Output TaskParameter="Revision" PropertyName="Revision" />
</SvnVersion>
...
This worked like a charm. However, after upgrade to cygwin 1.7, following error started to occur when running build process:
C:\cygwin\bin\svnversion.exe --no-newline "Z:/cygdrive/z/dev/myproject/src/winservice"
'/cygdrive/z/dev/myproject/src/winservice/Z:/cygdrive/z/dev/myproject/src/winservice' doesn't exist
Z:\dev\swiftarhiv\src\myproject\myprojectservice.csproj(200,5): error MSB6006 : "svnversion.exe" exited with code 1. Done Building Project
"Z:\dev\swiftarhiv\src\myprojects\myprojectservice.cspro j" (Rebuild target(s)) -- FAILED.
I tried modifying LocalPath parameter of SvnInfo task to "." or "/cygdrive/z/dev/myproject/src/winservice", but SvnInfo task has a nasty habit of using windows full path no matter what you put in so "." resolved to the path used before and "/cygdrive/z/dev/myproject/src/winservice" resolved to "Z:/cygdrive/z/dev/myproject/src/winservice" which caused an error again.
Is there a setting I can set in Cygwin 1.7 that will make my problems scarce?