You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debug.Assert() cause the test host process to crash when tests target .NET Core.
This could be quite misleading as it is not usually clear why the tests are not running and could sometimes be not obvious that the rest is not running (the VS UI has recently improved on making it more obvious, so it is less of a problem).
As this project makes heavy use of Debug.Assert(), I think it would be nice to improve the experience for contributor.
Describe the solution you'd like
I've raised an issue on microsoft/vstest#2309 to discuss a global solution for the test runner as it would be nice for anyone to get this better behavior out of the box.
Just FYI the provided implementation will also throw on any Debug message, there is currently a PR under review for this change that applies to both Debug and Trace, and works as expected. microsoft/vstest#2335 The change will hopefully be merged soon so you will get it in the next release / preview.
We do not ship anything built using the Debug configuration. That should mean all Debug.Assert(...)s are disabled. What scenario would this help with❔
About the only value I can think of would come in conjunction with #11632 but we haven't decided to do anything about that. Or, are you talking about problems that crop up when debugging tests❔
Debug.Assert()
cause the test host process to crash when tests target .NET Core.This could be quite misleading as it is not usually clear why the tests are not running and could sometimes be not obvious that the rest is not running (the VS UI has recently improved on making it more obvious, so it is less of a problem).
As this project makes heavy use of
Debug.Assert()
, I think it would be nice to improve the experience for contributor.Describe the solution you'd like
I've raised an issue on microsoft/vstest#2309 to discuss a global solution for the test runner as it would be nice for anyone to get this better behavior out of the box.
@nohwnd has provided in microsoft/vstest#2309 (comment) a possible implementation of a
TraceListener
to handle this.Would you be open to include this in the ASP.NET Core tests?
The text was updated successfully, but these errors were encountered: