.net core 跨平台桌面应用 [英] .net core cross platform desktop app

查看:102
本文介绍了.net core 跨平台桌面应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 .net Core 开发跨平台桌面应用程序.该应用程序需要在 linux、mac os 和 windows 上执行.为此,我应该创建一个控制台应用程序并将以下几行放在设置 xml 中吗?

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;...

win7-x32;win10-x64;...

如果这不是答案,我如何使用 .net Core 生成跨平台桌面应用程序?

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

推荐答案

另一个答案是,.NET Core 本身是跨平台的,但它不提供任何 GUI 解决方案.您可以运行控制台/终端应用程序以及 Web 应用程序,但不能运行桌面应用程序.

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.

截至目前,没有解决多平台 GUI 的官方 Microsoft 技术.我所知道的两个是 AvaloniaEto.Forms.两者都有其优点和缺点,而且都有些马车.不是说它无法使用,而是说它是不断发展的技术,不要指望它们会立即让您大吃一惊.

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 pro's 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 bad.

入门指南:

这篇关于.net core 跨平台桌面应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆