I am new to dotnet platform. I have a c# app prebuilt in windows and i wanna run it in linux (Centos-7 x64) on dotnetcore (3.1) platform. I think this app can run directly on dotnetcore (linux) without doing the extra effort.
But when I run it on command line as below, I got "cannot execute binary file".
$./app.exe
Extra: i also installed mono platform for totally experimental and i use xbuild to build win-apps sln on linux platform successfully. But again i got the same error when i run app on linux.
My dotnet is:
dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.300
Commit: b2475c1295
Runtime Environment:
OS Name: centos
OS Version: 7
OS Platform: Linux
RID: centos.7-x64
Base Path: /usr/share/dotnet/sdk/3.1.300/
Host (useful for support):
Version: 3.1.4
Commit: 0090613580
.NET Core SDKs installed:
3.1.300 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Could you help me with this?
Thanks.