Command Line unable to read script folder XML

XaphanXaphan Posts: 18
edited April 9, 2013 2:58PM in SQL Compare Previous Versions
I'm calling the SQL Compare command line in my CI build process to deploy a database. My database source is a database located on Team Foundation Server source control and my destination is to a SQL server. To provide SQL compare with the connection to Team Foundation Serveris I'm providing an XML file to the command line using the "scriptsfolderxml" switch. The problem is that I get the following error back...

Error: The file 'Automated.sfx' containing the script folder location XML
fragment could not be parsed. Check that the file exists and that its contents
are well-formed.


As far as I can tell my XML (which I named Automated.xml) is well formatted. It is also in the location of the working folder that I use to call the SQL Compare command line. Here is what my XML looks like (I changed the folder names for the sake of this post)...
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<ISOCCompareLocation version="1" type="TfsLocation">
  <ServerUrl>http://MyServer/MyRespository</ServerUrl>   
  <SourceControlFolder>$/MySourceControlFolder</SourceControlFolder>
</ISOCCompareLocation>

My command line arguments look like this...
/sourcecontrol1 /revision1:HEAD /sfx:Automated.xml /s2:MyDestinationServer /db2 MyDatabaseName + " /o:Default /Include:identical /sf:MigrationScript.sql /sync"

From what I can tell this should just work. What am I missing here?[/code]

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    The file format looks okay, so I think it's either the file name being incorrect or a relative path issue.

    The error message you quoted mentions a file with an .sfx extension and the command-line shows an .xml file extension.

    If that was a typo, can you spacify the full path to the XML file in the SQL Compare command? Every build system I've been exposed to expose some variables that you can use to get to the various working directories of the build system, for instance ($ProjectDir) in MSBUILD.
  • Thanks for the reply. I looked in to this issue further and here is what I found... I was able to get SQL Compare to work with the following command line on my personal workstation:
    "C:\Program Files (x86)\Red Gate\SQL Compare 10\sqlcompare.exe" /sourcecontrol1 /revision1:HEAD /s2:MyDatabaseServer /db2:MyDatabaseName /o:Default /Include:identical /sfx:Automated.xml /sync
    

    Automated.xml was located in the directory that I ran the command line from. I tried this again on my build server using the exact same command and got the following error:

    Error: The file 'Automated.xml' containing the script folder location XML fragment could not be parsed. Check that the file exists and that its contents are well-formed.

    My build server has both SQL Compare and SQL Source Control installed and they are both the same version as on my workstation. They also are located in the same directory. The Automated.xml is also located in the directory where I am calling the the command line from on the build server.

    Why is my workstation running the command prompt without errors, but the exact same command is giving me error on my build machine? Does my build machine need something installed or setup in order to make it work?
  • I realized that this ticket was closed before I posted my last response. I have re-posted the response as a new issue to...

    http://www.red-gate.com/MessageBoard/viewtopic.php?p=61215#61215
Sign In or Register to comment.