Error adding xUnit.net nuget package

When adding xUnit.net NuGet package to a query I receive the following error:
Maybe I'm doing something wrong, can anyone help?


  • edited August 2018
    The package relies on the xunit.abstractions package which is corrupt. Take a look at the [Content_Types].xml file in the nuget package file:
    <?xml version="1.0" encoding="utf-8"?>
    Notice that the extension psmdcp is in there twice.

    The problem could be related to this:

    I suspect that the reason it works in VS2017 is that Visual Studio uses msbuild in the toolchain rather than asking the package for its dependencies, so that file is never read. I need to call NuGet's LocalRepository.ResolveDependency method and this is where it crashes.
  • Update: try the latest beta. I've added code to identify and remove duplicate attributes from the NuGet package file. It should at least work for the xunit.abstractions package, or packages with similarly duplicated attributes. (I don't know what other kinds of corruption there might be in the file.)
  • Thank you for looking into this issue and for the detailed explanation.
    In the new beta, it works.
    Thank you.
Sign In or Register to comment.