Closed jasoncastellano closed 4 years ago
Currently net462
is the minimum target, it was chosen partly because of xUnit support and the fact that AsyncLocal<T>
is only supported from net462
onwards.
I have prepared a PR that supports net45
that uses ThreadLocal<T>
instead of AsyncLocal<T>
which should be sufficient with the caveat that you will need to call Dispose()
on the logger to clear the LogEvents
collection of the sink.
If you don't do that you will get multiple messages being collected as tests are isolated by assembly (NUnit default) though even with xUnit / MSTest that could cause problems at times.
See PR #8
@jasoncastellano if you download this zip that contains the preview packages with net45
support. Could you give these a spin and let me know if that works for you?
If it does I'll merge the PR and push the packages.
As I've had no response yet I'm closing this issue and the associated PR. Maintaining net45 is a bit tricky and moving forward not something that is going to be sustainable.
Any chance of updating the projects with .NET Framework 4.5 targets? Would love to use this sink for unit testing, but only targeting .NET Standard is quite limiting.