不明确的参考号(Microsoft.AspNet.Identity&安培; Microsoft.AspNet.Identity.Core) [英] Ambiguous reference issue (Microsoft.AspNet.Identity & Microsoft.AspNet.Identity.Core)

查看:217
本文介绍了不明确的参考号(Microsoft.AspNet.Identity&安培; Microsoft.AspNet.Identity.Core)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是建立一个AngularJS单页应用最新的VS2015的社区和ASP.NET 5等...

I'm building an AngularJS Single-Page App using the latest VS2015 Community and ASP.NET 5 etc...

而试图实现一个验证我现在遇到的问题是,我需要用这两个命名空间:

The problem I'm now having while trying to implement an Authentication is that I need to use these two Namespaces:

Microsoft.AspNet.Identity //Version 3.0.0-beta4
Microsoft.AspNet.Identity.Owin //Version 2.2.1

但由于Microsoft.AspNet.Identity.Owin有依赖

but since Microsoft.AspNet.Identity.Owin has a dependency with

Microsoft.AspNet.Identity.Core 

我不断收到明确的引用的问题,例如对的UserManager存在于两个Microsoft.AspNet.Identity和Microsoft.AspNet.Identity.Core。

I keep getting ambiguous reference issues, for example for UserManager which exists in both Microsoft.AspNet.Identity and Microsoft.AspNet.Identity.Core .

有没有其他人之前处理的呢?
它是一个版本不兼容问题,或者仅仅是不完整的Owin ASP.NET 5执行?

Has anyone else dealt with this before? Is it a version incompatibility issue or just the not complete Owin ASP.NET 5 implementation?

推荐答案

Microsoft.AspNet.Identity.Owin 包是ASP.NET的一部分身份2,不最新版本附带ASP.NET 5.尝试引用它会下载ASP.NET身份2,使你所遇到的奇怪的错误。

The Microsoft.AspNet.Identity.Owin package is part of ASP.NET Identity 2, not the newest version shipped with ASP.NET 5. Trying to reference it will download ASP.NET Identity 2 and cause the weird error you're experiencing.

只是参考 Microsoft.AspNet.Identity ,它应该工作。

Just reference Microsoft.AspNet.Identity and it should work.

这篇关于不明确的参考号(Microsoft.AspNet.Identity&安培; Microsoft.AspNet.Identity.Core)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆