Runtime error with NuGet package: Could not resolve type System.ComponentModel.ListSortDirection

Igor Buchelnikov 1 Reputation point
2020-09-24T07:30:35.097+00:00

One of the users of my Nuget package (ObservableComputations) had a problem while running his application with the Nuget package installed:

Error: Could not load signature of ObservableComputations.Ordering`2[TSourceItem,TOrderingValue]:get_SortDirectionScalar due to: Could not resolve type with token 01000044 (from typeref, class/assembly System.ComponentModel.ListSortDirection, System.ComponentModel.TypeConverter, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) assembly:System.ComponentModel.TypeConverter, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.ComponentModel.ListSortDirection member:(null) signature:*

There is no error on my machine. I know the user is using Unity.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,869 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dylan Zhu-MSFT 6,406 Reputation points
    2020-09-25T05:40:37.36+00:00

    Hi IgorBucheInikov,

    Does one new unity project work with this nuget package normally? And according to this error, please check if the parameters are valid so that they can be passed into System.ComponentModel.ListSortDirection.

    Besides, you could also try to remove bin and obj folders, then restore the nuget package and rebuild the project.

    If they don't work, we suggest you could move to unity forum, maybe the community members could provide better suggestions for you.

    Best Regards,
    Dylan

    0 comments No comments