The type 'StackExchange.Redis.IDatabase' exists in both StackExchange.Redis and StackExchange.Redis.StrongName.
After switching from the old packages.config file to the PackageReference inside my csproj file, I got the following error message when trying to build:
The type 'StackExchange.Redis.IDatabase' exists in both 'c:\packages\StackExchange.Redis.1.0.481\lib\net45\StackExchange.Redis.dll' and 'c:\packages\StackExchange.Redis.StrongName.1.0.481\lib\net45\StackExchange.Redis.StrongName.dll'
However when I looked at the referenced packages I only saw a package reference to StackExchange.Redis…
The problem was that the StackExchange.Redis nuget package was referenced both directly using a PackageReference and indirectly through a reference with the Microsoft.Web.RedisSessionStateProvider.
After removing the direct reference to StackExchange.Redis, the build error disappeared.