Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.net core cross platform desktop app

I'd like to develop a cross platform desktop app by using .net Core. The app needs to be executed on linux, mac os, and windows. For that purpose, should i create a console app and put below lines in settings xml?

<PropertyGroup>
   <RuntimeIdentifiers>win10-x64;osx.10.12-x64;debian.8-x64</RuntimeIdentifiers>
</PropertyGroup>

Will it be sufficient? If so, should i write all platforms and separate by comma e.g.

win7-x32;win10-x64;...

If it is not the answer, how can i generate cross platform desktop app with .net Core?

like image 294
Dilara Albayrak Avatar asked Feb 23 '18 14:02

Dilara Albayrak


People also ask

Can .NET Core be used for desktop applications?

NET Core Apps end users can run locally using Chrome's leading and consistent rendering engine within a Windows Desktop Application.

Is .NET Core truly cross-platform?

NET Core is an open-source and free framework for creating cross-platform apps targeting Linux, Windows, and macOS. It can run applications on the cloud, the IoT, and devices. 4 cross-platform scenarios are supported by it; namely, command-line apps, ASP.NET Core Web apps, libraries as well as Web APIs. .

Is .NET good for desktop application?

It is used to build desktop apps for Windows and large-scale apps for enterprises. Apps built with . NET framework has good networking, memory management, security, APIs, and application deployment.

Is .NET Core being discontinued?

Note: The . NET 5.0 SDK versions will continue to be supported in VS 16.11 until December of 2022 when . NET Core 3.1 goes out of support so that . NET Core 3.1 customers can continue to use 16.11 to developer their applications.


2 Answers

1) Console apps in .NET core are already cross-platform.

2) For those working with a GUI, .NET core finally has a cross-platform GUI option officially supported by Microsoft called .NET MAUI

This builds on the same APIs as Xamarian Forms.

Official .NET MAUI Github Repo

like image 183
Zachary Canann Avatar answered Nov 15 '22 20:11

Zachary Canann


As the other answer eludes to, .NET Core itself is cross-platform, but it doesn't offer any GUI solution. You can run console/terminal applications, as well as web applications, but not desktop applications.

As of right now, there is no official Microsoft tech that solves a multi-platform GUI. The two that I know of are Avalonia and Eto.Forms. Both have their pros and cons, and both are kinda buggy. Not in the sense that it's unusable, but in the sense that it's evolving tech, don't expect them to blow your mind right off the bat.

Guides to get you started :

  • Avalonia - http://avaloniaui.net/guides/quickstart
  • Eto.Forms - https://dotnetcoretutorials.com/2018/03/19/cross-platform-winforms-kinda/
like image 44
MindingData Avatar answered Nov 15 '22 22:11

MindingData