简体   繁体   English

.net缺少packages.config未引用的引用部分中的软件包

[英].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.config时,实际上没有提到这些软件包。

<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. 实际上,packages.config所需的所有软件包都在那里。 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. 认为这些一定不是导致其他错误的原因(这是MissingMethodException),因为它们都不会使项目无法构建。 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, 如果不需要,请获取VisualStudio以将这些参考从参考部分中删除,或者,
  • Get all the references in there if I do? 如果可以的话,在那里获取所有参考资料?

I have Visual Studio 2013. 我有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. 所以我想这是答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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