Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vnext UserManager exist in both libraries (ambiguous reference)

Tags:

.net

mongodb

I'm moving at vnext from mvc 5. I've faced some difficulties while adding controller for external authentication.

The type 'IdentityResult' exists in both 'Microsoft.AspNet.Identity.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'Microsoft.AspNet.Identity, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'

Versions of packages:

"Microsoft.AspNet.Identity": "3.0.0-beta5",
"MongoDB.AspNet.Identity;": "1.0.5" (and Microsoft.Asp.Net.Identity.Core as dependency)

I found that Microsoft.AspNet.Identity.Core is a dependency of AspNet.Identity.MongoDB package. I want to use MongoDb but I have ambiguous reference.

I have some ideas for a solution:

  1. aliasing (https://msdn.microsoft.com/en-us/library/ms173212(v=vs.140).aspx)
  2. deleting Identity.Core dependency from Identity.MongoDB package.

Сan somebody propose a different way for resolving this conflict?

like image 847
Polina Ruban Avatar asked Sep 11 '15 13:09

Polina Ruban


1 Answers

If you were feeling ambitious, you could re-compile the MongoDB library with the updated dependency and send a PR to the project.. If that's too much effort, aliasing seems like the right way to go.

like image 97
XeroxDucati Avatar answered Oct 30 '22 13:10

XeroxDucati