在 Red Hat 8、x64

问题描述

我的目标是验证在 Windows 上开发的现有 .NET core 3.1 项目是否可以移植到单声道(对于只有单声道可用的 PowerPC 平台)。我刚刚安装了带有 Gnome 桌面的 RHEL 8 Linux x64(目前没有 PowertPC),在 instructions here 之后安装了 mono 6.12.0.107,然后在 steps here 之后安装了 Monodevelop 7.8.2(构建 2)的 CentOS 版本。第一次使用 monodevelop。

为了测试我的设置是否可以运行,我使用新的命令行项目创建了解决方案,代码中只有一个 Console.WriteLine("Hello")。在为项目选择目标时,我看到从 .NET Framework 2.0 到 4.8 的选择,但在任何地方都没有单声道。这个列表中应该有 Mono 吗?

enter image description here

尝试在 monodevelop 中构建它,我明白了:

/usr/lib/mono/msbuild/15.0/bin/Microsoft.CSharp.CurrentVersion.targets(331,5): error MSB4019: 
 The imported project "/usr/lib/mono/msbuild/15.0/bin/Roslyn/Microsoft.CSharp.Core.targets" 
 was not found. Confirm that the path in the <Import> declaration is correct,and that the 
 file exists on disk.

当与 xbuild 运行相同时,它工作正常,0 错误

$ xbuild mynew.sln

我也可以使用单声道执行它(带有平台不匹配警告:使用认运行时:v4.0.30319)。

所以看起来我的 monodevelop 没有正确配置,但几个小时的搜索让我更加困惑。我认为这个问题的核心是“如何在monodevelop中添加Mono作为目标”。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)