0

I'm using Visual Studio database projects to publish db.

Added column encryption on columns of existing table. When I try to publish, I get a popup in Visual Studio that says "Value cannot be null. Parameter name: reportedElement".

If I don't encrypt the column, it works.

Visual Studio Error

avatar

What can do to solve this?

Using SQL server 2016, VS2017

YouXiang-Wang
  • 1,119
  • 6
  • 15
AshT
  • 1
  • 1
  • Does this answer your question? ["Value cannot be null. Parameter name: reportedElement" when adding a new Always Encrypted column to an existing table](https://stackoverflow.com/questions/55924997/value-cannot-be-null-parameter-name-reportedelement-when-adding-a-new-always) – Adamy Jul 14 '21 at 05:36

1 Answers1

0

Understood the issue. Due to encryption default constraint was removed which made column nullable. So just removed the default value and made column not nullable Publish was also having some default basic data inserts. So changed scripts to remove them, or other option could be to use sql execute in case to insert

AshT
  • 1
  • 1