asp.net-mvc - 无法安装 nuget pagckage Microsoft.AspNet.Identity.Core

标签 asp.net-mvc nuget asp.net-identity

我无法安装 nuget 包裹

Microsoft.AspNet.Identity.Core。

当我运行 install -package cmd 时,我收到以下消息。它指出我正在尝试将包安装到带有 .NET 4 的项目中,但包 0 并未引用该包。使用 VS2010 .NET v4

先感谢您。

下面是PM>文本:

PM> Install-Package Microsoft.AspNet.Identity.Core Installing 'Microsoft.AspNet.Identity.Core 2.1.0'. You are downloading Microsoft.AspNet.Identity.Core from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device. Successfully installed 'Microsoft.AspNet.Identity.Core 2.1.0'. Adding 'Microsoft.AspNet.Identity.Core 2.1.0' to PracticeMvcApplication. Uninstalling 'Microsoft.AspNet.Identity.Core 2.1.0'. Successfully uninstalled 'Microsoft.AspNet.Identity.Core 2.1.0'. Install failed. Rolling back... Install-Package : Could not install package 'Microsoft.AspNet.Identity.Core 2.1.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

最佳答案

Andrew 是对的,您不能在面向 .Net 4 或更低版本的项目上安装 Identity

关于asp.net-mvc - 无法安装 nuget pagckage Microsoft.AspNet.Identity.Core,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25305706/

相关文章:

azure - 弃用所有以前的 Azure Application Insights NuGet 包

visual-studio-2015 - nuget 错误 : the path for the selected source could not be resolved

c# - 授权策略始终返回 403(禁止)-MVC/API

c# - 如何用 MVC ActionFilter(或其他东西)替换基本 Controller ?

javascript - 带有 NuGet 的 Visual Studio javaScript 默认目录

visual-studio - 在 Visual Studio 中为 Azure Nuget 源添加凭据

asp.net-mvc-4 - 如何从 SimpleMembership 迁移到 ASP.NET.Identity

c# - ASP.NET MVC 显示用户全名

c# - 名称 'html' 也不存在于用户控件 MVC 和 C# 的当前上下文中的名称 'model'

c# - 在同一请求中呈现 View 和下载文件