xunit/visualstudio.xunit

Reporters broken in 2.5.1 release

Closed this issue · 8 comments

I'm still investigating the actual root cause or workarounds.

The symptom I am having is that the teamcity reporter is no longer working in xunit.runner.visualstudio 2.5.1. This was working in xunit.runner.visualstudio 2.5.0.

I do get this error message when using -- xUnit.ReporterSwitch=teamcity

[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.5.1.1+5fe7eebc65 (64-bit .NET 7.0.11)
[xUnit.net 00:00:00.02] Could not find requested reporter 'teamcity'

I've narrowed down the difference to the fact that the dlls are no longer included in the build folder of the nuget package. Though still investigating if that is the true cause or not.

image

Which is these commits: 0d583f2 96555ae

Installing xunit.runner.reporters into the project has not fixed the issue but testing continues.

Runtime: .Net 7.0

After some Investigation, the best I can tell is that xunit.runner.visualstudio (xunit.runner.visualstudio.dotnetcore.testadapter.dll) which lives in the build folder is using that build folder for the reflection and so when xunit.runner.reporters.netcoreapp10.dll is not present in that folder the reporters from inside it are not discovered.

I haven't looked and checked out the discovery code to see if or how it could look inside the test project bin folder for those missing dlls or not... (or if this is the true issue) There is certainly some churn in this space recently though... so maybe it wasn't 100% completed before these dlls were removed?

@csMACnz This probably came from #383.

Fixed in 2.5.2-pre.3

I can confirm that the changes in 2.5.2-pre.3 have fixed this issue 🎉

Thanks for the prompt resolution, looking forward to 2.5.2 to drop 🙇‍♂️

I'll wait a few days to see if any other issues surface, and then just cut it over.

Thanks!

It affected 3rd-party reporter reportportal/agent-net-xunit#27. It worked good with 2.5.0.

File name of that reporter is ReportPortal.XUnit.reporters.dll which is located in output bin folder. Tests target net7.0.

I also tried 2.5.2-pre.3, still doesn't work.

@nvborisenko Please open a new issue with a repro project. Thanks!

@bradwilson issue #385 with a link to repro project is created.