Red Gate forums :: View topic - scriptsfolderxml format
Return to RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

scriptsfolderxml format

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message

Joined: 14 Aug 2012
Posts: 7
Location: South Bend, IN

PostPosted: Tue Aug 14, 2012 9:58 pm    Post subject: scriptsfolderxml format Reply with quote

I am working through the NANT scripts provided by my Red Gate Salesman for CI Automation with TeamCity and am having some issue with the file section"generate_upgrade_script_schema" which access the source repository directly via the /scriptsfolderxml flag.

I get "Error: The file <path>LocationToTesting.xml containing the script folder location XML fragment could not be parsed."

I tried several of the suggestions for the scriptsfolderxml format, even copying the <ScriptFolderLocation></ScriptFolderLocation> section from the project file generated by the UI after comparing Source to DB successfully.

SQL Compare is version:

The scriptsfolderxml file is "LocationToFile.xml"
and presently contains the information below (I've tried many combinations).

Does anyone know the exact format required for the /scriptsfolderxml flag when accessing TFS2010?

SQL Compare
SQL Compare
<ISOCCompareLocation version="1" type="TfsLocation">

The NANT section in question is:
<property name="migration.folder" value="Migrations" overwrite="false" />
<property name="production.revision" value="3" overwrite="false" />
<property name="ci.server" value="WEB01" overwrite="false" />
<property name="ci.database" value="AdventureWorks_TeamCity" overwrite="false" />
<property name="ci.workingdirectory" value="${environment::get-variable('CHECKOUTDIR')}" overwrite ="false" />
<property name="ci.user" value="AB" overwrite="false" />
<property name="" value="P1" overwrite="false" />
<property name="ci.versioncontroluser" value="tc" overwrite="false" />
<property name="ci.versioncontrolpw" value="B3" overwrite="false" />
<property name="latest.scriptsfolder" value="${environment::get-variable('checkoutDir')}\AWS2008LT" overwrite="false" />
<property name="repo.location.xml" value="${ci.workingdirectory}\NantBuildScripts\LocationToTesting.xml" overwrite="false" />
<property name="latest.revision" value="${environment::get-variable('BUILD_NUMBER')}" overwrite="false" />
<exec program="${sqlcompare.executable}" resultproperty="returncode" failonerror="false">
<arg value="/scripts1:&quot;${latest.scriptsfolder}&quot;"/>
<arg value="/revision1:${latest.revision}"/>
<arg value="/sourcecontrol2"/>
<arg value="/revision2:${production.revision}"/>
<arg value="/scriptsfolderxml:${repo.location.xml}"/>
<arg value="/migrationfolder:${migration.folder}"/>
<arg value="/AbortOnWarnings:high"/>
<arg value="/options:Default,IgnoretSQLt"/>
<arg value="/ShowWarnings"/>
<arg value="/verbose"/>
<arg value="/Report:&quot;PreUpgradeReport_Schema.html&quot;"/>
<arg value="/ReportType:Simple"/>
<arg value="/ScriptFile:&quot;UpgradeScript_Schema.sql&quot;"/>
<arg value="/force"/>
Back to top
View user's profile Send private message Send e-mail

Joined: 21 Aug 2012
Posts: 4

PostPosted: Fri Sep 14, 2012 10:07 am    Post subject: Reply with quote

I'm actually working in a TFS environment, but I think I've just worked this out!

You were almost there when you copied the ScriptFolderLocation section:

I copied the contents of that section (which is xml encoded), ran it through an xml decoder (like here: and then saved it to a file. Then I pointed the scriptsfolderxml flag at the file I just created.

I had to do a bit more work to get the migration folder bits to work but this got me started. I'll try to write a blog article on what I've done when I get chance.

Back to top
View user's profile Send private message

Joined: 21 Aug 2012
Posts: 4

PostPosted: Thu Sep 20, 2012 2:21 pm    Post subject: Reply with quote

Just by way of an update, I've stepped through this in a little more detail in and article on my blog (


Matt Whetton
Back to top
View user's profile Send private message
Brian Donahue

Joined: 23 Aug 2004
Posts: 6677

PostPosted: Thu Sep 20, 2012 3:39 pm    Post subject: Reply with quote


I did some work with this last week, and I think the long and the short of it is, the <ServerUrl> element is just the base URL for the server and the <SourceControlFolder> contains only the relative path.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group