Developing C# on Linux

Developing C# on Linux

MonoDevelop, the IDE associated with Mono Project should be enough for C# development on Linux. Now I don't know any good profilers and other tools for C# development on Linux. But then again mind you, that C# is a language more native to windows. You are better developing C# apps for windows than for linux.

EDIT: When you download MonoDevelop from the Ubuntu Software Center, it will contain pretty much everything you need to get started right away (Compiler, Runtime Environment, IDE). If you would like more information, see the following links:

  • http://monodevelop.com/
  • http://en.wikipedia.org/wiki/MonoDevelop
  • http://en.wikipedia.org/wiki/Mono_%28software%29
  • http://www.mono-project.com/Development_Environments

C # application for linux?

When you look for writing c# code on linux you will probably run into http://www.mono-project.com/.

This is what you find on Mono's page :
"Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime. A growing family of solutions and an active and enthusiastic contributing community is helping position Mono to become the leading choice for development of cross platform applications."

Both Mono and .NET Core support GNU/Linux systems like Ubuntu.

.NET Core is available on different Linux distributions. You will learn more about it on Microsoft's documentation site:
https://docs.microsoft.com/en-us/dotnet/core/install/linux

Editors like Gedit Vim have syntax for C#.
MonoDevelop and Visual Studio Code are two environments which run on Ubuntu and support C# development.

Additionally I recommend this site , if you want to learn more about developing apps for Linux:
https://teckangaroo.com/c-sharp-linux/

IDE's for C# development on Linux?

MonoDevelop 2.0 has been released, it now has a decent GUI Debugger, code completion, Intellisense C# 3.0 support (including linq), and a decent GTK# Visual Designer.

In short, since the 2.0 release I have started using Mono Develop again and am very happy with it so far.

Check out the MonoDevelop website for more info.

Can any c# application be run on linux

Update for 2020

.NET Core and .NET Framework are being merged together into ".NET 5". For all intents and purposes, this is just the next version of .NET Core (and .NET Framework is going away).

WPF still only runs on windows (though a universal XAML based UI system is in development), even though its running on .NET Core/5, and you still have to build specifically for Linux for supported project types, but the cross platform support is much better than when I originally wrote this.

Original

For .NET code to be able to run on Linux, you need a version of .NET that is compatible with that platform.

Full .NET is windows-only, but there is the Mono framework which runs on Linux. .NET Core is also being ported to linux.

Neither Mono or .NET Core supports the entirety of standard .NET. For example, neither will let you run a WPF application. So as long as your code is compatible with one of the aforementioned frameworks; yes, you can run it on Linux.

For your specific example, the classes you mention should be supported, and I don't think you'll have any trouble running under either Mono or .NET Core.

which platform for porting C# application to Linux?

Simple: use C# and
Mono.

Mono is a port of the .Net Framework and works great under Linux.
I tested it on a Raspberry with Debian.

How to compile .NET Core app for Linux on a Windows machine

Using dotnet build command, you may specify --runtime flag

-r|--runtime < RUNTIME_IDENTIFIER >

Target runtime to build for. For a list of Runtime Identifiers (RIDs) you can use, see the RID catalog.

RIDs that represent concrete operating systems usually follow this pattern [os].[version]-[arch]

Fo example, to build a project and its dependencies for Ubuntu 16.04 runtime use:

dotnet build --runtime ubuntu.16.04-x64


Related Topics



Leave a reply



Submit