简体   繁体   English

无法在Visual Studio中添加引用

[英]Unable to add reference in Visual Studio

I have a project in VS 2017 all was working well until I update Mysql connector and hence mysql.data reference. 我在VS 2017中有一个项目一直运行良好,直到我更新Mysql连接器,因此更新mysql.data参考。

As you can see in the picture, when I open the reference dialog box, only come up the new version of the referenceand when i try to select it and save, an error arises: 正如您在图片中看到的,当我打开引用对话框时,只出现新版本的引用,当我尝试选择它并保存时,会出现错误:

在此输入图像描述

The error says: "Already exists a reference to 'MySql.Data' in the project" 错误说:“项目中已经存在对'MySql.Data'的引用”

The question is: How can I remove the older reference? 问题是:如何删除旧参考? It's not shown in the dialogbox and do not know where to find it. 它没有显示在对话框中,也不知道在哪里找到它。

Any help; 任何帮助;

You could take a look at the Solution Explorer of your project: 您可以查看项目的解决方案资源管理器:

And remove the reference by pressing delete or right click and Remove. 按删除或右键单击删除删除引用。 You can open the Solution Explorer by View -> Solution Explorer: 您可以通过View - > Solution Explorer打开Solution Explorer:

Or pressing Ctrl + W, S 或者按Ctrl + W, S

Weird! 奇怪的! I use VS 2010 and was able to add reference more than once without this error popping up. 我使用VS 2010并且能够多次添加引用而不会弹出这个错误。

The References can be found in project structure in "Solution Explorer" . 可以在“解决方案资源管理器”中的项目结构中找到参考。 Just remove the old reference and add new. 只需删除旧引用并添加新引用即可。 If you are unable to find the Solution explorer you can go to "view" tab and activate it. 如果您无法找到解决方案资源管理器,则可以转到“查看”选项卡并将其激活。

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

相关问题 无法在 Visual Studio 2015 中添加项目引用 - Unable to add project reference in Visual Studio 2015 无法在Visual Studio 2013中添加System.speech参考 - unable to add System.speech reference in visual studio 2013 无法在Visual Studio中使用WSDL添加服务引用 - Unable to add a Service Reference using a WSDL in Visual Studio Visual Studio自动添加参考 - Visual Studio add reference automatically 无法在Visual Studio 2017中引用Windows IoT - Unable to reference Windows IoT in Visual Studio 2017 无法将Microsoft.Online.Administration.Automation.PSModule dll的引用添加到Visual Studio 2010中的项目中 - Unable to add the reference of the Microsoft.Online.Administration.Automation.PSModule dll to my project in Visual Studio 2010 Visual Studio 2012如何调试“无法添加对项目x的引用”错误? - Visual Studio 2012 How to debug “Unable to add reference to project x” error? Visual Studio添加服务参考发现凭据 - Visual Studio Add Service Reference discovery credentials 在Visual Studio中递归添加项目引用 - Add project reference recursively in Visual Studio Visual Studio添加控制台应用程序作为参考 - Visual Studio Add Console App as Reference
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM