0

Note: this question applies to using the MSBUILDCOMMUNITYTASKS add-in for MSBUILD. Specificly the functionality of SVNCHECKOUT and its inablity to find the svn.exe file even when it is located in a directory included in the PATH environment variable.

So I might be missing something obvious here but help at this point would be greatly appreciated.

I have some pretty sophisticated msbuild scripts that are running fine on 3 different Windows XP systems (and have been for 2 years).

I'm in the process of porting them to run on 64bit windows currently on a Windows 2008 Server. I'm working through all of the differences in directories and me having used the wrong environment variables in the past that made stuff not work as I moved to a new operating system.

But I am stuck now with the SVNCHECKOUT command giving me this error:

C:\Program Files (x86)\MSBuild\somedirectory\someprojfile.proj(44,5): error MSB4018: The "SvnCheckout" task failed unexpectedly.\r
C:\Program Files (x86)\MSBuild\somedirectory\someprojfile.proj(44,5): error MSB4018: System.Exception: Could not find svn.exe.  Looked in PATH locations and various common folders inside Program Files.\r

the following directory IS in the PATH:

C:\Program Files (x86)\CollabNet\Subversion Client\

and I can run svn.exe from there

I'd be OK using the SVNCLIENT directive to point to where the file is, but I've had no luck doing that.

Version wise I'm using

msbuild: Framework v3.5
msbuildcommunitytasks: nightly build from 12/10/2008 (it fixed bugs that kept me from using the "stable"version)
os: windows server 2008R2 SP1

TechSavvySam
  • 1,382
  • 16
  • 28
  • Are you sure svn.exe is in the folder? ..\Subversion Client\. For a quick fix, use the exact path – TheTechGuy Jul 21 '11 at 18:37
  • yes. I double checked right before I posted the above question and as I stated "and I can run svn.exe from there" – TechSavvySam Jul 21 '11 at 18:47
  • I just put a copy of svn.exe over in c:\bin and added that to the path. I was thinking that maybe MSBUILDCOMMUNITYTASKS was puking on the "(" and ")" in the path. That did not fix the issue. – TechSavvySam Jul 21 '11 at 19:14

2 Answers2

0

If you are running a batch script, I would set the path in the batch script first

set path=$path;'new path'; <--- please check this syntax as i used it a long time ago

If you are running it from Visual Studio environment, make sure it does uses the Windows Path variable, if not, include your path there somehow.

For a quick debugging, you can always use exact path and if that works, then work on path variable. It is possible that something else could be wrong.

TheTechGuy
  • 16,560
  • 16
  • 115
  • 136
  • I think you mean: SET PATH=%PATH%;'new path' and I'm not clear why you think I should do that as the directory that contains svn.exe is already in the path. – TechSavvySam Jul 21 '11 at 19:12
  • Dave, also when you say "use exact path", how do you configure that? I figure it's through the XML section, but I have tried to use that but it has no effect. – TechSavvySam Jul 21 '11 at 19:18
  • create a batch script hello.bat and put this in it `@ECHO off ECHO Hello World! PAUSE @ECHO on`. Put this hello.bat next to svn.exe. Write another script, similar to what you are using and just call this script > `call hello.bat`. See if it get execute. That way you know path IS working. – TheTechGuy Jul 21 '11 at 19:28
  • exact path? right click on file, it will give you properties. Click on the path of the file. Use that path instead. That way you need to mess with path for now :) – TheTechGuy Jul 21 '11 at 19:29
  • Dave, this is a question about the directive for MSBUILDCOMMUNITYTASKS. Either you have tangented off into a discussion about the use of PATH in a windows batch file (which I have been writing for over 20 years) or I don't understand what you are trying to say. – TechSavvySam Jul 21 '11 at 19:40
0

Well, it was clearly a bug in MSBUILDCOMMUNITYTASKS

I installed the nightly build create 2011-06-27 and it works now. This always makes me nervous with their software because it APPEARS to not be supported, but up to this point, I'll give the developers credit--they've yet to break anything I needed with newer code.

version that works:
Version: 1.3.0.514 Date: 6/27/2011

TechSavvySam
  • 1,382
  • 16
  • 28