We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

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

Visual Studio 2008

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.