Unanswered: fun with MSBuild and SQLPackage
I have not been doing much database project deployment stuff in the last few years but I have been playing with MSBuild and SQL package today for something and I noticed that if I introduce a procedure into my target database that is not in my dacpac, the command line call to SQL package reports success and does not deploy the changes. However if I do the same thing from the Visual Studio 2010 publish database wizard, the deployment fails. What gives?
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ms build.exe "C:\TFS\MyDatabase.sqlproj"
CD C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\
SqlPackage.exe /Action:Publish /SourceFile:"C:\TFS\bin\Debug\MyDatabase.dacpac" /TargetConnectionString:"Data Source=MyComputer;Initial Catalog=HIXeCAAS_DB;Integrated Security=SSPI" /p:BlockOnPossibleDataLoss=False
If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry. Earnest Hemingway, A Farewell To Arms.