【Linux】在Ubuntu下开发.Net Framework桌面应用

 

一、搭建环境

1、VMware安装Ubuntu图文教程

https://www.bilibili.com/read/cv25918406/

 

2、安装NET SDK(搭建.NET Core环境)

终端执行:

wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh --channel 6.0

设置环境变量

export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools

查询已安装版本:

dotnet --list-sdks

参考:

Ubuntu 上的 .NET 概述:
https://learn.microsoft.com/zh-cn/dotnet/core/install/linux-ubuntu

在Ubuntu上安装.NET SDK或.NET运行时:
https://learn.microsoft.com/zh-cn/dotnet/core/install/linux-ubuntu-install?pivots=os-linux-ubuntu-1604&tabs=dotnet8

 

3、Ubuntu 20.04安装Mono

sudo apt install ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update

 

sudo apt install mono-devel

 

其他Ubuntu版本安装Mono参考:

https://www.mono-project.com/download/stable/#download-lin-ubuntu

 

二、实例教程(记录)

Ubuntu22.04 Mono C# gtk 编程

基于Mono在Ubuntu下开发.Net Framework桌面应用:
https://www.cnblogs.com/taylorshi/p/16491888.html

 

posted @ 2024-07-02 14:39  不溯流光  阅读(176)  评论(0编辑  收藏  举报