centos stream 9安装mono后测试helloworld
HelloWorld.cs内容如下:
using System;
class HelloWorld {
static void Main() {
Console.WriteLine("Hello, World!");
}
}
[root@vmserv2024 ~]# mono HelloWorld.cs
Cannot open assembly 'HelloWorld.cs': File does not contain a valid CIL image.
执行以下语句后正常
[root@vmserv2024 ~]# mcs HelloWorld.cs
[root@vmserv2024 ~]# mono HelloWorld.exe
Hello, World!