使用VS2013 Update 4(更新是最近的)
尝试通过NuGet添加Ninject.MVC5时,会出现以下错误消息:无法添加对Microsoft.Web.Infrastructure'的引用。请确保它在全局程序集缓存中。
从NuGet命令行添加时会返回此错误:
PM> install-package ninject.mvc5 version 3.2.0.0
Install-Package : No compatible project(s) found in the active solution.
At line:1 char:16
+ install-package <<<< ninject.mvc5 version 3.2.0.0
+ CategoryInfo : InvalidOperation: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetNoCompatibleProjects,NuGet.PowerShell.Commands.InstallPackageCommand
我已经浏览过几十篇关于微软.Web.Infrastructure&#39;的问题。但他们都没有解决这个问题。我已删除对它的引用并再次添加它仍然没有去。它也设置为复制本地。
这是我的packages.config的副本 - 这是一个默认的MVC5项目,添加了NOTHING但是包。
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.5.0.2" targetFramework="net45" />
<package id="bootstrap" version="3.3.0" targetFramework="net45" />
<package id="Bootstrap.v3.Datetimepicker.CSS" version="3.1.3" targetFramework="net45" />
<package id="elmah.corelibrary" version="1.2.1" targetFramework="net45" />
<package id="Elmah.MVC" version="2.1.1" targetFramework="net45" />
<package id="EntityFramework" version="6.1.1" targetFramework="net45" />
<package id="jQuery" version="2.1.1" targetFramework="net45" />
<package id="jQuery.Fullcalendar" version="1.6.4" targetFramework="net45" />
<package id="jQuery.UI.Combined" version="1.11.2" targetFramework="net45" />
<package id="jQuery.Validation" version="1.13.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="5.2.2" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.2.2" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi" version="5.2.2" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.2" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.2" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.2" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="3.2.2" targetFramework="net45" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.2" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.8.3" targetFramework="net45" />
<package id="Moment.js" version="2.8.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net45" />
<package id="Ninject" version="3.2.0.0" targetFramework="net45" />
<package id="Ninject.Web.Common" version="3.2.0.0" targetFramework="net45" />
<package id="Respond" version="1.4.2" targetFramework="net45" />
<package id="Twitter.Bootstrap.Bootswatch.Cerulean" version="3.2.0.0" targetFramework="net45" />
<package id="WebActivatorEx" version="2.0" targetFramework="net45" />
<package id="WebGrease" version="1.6.0" targetFramework="net45" />
</packages>
处理此问题的其他人?