笔记一:树莓派4B安装mono环境运行C#程序
下面主要记录如何在树莓派上运行C#开发的winform窗体程序。
对于已经安装好Raspbian系统的树莓派,通电开机后打开命令行窗口并输入一下命令:
1.sudo apt install apt-transport-https dirmngr gnupg ca-certificates
2.sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
3.echo "deb https://download.mono-project.com/repo/debian stable-raspbianbuster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
4.sudo apt update
5.sudo apt-get install mono-complete
至此已经安装了mono运行时环境,可以运行winform程序,运行程序后发现窗体上的数字和英文出现乱码,执行下面的命令解决:
sudo apt-get install scim-pinyin
若要安装mono-develop集成开发环境,则执行下面的命令:
1.sudo apt install apt-transport-https dirmngr
2.sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
3.echo "deb https://download.mono-project.com/repo/debian vs-raspbianstretch main" | sudo tee /etc/apt/sources.list.d/mono-official-vs.list
4.sudo apt update
5.sudo apt-get install monodevelop
安装完成后的mono-develop如下图所示
mono官网主页地址:https://www.mono-project.com/
monodevelop官网主页:https://www.monodevelop.com/