在 Linux 上开发 C#
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11203171/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Developing C# on Linux
提问by davioooh
I'd like to know if there are effective and open source tools to develop C# applications on Linux (Ubuntu). In particular, I have to develop WinForm applications.
我想知道是否有有效的开源工具可以在 Linux (Ubuntu) 上开发 C# 应用程序。特别是,我必须开发 WinForm 应用程序。
I know about Mono project, but I've never used it. Can you suggest me what are the best tools (IDE, compiler, etc.) to set up a .NET developing environment on Ubuntu?
我知道Mono 项目,但我从未使用过它。您能否建议我在 Ubuntu 上设置 .NET 开发环境的最佳工具(IDE、编译器等)是什么?
Is it software developed on Linux runnable on Windows? Are there different behaviors or incompatibilities?
在 Linux 上开发的软件可以在 Windows 上运行吗?是否存在不同的行为或不兼容?
采纳答案by NlightNFotis
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.
MonoDevelop,与 Mono Project 相关的 IDE 应该足以在 Linux 上进行 C# 开发。现在我不知道在 Linux 上进行 C# 开发的任何好的分析器和其他工具。但请再次提醒您,C# 是一种更适合 Windows 的语言。为 Windows 开发 C# 应用程序比为 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:
编辑:当您从 Ubuntu 软件中心下载 MonoDevelop 时,它将包含您立即开始所需的几乎所有内容(编译器、运行时环境、IDE)。如果您想了解更多信息,请参阅以下链接:
回答by Chris Diver
Mono Develop is what you want, if you have used visual studio you should find it simple enough to get started.
Mono Develop 正是您想要的,如果您使用过 Visual Studio,您应该会发现它很容易上手。
If I recall correctly you should be able to install with sudo apt-get install monodevelop
如果我没记错的话,你应该可以安装 sudo apt-get install monodevelop
回答by O. R. Mapper
Monois a runtime environment that can run .NET applications and that works on both Windows and Linux. It includes a C# compiler.
Mono是一个运行时环境,可以运行 .NET 应用程序并且可以在 Windows 和 Linux 上运行。它包括一个 C# 编译器。
As an IDE, you could use MonoDevelop, and I suppose there's something available for Eclipse, too.
作为 IDE,您可以使用MonoDevelop,我想也有一些可用于 Eclipse 的东西。
Note that WinForms support on Mono is there, but somewhat lacking. Generally, Mono developers seem to prefer different GUI toolkits such as Gtk#.
请注意,WinForms 对 Mono 的支持是存在的,但有些缺乏。通常,Mono 开发人员似乎更喜欢不同的 GUI 工具包,例如 Gtk#。
回答by Jean Hominal
I would suggest using MonoDevelop.
我建议使用 MonoDevelop。
It is pretty much explicitly designed for use with Mono, and all set up to develop in C#.
它几乎是专为与 Mono 一起使用而设计的,并且全部设置为在 C# 中进行开发。
The simplest way to install it on Ubuntu would be to install the monodevelop package in Ubuntu. (link on Monoon ubuntu.com) (However, if you want to install a more recent version, I am not sure which PPA would be appropriate)
在 Ubuntu 上安装它的最简单方法是在 Ubuntu 中安装 monodevelop 包。(ubuntu.com上 Mono上的链接)(但是,如果您想安装更新的版本,我不确定哪种 PPA 合适)
However, I would not recommend developing with the WinForms toolkit - I do not expect it to have the same behavior in Windows and Mono (the implementations are pretty different). For an overview of the UI toolkits that work with Mono, you can go to the information page on Mono-project.
但是,我不建议使用 WinForms 工具包进行开发 - 我不希望它在 Windows 和 Mono 中具有相同的行为(实现非常不同)。有关使用 Mono 的 UI 工具包的概述,您可以转到Mono-project 上的信息页面。
回答by Henry H.
Now microsoft is migrating to open-source, https://github.com/dotnet/corefxenjoy!
现在微软正在迁移到开源, https://github.com/dotnet/corefx尽情享受吧!