Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency on xunit.runner.utility breaks xunit.runner.console #315

Closed
zeppelin37 opened this issue May 16, 2022 · 6 comments
Closed

Dependency on xunit.runner.utility breaks xunit.runner.console #315

zeppelin37 opened this issue May 16, 2022 · 6 comments

Comments

@zeppelin37
Copy link

Hi,
my unit test project references both nuget packages "xunit.runner.visualstudio" V2.4.5 and "xunit.runner.console" V2.4.1.
Both ship with a xunit.runner.utility.net452.dll, but one with a version 2.4.1 and the other in 2.4.2. The files overwrite each other in the output directory.
What I don't understand, is:

  • Why do you ship that dll at all? It is a separate nuget package, according to nuget.org
  • Why do you ship a "2.4.2-pre.22" version in a stable product?
  • Where did you get the "pre.22" from? The latest available package on nuget.org is pre.12
@bradwilson
Copy link
Member

Two thoughts.

  1. xunit.runner.console does not contain any libraries. It should not cause any dependencies when building:

    image

    Adding xunit.runner.visualstudio of course results in the copy of several DLLs (including xunit.runner.utility.net452.dll, but there should be no conflicts here.

  2. I can't provide a good answer as to why it was shipped that way. It looks like it came in with a PR from @ViktorHofer: Downgrade xunit.runner.vs to net462 #308. In my opinion, it should not have been merged with this prerelease dependency. It appears that it was done in a rush because of some issue caused by the 2.4.4 release and was perhaps not given enough attention as a result.

    As for where that build came from, this project has a NuGet.Config that will pull prerelease builds from the CI build feed in MyGet. This is here for the convenience of testing prerelease builds before things get publicly pushed to NuGet. However, that doesn't excuse why this was done.

I'm not sure why you're getting a conflict. My suggestion would be to revert to an earlier runner (one of 2.4.1/2.4.2/2.4.3) and see if this resolves your problem.

@bradwilson
Copy link
Member

Please provide a full repro project if you can, since I cannot reproduce the problem as described.

@ViktorHofer
Copy link
Contributor

ViktorHofer commented May 22, 2023

I can't provide a good answer as to why it was shipped that way. It looks like it came in with a PR from @ViktorHofer: #308. In my opinion, it should not have been merged with this prerelease dependency. It appears that it was done in a rush because of some issue caused by the 2.4.4 release and was perhaps not given enough attention as a result.

Agreed on that we should update the version to stable here:

<XunitVersion>2.5.0-pre.11</XunitVersion>

Redistributing files like xunit.runner.utility or xunit.abstractions has caused double write issues in the past which we worked around ourselves, i.e. xunit/xunit#1651. It might be good to re-evaluate the purpose of that process.

@bradwilson
Copy link
Member

bradwilson commented May 22, 2023

Agreed on that we should update the version to stable here:

<XunitVersion>2.5.0-pre.11</XunitVersion>

This is currently slated for a 2.5.0 prerelease of xunit.runner.visualstudio to coincide with a prerelease version of the core framework. When both reach RTM, the dependency will be an RTM dependency.

Redistributing files like xunit.runner.utility or xunit.abstractions has caused double write issues in the past which we worked around ourselves, i.e. xunit/xunit#1651. It might be good to re-evaluate the purpose of that process.

xunit.abstractions is needed on both sides of the app domain when using app domains in .NET Framework, so they need to be available in a predictable location on disk to be shared for both sides, so that the types are compatible when proxied.

xunit.runner.utility could be IL merged. The main branch for v3 is already IL merging all the runners so there are no extra dependencies on disk.

@bradwilson
Copy link
Member

Closing this as the prerelease has been resolved in 2.5.0 (and RTM versions of xunit.runner.visualstudio will stick with RTM versions of xunit.runner.utility moving forward). The other issue regarding conflict was not reproducible. If you can provide a repro with 2.5.0, please open a new issue. Thanks!

@bradwilson bradwilson closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants