Open miloszkukla opened 5 years ago
Fyi @OsirisTerje, I reproduced this with the project I had open in VS (16.1)
The same for me:
According to this StackOverflow question I used the following workaround:
[Test, Apartment(ApartmentState.STA)]
[STAThread]
public void NameOfYourTest()
{
using (var form = new NameOfYourForm())
{
form.Visible = true;
form.Focus();
Application.Run(form);
}
}
@christianjunk Thanks! That makes sense! Do you mean it worked as it should with adding that? If so, it's a good workaround.
@christianjunk Thanks! That makes sense! Do you mean it worked as it should with adding that? If so, it's a good workaround.
@OsirisTerje This solution worked for me as expected. According to NUnit3 I have edited my answer and added the following line:
[Test, Apartment(ApartmentState.STA)]
Having a test like:
works fine when run without debugging (form is visible) however when run with debugging, the form is not visible.
Possibly related to: https://github.com/nunit/nunit3-vs-adapter/pull/42 ?