sqlpackage.exe ignoring BlockOnPossibleDataLoss?
Have you tried executing sqlpackage.exe with /p:BlockOnPossibleDataLoss=false
in the command line?
I just used SQLPackage.exe to create a .dacpac file of my test database, then I pubished it with the /p:BlockOnPossibleDataLoss=false
option, and it overwrote my database.
Finally found the issue, I execute sqlpackage.exe within a powershell script where the error handling is set like
$Script:ErrorActionPreference = "Inquire"
since i never got the Inquire I assumed the problem was with sqlpackage.exe, however I had another powershell script included after the ErrorActionPreference was set, turned out the included script also had the ErrorActionPreference set, but to "Stop". Still I believe if I have set BlockOnPossibleDataLoss=false it should not result in an error, but at least I now have a way to handle it.
I had the same issue and /p:BlockOnPossibleDataLoss=false don't work.
The final solution was in my case, that it also has to be set in the debug settings of the project file:
Hope this helps someone! :)