How to add reference to assembly in visual studio mac?

情到浓时终转凉″ 提交于 2019-11-28 08:02:29

问题


I am sorry. I am newbie in C#. I use Visual Studio Mac. I want to try to connect mysql database. I have added mysql package. When I run, I get error. The error is :

adding a reference to assembly ‘System.Data, Version-4.0.0.0, Culture=neutral, PublicKeyToken


回答1:


My solution in Visual Studio for Mac 7.3 Preview was to right click on the "Dependencies" node for the project and click "Edit References..."




回答2:


  1. In Solution Explorer, right click (two finger tap on mousepad for Mac) the 'Dependancies' folder under the Project (current project where you are seeing this error).

  2. Click 'Edit References'

  3. Select (list defaults to All available) Select (tick) the Project you need to reference that is holding 'System.Data'.

  4. Click OK.

This will create a link between these two projects and therefore a reference/dependency is created.




回答3:


The solution is :

  1. Double click folder 'References' in your project
  2. If you have error like me, you type 'System.Data' and click checkbox then click button



回答4:


In VS editor, right click on red-underlined error (two finger click on mouse-pad for Mac). The first option in context menu should be "Quick Fix >". From there you can select how you want to fix the reference, either add a using statement or fully qualify inline.



来源:https://stackoverflow.com/questions/41789971/how-to-add-reference-to-assembly-in-visual-studio-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!