-
Notifications
You must be signed in to change notification settings - Fork 80
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
ValueTask defined in xunit.runner.visualstudio v3 causing conflict #431
Comments
The reason you're seeing this is because the test adapter uses ILRepack so there is a private copy that's been repacked inside. However, the more important question is: Why are you linking against |
There is a package reference to xunit.runner.visualstudio for our unit test projects. No direct reference to xunit.runner.visualstudio.testadapter. |
The issue is that we are forced by VSTest to copy all of our DLLs into your output folder. This is done outside the build process where, if we shared any dependencies, they could resolve those dependencies for us (because you're not actually linking against our runner DLL). This is why we use ILRepack in the first place: any dependencies that we have need to become internalized or else we have a potential conflict problem (your version vs. our version). Additionally, ILRepack normally marks everything that's imported as internal instead of public, but it seems we have exposed some things publicly which consume/produce The visual difference here in ILSpy is subtle, but the types/namespaces which are public are black vs. the ones that are internal being gray. I'll see if I can make some changes to what's left as public so that our version of |
Fix available in I was able to reduce the public surface to just the one class that VSTest needs to find publicly, and the interfaces they define don't include |
This resolves our issue since we now can prioritize based on visibility. Thank you so much @bradwilson for your responsiveness and the fix in such a short time. It is highly appreciated! ❤️ |
Issue
Type conflict caused by
ValueTask<>
causes dynamic type resolution to fail.The following two type definitions collide for tests executed on .NET Framework:
Potential Resolution
Would it be possible to used System.Threading.Tasks.Extensions package rather than defining your own
ValueTask<>
?Background
aqua-core is a library that allows to serialize type information to be carried and re-created across application boundaries, different .net runtime and platform versions. Types defined in multiple locations (loaded into the default loading context) do contradict the concept and cannot be included in corresponding models. Hence, we're currently blocked from updating to xunit.runner.visualstudio.3.0.0.
The text was updated successfully, but these errors were encountered: