使用System.Windows.Forms破坏Mono C#代码

前端之家收集整理的这篇文章主要介绍了使用System.Windows.Forms破坏Mono C#代码前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
几个月前,我开始使用Mono编译的一个相对简单的C#应用​​程序.

我今天尝试恢复这方面的工作,尽管有一个可执行文件证明它编译好之前,它现在抱怨System.Windows.Forms

C:\Program Files\Mono-2.0.1\bin>mcs
../projects/test_1/test.cs
../projects/test_1/test.cs(2,14):
error CS0234: The type or namespace
name ‘Windows’ does not exist in the
namespace `System’. Are you missing an
assembly reference?
Compilation Failed: 1 error(s),0 warnings

我找到了一个有相同错误的人的论坛帖子,这是推荐的:

mcs Program.cs -r:System.Windows.Forms.dll -r:System.Drawing.dll -v2

但是,-v2参数不起作用,没有它,只有一系列其他命名空间错误(ToolStripButton和类似).

我已经下载了最新的Mono 2.2但这仍然会产生同样的错误.

我该如何解决

gmcs Program.cs -r:System.Windows.Forms.dll -r:System.Drawing.dll

gmcs使用.NET 2.0配置文件.

原文链接:https://www.f2er.com/windows/365047.html

猜你在找的Windows相关文章