简体   繁体   中英

How to I run a file on ubuntu which i compiled with Visual Studio on Windows for Linux

I compiled a C# project in VS2022 with this settings:

编译器设置

It produced a file without a file extension.

How to I run in from linux?

You could flag your file as executable:

cd you_vs_code_foler/bin/Release/net6.0/publish/linux-x64

chmod +x your_programm

./your_programm

If you need to install .NET runtime at Ubuntu: try this:

sudo apt-get install -y dotnet-runtime-6.0

For further information and for other distrubtions please consult: https://docs.microsoft.com/en-us/dotnet/core/install/linux

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM