Closed marcin-chwedczuk-meow closed 6 years ago
Thanks for your detailed report. I was able to reproduce this issue with dotnet test and with visual studio test runner. Oddly, NCrunch hides this issue. I am still analysing.
Hello can you test the beta version on MyGet and confirm this fixes your issue? https://www.myget.org/feed/dupdobnightly/package/nuget/NFluent
I confirm - everything works correctly after fix. Thanks!
I have generated a new xunit test project using .net core 2.0, then I have changed the target framework to:
By default the following libraries are referenced and I could restore them after changing target framework (there is also NFluent that I referenced myself):
When I run tests using command line
dotnet test
using the following test class:I get the following error:
Temporary workaround is to add the following package:
I believe that problem is related here to too eager scan of the referenced assemblies assemblies. E.g. the line https://github.com/tpierrain/NFluent/blob/e63413aca0c823380360e70604fca65e2e6c39ce/src/NFluent/Helpers/ExceptionHelper.cs#L58 will also will try to load and scan
xunit.runner.visualstudio
assembly which is unnecessary.