DacFx
DacFx copied to clipboard
DoNotDropExtendedProperties=True not working in sqlpackage.exe
- SqlPackage or DacFx Version:
- .NET Framework (Windows-only) or .NET Core:
- Environment (local platform and source/target platforms):
Steps to Reproduce:
I have this properties when I save the publish profile in visual studio


but it drop the extended properties when I publish the profile locally from visual studio.
and when I tried to publish the same profile with azure pipeline got this error in my release pipeline

(DacFx/SqlPackage/SSMS/Azure Data Studio)
After playing around with turning check boxes on and off, and saving the publish profile. It seems it is possible to end up with both of these set:
<DoNotDropExtendedProperties>True</DoNotDropExtendedProperties>
<DropExtendedPropertiesNotInSource>True</DropExtendedPropertiesNotInSource>
To fix this using the UI, you can uncheck Drop objects in target but not in source at the top, then uncheck Drop extended properties not in source in the section below the scroll box, then re-check Drop objects in target but not in source at the top. Then hit save. This should remove the conflict.
Or to fix it manually, you could remove the DropExtendedPropertiesNotInSource element from your publish profile XML file.
This does seem like a bug...maybe. The UI should know there is a link between Do not drop extended properties and Drop extended properties not in source and should set them accordingly based on the UI.
@chadbaldwin thanks
<DoNotDropExtendedProperties>True</DoNotDropExtendedProperties> <DropExtendedPropertiesNotInSource>False</DropExtendedPropertiesNotInSource>
this setting work for me but definitely it's a bug in UI
Thanks for reporting this, @abhi421! DacFx has many options, and it seems we've missed a restriction on this particular combination. As the UI is over in SSDT, I'll bring attention to this issue to that team.