VSCode安装插件

  1. C#
  2. c# Dev Kit

安装Mac版本 .net

.net下载地址

查看安装结果

dotnet --list-sdks
dotnet --info

配置环境变量

open -e ~/.bash_profile

添加如下内容

export DOTNET_ROOT=/usr/local/share/dotnet
export PATH=$PATH:$DOTNET_ROOT

终端重新加载配置文件

source ~/.bash_profile

重启系统生效

创建工程

dotnet new console --framework net6.0 --use-program-main

运行

dotnet run

Nuget包管理

1、安装vscode插件【Visual NuGet】
2、vscode中在.csproj文件上右键,点击菜单Visual NuGet:Manage Packages,之后就可以像vs中一样使用Nuget管理包。

Logo

一站式 AI 云服务平台

更多推荐