This PR changes the minimum supported framework to net45. In order to make that possible the test framework was switched from xUnit to NUnit as the former has a lower bound of net462 so that prevented the tests from running.
net45 does not support AsyncLocal<T> so the sink has been switched to use ThreadLocal<T>.
When using the sink for testing it is important that you add a tear-down step to call Dispose() on the logger to clear the LogEvents collection of the sink. This will prevent flaky tests due to the fact that test isolation in NUnit is per assembly and not test. (Though this is a problem for net45 / net462 mostly but your mileage may vary)
This PR changes the minimum supported framework to
net45
. In order to make that possible the test framework was switched from xUnit to NUnit as the former has a lower bound ofnet462
so that prevented the tests from running.net45
does not supportAsyncLocal<T>
so the sink has been switched to useThreadLocal<T>
.When using the sink for testing it is important that you add a tear-down step to call
Dispose()
on the logger to clear theLogEvents
collection of the sink. This will prevent flaky tests due to the fact that test isolation in NUnit is per assembly and not test. (Though this is a problem fornet45
/net462
mostly but your mileage may vary)