Skip to content

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

Closed

Description

@NN---

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.

Activity

  1. CharliePoole commented on Oct 24, 2016

    @CharliePoole
    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.

  2. CharliePoole commented on Oct 24, 2016

    @CharliePoole
    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.

  3. NN--- commented on Oct 24, 2016

    @NN---
    Author

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

  4. CharliePoole commented on Oct 24, 2016

    @CharliePoole
    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.

  5. NN--- commented on Oct 24, 2016

    @NN---
    Author

    Thanks
    Waiting for the update.

  6. hknielsen commented on Apr 5, 2017

    @hknielsen
    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.

  7. added this to the 3.7 milestone on Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions