The development software used here is visual studio 2022 community edition
C# compiles linux executable program under visual studio 2022
Open the Solution Explorer, right-click the project, and select Publish
On the release page, click inside the red box to modify:
Select runtime: select linux-x64
(The target framework selects the previously installed dotnet version) Install and run the C# (dotnet) program environment under linux
Click Publish to create an executable program under linux. After the executable file is placed on linux, remember to add permissions
chmod 755 XXX