加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

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

发布时间:2020-12-14 04:15:38 所属栏目:Windows 来源:网络整理
导读:几个月前,我开始使用Mono编译的一个相对简单的C#应用??程序. 我今天尝试恢复这方面的工作,尽管有一个可执行文件证明它编译好之前,它现在抱怨System.Windows.Forms C:Program FilesMono-2.0.1binmcs ../projects/test_1/test.cs ../projects/test_1/test.c
几个月前,我开始使用Mono编译的一个相对简单的C#应用??程序.

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

C:Program FilesMono-2.0.1bin>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配置文件.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读