运行
dotnet run
第一次pusblish需要连nuget下载包,可能需要翻墙
编译成win10 standalone发布,测试win7x64工作站可运行,版本.netcore6
dotnet publish -c Release -r win10-x64 –self-contained true
编译成linux版本,需要测试
dotnet publish -c Release -r linux-x64 –self-contained true
dotnet publish -c Release -r linux-arm –self-contained true
dotnet publish -c Release -r linux-arm64 –self-contained true
linux-x64树莓派4运行成功
编译成独立文件版本,供别的程序调用
dotnet publish -c Release -r linux-x64 –self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true

nuget添加源
dotnet nuget locals all –clear
dotnet nuget list source
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org