了解 .NET 框架的未来

Understanding the future of the .NET framework

我目前使用 Qt 开发桌面应用程序(简单应用程序)。我不喜欢 Qt 的一件事是,我觉得免费许可证最终会消失,我宁愿转移到一个不同的框架。另一方面,我听说 .NET 将走向开源和跨平台。

有人能解释一下这到底是什么意思吗,因为我读到只有服务器端是开源和跨平台的,但我不确定这是否只会影响 Linux 服务器。

  1. 这是否意味着我们将能够在 Visual Studio 中创建跨平台应用程序?

  2. 这是否意味着 Visual Studio 将在 Linux 和 Mac 上 运行?

非常感谢

.net 框架是跨平台的(类似于 java 的 JVM,它都是托管代码),允许您开发 运行 在 linux/mac/ios/android 上的应用程序,但是我不知道你是否能够 运行 visual studio 除了 windows 之外的任何东西(可以在你的 mac machine 并切换到它)。

虽然有适用于 .net 的跨平台 IDE,例如 Mono。如果您搜索它们,您会找到一些选项。

这是今天 5 月 1 日刚刚 post 编辑的 (VisualStudioMagazine),当我想起你的 post:

时,我想我会添加这个

"You probably never thought you would see the day when Visual Studio would run natively on a Mac. Well the newest member to the Visual Studio family, Visual Studio Code, does just that. Visual Studio Code is a lightweight code editor that has versions that will run on Windows, Mac, and Linux. But don't let the fact that it is lightweight fool you. It is packed with a ton of features like full Intellisense, color coding, and more. Even better, it's free."

12 月,我收到了一封来自 BizSpark 的电子邮件,内容与此完全相同。

http://weblogs.asp.net/scottgu/announcing-open-source-of-net-core-framework-net-core-distribution-for-linux-osx-and-free-visual-studio-community-edition

基本上,这个想法是开源 ASP.NET 运行时,以允许开发人员构建 ASP.NET 适用于所有平台的网站。

就是说,微软将把它带到哪里还不得而知。我个人的看法是他们会利用这个机会把ENTIRE.NET框架移植到Linux/OSX上,但这完全是猜想.

Today I’m excited to announce that we are going even further, and will be open sourcing the .NET Core Runtime. This will include everything needed to execute .NET code – including the CLR, Just-In-Time Compiler (JIT), Garbage Collector (GC), and core .NET base class libraries.

更重要的是:

Today’s open source announcement means that developers will have a fully supported, fully open source, fully cross platform .NET stack for creating server and cloud applications – including everything from the C#/VB compilers, to the CLR runtime, to the core .NET base class libraries, to the higher-level .NET Web, Data and API frameworks.

您应该访问 .NET 的 GitHub 页面,看看它提供了什么,因为这可能是 的第一部分.NET 跨平台:https://github.com/dotnet/

所以,回答你的问题:

  1. 程度。整个 .NET 框架 NOT 预计将被移植(主要是 System.Windows,另一个 GUI 库)。您可能 不能 能够为 Linux/OS X 开发 WPFWindows Forms 应用程序,但 能够为他们开发 ASP.NET WebForms and MVC 产品。

  2. 不可能。 Visual Studio 预计仍将是 Windows-only 应用程序。

编辑:是的,您可以继续使用 MONOWINE 基于 GUI应用程序,是的,大部分 MONOWINE 实现可以基于 的新开源。 NET 框架,但如果您期望 Visual Studio 允许您编译 Linux/Unix/OS X 本机应用程序,您可能不会在新公告。

Does this means that we will be able to create cross platform application in Visual Studio?

是的。有多种第三方用户界面框架可用于开发开源应用程序。 None 据我所知,除了 Silverlight 已弃用外,Microsoft 还提供了官方支持。

WinForms 确实在 Mono 下工作,可用于交付在 Linux 和 Mac 下工作的应用程序,但最后我尝试了,它有点错误。现在可能更好了,但如果您使用它,您将希望尽早测试并经常在多个平台上进行测试。桌面体验也感觉很陌生,尤其是在 Mac 上。此外,您仅在 Windows 的 Visual Studio 中获得设计师支持。但它确实有效。

还有 GTK# 是免费的(两种意义上)。这为应用程序提供了一种明显更原生的感觉,虽然不是 100% 完美,但相当不错。 MonoDevelop 中为它提供设计器支持,并且您可以使用外部工具设计用户界面,然后将其加载到您的应用程序中。

Xwt 是免费的,看起来很有前途并且正在积极开发中。我有一段时间没看它了。这个显然被 Xamarin Studio 和 MonoDevelop 使用,所以它可能相当强大。

Eto.Forms 是另一个看起来很有前途的免费软件,包括对移动开发的支持。根本没怎么看,最近好像也没有积极开发。

Does this means that Visual Studio will run on Linux and Mac?

没有。这似乎极不可能。 Wine 似乎制作了 some progress on some older versions of Visual Studio,但您可能无法使用任何最新版本的 Visual Studio。

使用 Mono you can create cross-platform applications, and even GUI with WinForms or Gtk#, you can develop them and compile in Visual Studio under .net (we know that mono is just a reimplementation of .net) but in Linux you will have to run them under mono. I think Mono has a good future now that Microsoft has made their new compiler open-source 将简化单一项目的开发。

我认为 visual studio 不会在 LinuxMac[=19= 中可用] 因为将它们移植到这些平台上将是一项巨大的工作。如果你只是想要一个 IDE 用于在另一个平台上开发,你可以使用 MonoDevelop 但它没有 visual studio

丰富

突发新闻: .NET 项目管理总监 Scott Hunter 刚刚发布:

All future investment in .NET will be in .NET Core. This includes: Runtime, JIT, AOT, GC, BCL (Base Class Library), C#, VB.NET, F#, ASP.NET, Entity Framework, ML.NET, WinForms, WPF and Xamarin.

https://devblogs.microsoft.com/dotnet/net-core-is-the-future-of-net/