How can I use System.Windows.Forms in MonoDevelop on Ubuntu?

允我心安 提交于 2019-12-23 12:34:25

问题


I met this problem at the beginning of my work. I am using Mono 2.10 with MonoDevelop 2.8. When I create a new C# project, I can not use:

using System.Windows.Forms

because there is no such namespace here.

I searched for some answer and tried:

apt-get install libmono-system-windows-forms4.0-cil and

apt-get install libmono-winforms2.0-cil

but they all tell me I have installed them. So now I'm wondering if I can not write windows forms application with Mono but I can only run such application with it?


回答1:


Although this was answered in the comments, newbies (like me) might appreciate a more spelled-out version:

  • In monodevelop, click the gear/settings icon next to the References folder (or right-click the References folder)
  • Select 'Edit References'
  • Search for windows
  • Check System.Windows.Forms
  • Click OK


来源:https://stackoverflow.com/questions/15668986/how-can-i-use-system-windows-forms-in-monodevelop-on-ubuntu

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