NAnt and BC3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arboboo
    New User
    • Apr 2010
    • 2

    NAnt and BC3

    I want to execute the BC3 from the NAnt.

    My NAnt script like this:

    <exec program="c:\Program Files\Beyond Compare 3\BComp.exe" commandline="SessionName" />


    When I run the NAnt script, the BC3 window was opened and the files are exactly same. But the NAnt stopped at the error:


    [exec] External Program Failed: c:\Program Files\Beyond Compare 3\BComp.exe (return code was 102)



    Any suggestion?

    Thanks.
  • Aaron
    Team Scooter
    • Oct 2007
    • 15998

    #2
    Hello,

    What type of session are you opening? Is it a Text Compare between two files?
    Do you have issues if you pass in two file names instead of a session name?
    Aaron P Scooter Software

    Comment

    • arboboo
      New User
      • Apr 2010
      • 2

      #3
      I have tried 3 cases.

      Session to compare 2 files
      Session to compare 2 folders
      directly pass 2 file name.


      All of them stopped at the error:

      External Program Failed: c:\Program Files\Beyond Compare 3\BComp.exe (return code was 1)



      The only difference is the return codes. It could be 1 or 102.


      Thanks.

      Comment

      • Michael Bulgrien
        Carpal Tunnel
        • Oct 2007
        • 1772

        #4
        Originally posted by arboboo
        My NAnt script like this:
        <exec program="c:\Program Files\Beyond Compare 3\BComp.exe" commandline="SessionName" />
        I don't use NAnt, but the BC3 help file shows the session name being enclosed in double quotes. My guess
        is that the quotes around "SessionName" in your example above are not being passed to the command line.
        Is it possible that you need to imbed another set of double quotes?

        <exec program="c:\Program Files\Beyond Compare 3\BComp.exe" commandline="""SessionName""" />
        BC v4.0.7 build 19761
        ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

        Comment

        • Aaron
          Team Scooter
          • Oct 2007
          • 15998

          #5
          Hello,

          If this is part of an automated solution, should you be loading script instead of a Session? Loading script can perform a series of command.
          Loading using /quickcompare as a command line argument will provide feedback through the %ErrorLevel% variable (documented in the Help file under Command Line Scripting).
          Loading a session will pop-up the graphical interface to manually browse and view the session.

          Error 102 is passed if BComp is used with a Folder Compare session, since Wait is not supported for a Folder Compare. Instead, if you want to use the Folder Compare session graphically, you should use:
          bcompare.exe /solo "session name"
          Aaron P Scooter Software

          Comment

          Working...