Chris Post
Chris Post

Reputation: 127

Why does dotnet build on ubuntu output a dll file?

I have a very simple question. When I use donet build on a c# project in ubuntu it outputs a .dll file. I was wondering why or how it does that and why does it not output a .so file ?

Upvotes: 2

Views: 2362

Answers (2)

Lloyd
Lloyd

Reputation: 29668

Because .NET Core (and .NET as a whole) uses the Portable Executable format even for other platforms, it's still technically a dynamic link library.

The .NET Core run-time loader can read and run it fine.

You can read more here - .NET assembily file format

Upvotes: 4

Haley Mueller
Haley Mueller

Reputation: 497

.NET Core uses it's own file system that has to be ran with a specific command in order to run the application.

(It) relies on the presence of a shared system-wide version of .NET Core on the target system

To run the application you type in

dotnet {FileName}.dll

This will start running the application using the .NET Core framework.

Your app contains only its own code and any third-party dependencies that are outside of the .NET Core libraries. FDDs contain .dll files that can be launched by using the dotnet utility from the command line. For example, dotnet app.dll runs an application named app.

Source: .NET Core Application Deployment

Upvotes: 1

Related Questions