所以我想在我的web项目中安装Microsoft.AspNet.Identity.Core v2.1。我也有一个身份项目。
Solution
- Identity
- Web
当我运行时(从包管理器控制台)
Install-Package Microsoft.AspNet.Identity.Core
以身份项目为目标,NuGet将2.1版安装到项目中。 当我在Web项目上运行相同的命令时,NuGet会安装1.0版本。
我卸载了软件包,删除了packages.Config文件/ web.config中的条目,并从目录结构的packages文件夹中删除了该文件夹,清理了解决方案并再次尝试。
同样的结果。
我手动删除了引用,删除了packages.Config文件/ web.config中的条目并验证了目录结构中的packages文件夹中的文件夹不存在,清理了解决方案,验证了Identity项目中的dll (文件夹结构中的dll和Visual Studio中解决方案资源管理器中的属性是正确的版本,然后从那里手动安装引用。
同样的结果。
我重新启动了计算机(因为为什么不重启)。再试一次。结果相同。
似乎无论我做什么,Web项目都拒绝安装1.0以上的任何版本。
任何建议?
更新1:
我已经对Microsoft.AspNet.Identity.EntityFramework做了同样的事情,因为两者是耦合的。
同样的结果。
更新2:
根据要求
<packages>
<package id="Angular.UI.Bootstrap" version="0.11.0" targetFramework="net451" />
<package id="angularjs" version="1.2.17" targetFramework="net451" />
<package id="Antlr" version="3.5.0.2" targetFramework="net451" />
<package id="AutoMapper" version="3.2.1" targetFramework="net451" />
<package id="bootstrap" version="3.0.3" targetFramework="net451" />
<package id="DataAnnotationsExtensions" version="1.1.0.0" targetFramework="net451" />
<package id="DataAnnotationsExtensions.MVC3" version="1.1.0.0" targetFramework="net451" />
<package id="Dinheiro.GoogleAnalytics" version="2.0.2" targetFramework="net451" />
<package id="elmah.corelibrary" version="1.2.2" targetFramework="net451" />
<package id="Elmah.MVC" version="2.1.1" targetFramework="net451" />
<package id="EntityFramework" version="6.1.0" targetFramework="net451" />
<package id="FontAwesome" version="4.0.3.1" targetFramework="net45" />
<package id="GMC.CustomerInfo" version="2.2.7.3" targetFramework="net451" />
<package id="GMCLogger" version="1.1.23" targetFramework="net451" />
<package id="GMCServicesCore" version="2.0.234" targetFramework="net451" />
<package id="jQuery" version="2.0.3" targetFramework="net451" />
<package id="jQuery.Validation" version="1.11.1" targetFramework="net451" />
<package id="LinqKit" version="1.0" targetFramework="net451" />
<package id="Microsoft.AspNet.Identity.Core" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.0.0" targetFramework="net451" />
<package id="Microsoft.AspNet.Identity.Owin" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.AspNet.Mvc" version="5.1.2" targetFramework="net451" />
<package id="Microsoft.AspNet.Razor" version="3.1.2" targetFramework="net451" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.2" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi" version="4.0.30506.0" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.1.2" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.1.2" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.HelpPage" version="5.1.2" targetFramework="net451" />
<package id="Microsoft.AspNet.WebPages" version="3.1.2" targetFramework="net451" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.1.0-rc1" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net451" />
<package id="Microsoft.Owin" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.Owin.Host.SystemWeb" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.Owin.Security" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.Owin.Security.Cookies" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.Owin.Security.Facebook" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.Owin.Security.Google" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.Owin.Security.MicrosoftAccount" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.Owin.Security.OAuth" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.Owin.Security.Twitter" version="2.1.0" targetFramework="net451" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.7.1" targetFramework="net451" />
<package id="MvcSiteMapProvider.MVC5" version="4.4.14" targetFramework="net451" />
<package id="MvcSiteMapProvider.MVC5.Core" version="4.4.14" targetFramework="net451" />
<package id="MvcSiteMapProvider.Web" version="4.4.14" targetFramework="net451" />
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net45" />
<package id="Ninject" version="3.2.2.0" targetFramework="net451" />
<package id="Ninject.MVC3" version="3.2.1.0" targetFramework="net451" />
<package id="Ninject.Web.Common" version="3.2.0.0" targetFramework="net451" />
<package id="Ninject.Web.Common.WebHost" version="3.2.0.0" targetFramework="net451" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="Postal" version="0.9.1" targetFramework="net451" />
<package id="WebActivator" version="1.2.0.0" targetFramework="net451" />
<package id="WebActivatorEx" version="2.0.4" targetFramework="net45" />
<package id="WebGrease" version="1.5.2" targetFramework="net45" />
</packages>
答案 0 :(得分:1)
嗯..我刚刚尝试安装软件包 Microsoft.AspNet.Identity.Core 和NuGet安装了v2.1.0。我必须明确指定-Version 1.0.0才能安装旧版本。
您是否尝试过明确指定所需的版本?
您安装了哪个版本的NuGet?
你有什么类型的网络项目?
您可以发布 packages.config 文件吗?
<强>更新强>
似乎是您项目的问题,而不是NuGet。卸载程序包然后查看.csproj文件以查看是否有任何剩余的跟踪。然后重新安装包。作为最后的手段,只需明确引用2.1.0程序集。