This documentation is archived and is not being maintained.

'System.STAThreadAttribute' and 'System.MTAThreadAttribute' cannot both be applied to the same method

The System.STAThreadAttribute and System.MTAThreadAttribute attributes are mutually exclusive.

Error ID: BC31512

To correct this error

  • Apply either System.MTAThreadAttribute or System.STAThreadAttribute, but not both.

Show: