0

This answer is no longer up to date.

I built a C# application using .NET core and it runs on Linux.

My question is, what libraries or existing frameworks (such as .NET core) are required to run this application on Linux or can I somehow distribute my application to multiple platforms and have it "just work".

The app I created, called ConsoleApp1 shows the following directory structure:

enter image description here

But I am not sure what is required to allow the binary application to work.

Does some sort of runtime need to be installed?

Startec
  • 12,496
  • 23
  • 93
  • 160
  • 1
    _"I built a C# application **using .NET core** and **it runs on Linux**. My question is, what libraries or existing frameworks (such as .NET core) are required "_ - What do you mean? Surely you have already answered this question yourself? –  Jun 17 '20 at 23:07
  • 1
    Yes, you can install the runtime on a per-box basis.. or see [this page](https://learn.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained). It talks about other publishing options ***to include having the runtime embedded with your package***. I have never used this method so there might be something I am missing. I am sure one of the people on this site will tell me if am wrong (they always do). 8^P – Señor CMasMas Jun 17 '20 at 23:14

1 Answers1

0

It depends on the Distro, and what type of c# app your building, because it probably will only work with command line apps. If, as you mention work with core, i recommend you wait for .net 5. Because it will integrate all of Microsoft's Frameworks (.net framework, .net core, mono) into one, right now the most complete one is .net framework and because it's really integrated with windows, many parts will not work with other platforms. Meanwhile, consider the Uno Platform, or as i mention wait for .net 5 which will launch November this year.

.Net 5: https://devblogs.microsoft.com/dotnet/introducing-net-5/

Uno Platform: Part 1: https://www.youtube.com/watch?v=fyo2BI4rn0g&t=555s

Part 2: https://www.youtube.com/watch?v=QQJcMsmgXuI

  • _"it probably will only work with command line apps"_ - .NET Core has had cross-platform ASP.NET websites and console apps for sometime now. In addition, later versions introduced WinForms, WPF and mobile apps. Also Mono is not Microsoft's –  Jun 18 '20 at 05:24