Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can .NET Core be used to build native Linux binaries?

Apologies if the question seems basic, but I did some Googling and couldn't find a clear answer (Perhaps I don't know the right keywords).

Can .NET Core be used to build native command-line Linux binaries from C# / F# sources? (I'm aware of Mono)

like image 576
MWB Avatar asked Jul 26 '19 06:07

MWB


People also ask

Is there a working CI to publish native Windows and Linux binaries?

We now have a working CI to publish native Windows and Linux .NET Core 3.0 binaries to Github. You can find the full code and pipeline in the CCGetter GitHub repository.

What is NET Core in Ubuntu?

.NET Core is an opensource, multiplatform version the .NET Framework which is officially supported and maintained by Microsoft. This post will give an overview of how to run a .NET Core web project in Ubuntu, starting with its basic architecture and ending in the configuration of Kestrel for creating a web application.

What is DotNet build in Linux?

dotnet build - Builds a project and all of its dependencies. The dotnet build command builds the project and its dependencies into a set of binaries. The binaries include the project's code in Intermediate Language (IL) files with a .dll extension. Depending on the project type and settings, other files may be included, such as:

Is there a DotNet native build for RTM?

1 2 .NET Native is in the roadmap beyond RTM. They recently moved the CLI (dotnet.exe) tooling for native from the CLI project to the .NET Native project (github.com/dotnet/corert) ... no idea how the build is there currently. – Thomas May 18 '16 at 21:25


1 Answers

Yeah, it can. I've messed with it a bit.

dotnet new console

...

dotnet publish -c release -r linux-x64

Or something along those lines... It's been a while since I messed with it, but there is help and tutorials out there for doing dotnet on Linux and I've gotten it to work just fine on CentOS 7. Of course, I did this on a Linux machine and not from a Windows machine. If your asking if you can create a console (command-line) app on Windows for Linux with .NET Core, I don't know.

like image 170
J T Avatar answered Oct 11 '22 02:10

J T