简体   繁体   English

警告:找不到引用的组件“NuGet.Core”

[英]Warning : The referenced component 'NuGet.Core' could not be found

I am working on a developed desktop application in Visual Studio 2010. Till yesterday everything was fine but from today as soon as I open the project in Visual Studio it is giving me warning,"The referenced component 'NuGet.Core' could not be found". 我正在Visual Studio 2010中开发一个开发的桌面应用程序。直到昨天一切都很好,但从今天开始我在Visual Studio中打开项目时它就会发出警告,“引用的组件'NuGet.Core'找不到”。 I searched in Solution Explorer and found that in the Project-> References, NuGet.Core with an exclamation mark. 我在解决方案资源管理器中搜索,发现在Project-> References中,带有感叹号的NuGet.Core。 Is something got deleted or corrupted I don't know. 是什么东西被删除或损坏我不知道。 Please Help!! 请帮忙!! I am not able to find the reason behind this. 我无法找到背后的原因。 Searched for the solution but no success. 搜索解决方案但没有成功。 Image:This is what I got while searching in Solution Explorer 图片:这是我在解决方案资源管理器中搜索时得到的

The exclamation mark means that the project has lost the location of the reference, but it knows it should be there. 感叹号表示项目已丢失引用的位置,但它知道它应该在那里。 If you manually delete the reference (right click on the component and then select delete) and then re add it (project -> add reference -> then find the file location [you should not need to re add it using Nuget]) to you project it should get your project working again. 如果您手动删除引用(右键单击组件然后选择删除),然后重新添加它(项目 - >添加引用 - >然后找到文件位置[您不需要使用Nuget重新添加])给你项目它应该让你的项目再次运作。

With regard to why this is happening, something may have changed somewhere that caused VS to lose the reference. 关于为什么会发生这种情况,某些事情可能已经改变,导致VS失去参考。 This could be the location of the reference, or source control, or something else. 这可以是引用或源代码控制或其他内容的位置。 Often I am unable to find the reason for this. 我经常无法找到原因。

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

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