WinForms application is not rendered when debugging a test
See original GitHub issueHaving a test like:
[Test]
public void Test()
{
Application.Run(new Form());
}
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 ?
- NUnit: v3.12
- NUnit3TestAdapter: v3.13
- Visual Studio 2017 Professional (15.9.5)
- .NET Framework 4.6.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
c# - Windows Form Won't Display in Debug Mode
I make it to the 'initForm.ShowDialog()' line of code. It runs that line of code but then nothing happens. I don't receive any...
Read more >Walkthrough: Debug a Windows Form - Visual Studio
Follow a walkthrough to see how to create and debug a Windows Form, a common managed application. You can use C#, Visual Basic,...
Read more >Cannot debug net6.0-macos Apps - Developer Community
This is a regression. I can no longer debug net6.0-macos apps. It also fails for net6.0-maccatalyst apps. When I hit debug, the following ......
Read more >Windows Forms application working in Release but not in ...
In this solution, the error occurs in both the Release and Debug configurations. ... As a last test, I cloned the solution manually....
Read more >Design Windows Forms | JetBrains Rider Documentation
If your project includes Windows Forms, you can use JetBrains Rider's visual Windows Forms designer and also create new Windows Forms ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Fyi @OsirisTerje, I reproduced this with the project I had open in VS (16.1)
@OsirisTerje This solution worked for me as expected. According to NUnit3 I have edited my answer and added the following line:
https://github.com/nunit/docs/wiki/Apartment-Attribute