Attribute member '<membername>' cannot be the target of an assignment because it is not declared 'Public'

An attempt was made to assign a value to a private member of an attribute.

Error ID: BC31511

To correct this error

  1. Remove the assignment.

  2. If using custom attributes that you developed, change the attribute member's access modifier to Public.

See Also

Reference

Public (Visual Basic)

Other Resources

Attributes in Visual Basic