简体   繁体   中英

.net missing packages in references section that packages.config doesn't refer to

So I am trying to track down a different bug and I am looking at everything in my project that could be wrong. I'm looking at my references section, and a bunch of packages have the little yellow triangle by them:

在此处输入图片说明

However, when I look at packages.config, none of these packages are actually referred to.

<packages>
  <package id="Antlr" version="3.5.0.2" targetFramework="net451" />
  <package id="EntityFramework" version="6.1.3" targetFramework="net451" />
  <package id="jQuery" version="2.2.3" targetFramework="net451" />
  <package id="jQuery.Validation" version="1.15.0" targetFramework="net451" />
  <package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net451" />
  <package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net451" />
  <package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net451" />
  <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net451" />
  <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net451" />
  <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net451" />
  <package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net451" />
  <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net451" />
  <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net451" />
  <package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net451" />
  <package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net451" />
  <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net451" />
  <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net451" />
  <package id="Microsoft.Owin" version="3.0.1" targetFramework="net451" />
  <package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net451" />
  <package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net451" />
  <package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net451" />
  <package id="Microsoft.Owin.Security.Facebook" version="3.0.1" targetFramework="net451" />
  <package id="Microsoft.Owin.Security.Google" version="3.0.1" targetFramework="net451" />
  <package id="Microsoft.Owin.Security.MicrosoftAccount" version="3.0.1" targetFramework="net451" />
  <package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net451" />
  <package id="Microsoft.Owin.Security.Twitter" version="3.0.1" targetFramework="net451" />
  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net451" />
  <package id="Modernizr" version="2.8.3" targetFramework="net451" />
  <package id="Newtonsoft.Json" version="8.0.3" targetFramework="net451" />
  <package id="Owin" version="1.0" targetFramework="net451" />
  <package id="Respond" version="1.4.2" targetFramework="net451" />
  <package id="WebGrease" version="1.6.0" targetFramework="net451" />
</packages>

All the packages that packages.config wants are actually there. I get warning about these missing packages when I build, but it still builds fine. I think these must not be the thing that's leading to this other error (which is a MissingMethodException) because none of them keep the project from building. So the question is how can I either:

  • Get VisualStudio to take these references out of the reference section if I don't need them, or,
  • Get all the references in there if I do?

I have Visual Studio 2013.

Okay, I just went in and removed all the assemblies with warnings on them, figuring if I did need them I'd get a build error. Everything built fine. So I guess this is answered.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM