The property <property name> cannot be deleted

 

For the latest documentation on Visual Studio 2017, see The property <property name> cannot be deleted on docs.microsoft.com. The property <property name> cannot be deleted because it is set as the Discriminator Property for the inheritance between <class name> and <class name>

The selected property is set as the Discriminator Property for the inheritance between the classes indicated in the error message. Properties cannot be deleted if they are participating in the inheritance configuration between data classes.

Set the Discriminator Property to a different property of the data class to enable successful deletion of the desired property.

To correct this error

  1. In the O/R Designer, select the inheritance line that connects the data classes indicated in the error message.

  2. Set the Discriminator Property to a different property.

  3. Try to delete the property again.

How to: Configure inheritance by using the O/R Designer
Data class inheritance (O/R Designer)
Walkthrough: Creating LINQ to SQL Classes by Using Single-Table Inheritance (O/R Designer)

Show: