I have created a CLR function in .NET and I am using that to deploy it to the database. When I try to generate the deployment script it errors out with the same error as when I try to deploy it. The error is :
publish DB_Name to ServerName creating publish preview... if this deployment is executed. [CLR.XmlSerializers] will be dropped and not re-created. This deployment may encounter errors during execution because changes to [CLR] are blocked by [CLR.XmlSerializers]'s dependency in the target database.
It is trying to stop you from destroying data before you publish. Often in dev/test environments you don't need this safe guard. In the advanced options, disable the verify steps and publish again. This is assuming you're using VS or similar, but the end result should be the same, you need to disable the validation or change your script.