SQL Compare and MSBuild
agolovan
Posts: 2
I am new to this forum. I found an article "Red Gate MSBuild Tasks " explaining of how to run SQL Compare tasks from MSBUILD using C# code. However, I would like to do same as it is explaining in another article, "NAnt tasks for Red Gate SQL Compare", but just for MSBuild, not for NAnt. I need "MSBuild for SQL Compare" using configuration file and not C# (we are using Cruise Control NET and MSBuild). Any help will be really appreciated.
Comments
With that said, I would take it one step further and call powershell via EXEC task to make the call to SQLCompare.exe, this way you have power of powershell to basically do what ever you want. Powerhsell and MSBuild work great together and are much quicker to get working than using the ITask class via C# to write a custom task. Plus your scripts are not coupled with MSBuild when using powershell as they are when using C# and ITask.
Let me know if this help or if you have any other questions
I can even post the powershell script I use to call SQLCompare.exe
BJHop
MCTS-TFS
Below is the TeamBuild targets that could be used
we use team build to set up the workspace where the scripts folder is
we also have argument xml checked and this is what we call from the cmd line, makes it easy and we have a record of what is being called
Now here is the DB_Sync.ps1
This has been simplified but is should work
I hope this helps
Thanks,
BJHop