Skip to content

ConcurrentQueue is duplicate with System.Threading.dll package #1859

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

Closed
NN--- opened this issue Oct 24, 2016 · 6 comments
Closed

ConcurrentQueue is duplicate with System.Threading.dll package #1859

NN--- opened this issue Oct 24, 2016 · 6 comments

Comments

@NN---
Copy link

NN--- commented Oct 24, 2016

Make .NET 3.5 project.
Install both NUnit package and System.Threading.dll package (https://www.nuget.org/packages/System.Threading.dll/)

System.Collections.Concurrent.ConcurrentQueue defined in both assemblies.

@CharliePoole
Copy link
Member

This class is in the 2.0 and 3.5 builds of the framework. One solution would be to put it into our own namespace, since it is only used internally. That will require some aliasing where it's used. We could also experiment with changing it's visibility - not sure that will remove the conflict. A third solution would be for us to use the same package ourselves, although it most likely contains stuff we don't need.

@CharliePoole
Copy link
Member

As a workaround, you can use an alias on the reference to System.Threading.dll. Or make your test project target .NET 4.0 or higher.

@NN---
Copy link
Author

NN--- commented Oct 24, 2016

@CharliePoole If it is used internally then mark it internal and it will solve the issue.
Thanks.

@CharliePoole
Copy link
Member

@nn Certainly the easiest if it works. I guess I'm slightly distrustful of VS doing the logical thing. 😄

We kept these classes taken from Mono public simply because we didn't want to modify the source, but in retrospect maybe they should all be internal.

@NN---
Copy link
Author

NN--- commented Oct 24, 2016

Thanks
Waiting for the update.

@hknielsen
Copy link
Contributor

@CharliePoole we had same issue, with clash of classes. So I made a PR resolving this, with the solution that @NN--- and you talked about. And that fixed it.

@ChrisMaddock ChrisMaddock added this to the 3.7 milestone Apr 5, 2017
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

4 participants