<PackageReference Include="NUnit" Version="3.0.1" />

RequiresMTAAttribute

Marks a test that must run in the MTA, causing it to run in a separate thread if necessary. On methods, you may also use MTAThreadAttribute to serve the same purpose.
using System; using System.Threading; namespace NUnit.Framework { [Obsolete("Use ApartmentAttribute and pass in ApartmentState.MTA instead")] [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public class RequiresMTAAttribute : PropertyAttribute { public RequiresMTAAttribute() { base.Properties.Add("ApartmentState", ApartmentState.MTA); } } }