我无法安装monodevelop,我正在从终端运行它-- sudo apt-get install monodevelop,但出现错误: unable to locate package monodevelop如何在linux上安装monodevelop
有没有从ubuntu软件中心安装的方法?
发布于 2019-04-09 00:50:59
sudo apt install apt-transport-https dirmngrsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EFecho "deb https://download.mono-project.com/repo/ubuntu vs-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-vs.listsudo apt update确保完整地复制此命令,在步骤3中确保复制所有命令
发布于 2014-07-26 02:53:55
你绝对应该使用Git repo安装Monodevelop。这里有正确的说明here
发布于 2020-05-03 14:04:05
完成上述操作后:使用第一个答案解决monodevelop的问题,然后使用此答案安装MCS。
如果您遇到任何问题,请尝试运行以下命令
sudo apt-get -f install
现在,安装mcs实用程序,它可以将你的C#编译成exe文件。
sudo apt-get install mcs
创建一个c#文件。例如(这是c#文件的命名方式):"newfile.cs“
示例代码
//This is a c# program that prints out "Hello World"
using System;
using System.IO;
using System.Text;
namespace IncludeHelp
{
class Test
{
static void Main(string[] args)
{
//This is line will print out "Hello World"
Console.WriteLine("Hello World");
//This let's us exit the porgram when you press enter
Console.ReadLine();
}
}
}将文件另存为"newfile.cs“
打开终端并输入mcs newfile.cs
这将编译该文件并将其转换为.exe文件
现在在终端中键入以下mono newfile.cs
祝好运!
https://stackoverflow.com/questions/24837816
复制相似问题