简体   繁体   English

在ubuntu上编译VS2010 c#解决方案(项目)

[英]Compile VS2010 c# solution (project) on ubuntu

What's the best way to build ac# solution made with Visual Studio on Ubuntu? 在Ubuntu上使用Visual Studio构建ac#解决方案的最佳方法是什么? Is there a way to convert the .sln file to a makefile? 有没有办法将.sln文件转换为makefile? Should I use Mono? 我应该使用Mono吗?

The first thing I would do would be to use Moma to check to see if your program will run under Mono as is. 我要做的第一件事就是使用Moma检查你的程序是否会按原样在Mono下运行。 You can also use MonoDevelop which can use Visual Studio Projects. 您还可以使用可以使用Visual Studio项目的MonoDevelop

From their faq: In fact, since MonoDevelop 2.0 the default project format has been VS2008-style MSBuild projects, but VS2005 and VS2010 formats are also handled. 从他们的常见问题解答: 事实上,由于MonoDevelop 2.0的默认项目格式已经是VS2008风格的MSBuild项目,但VS2005和VS2010格式也在处理中。

C# is a .NET language, .NET is a Windows-based framework. C#是.NET语言,.NET是基于Windows的框架。 It has been ported to Linux operating systems (Ubuntu included) via the Mono Project . 它已通过Mono Project移植到Linux操作系统(包括Ubuntu)。 So yes, you need to use Mono. 所以是的,你需要使用Mono。

Mono is the best I've tried. 单声道是我尝试过的最好的。 It says on their homepage that they are binary compatible between each other, so if it's already built, you could just run it on Mono. 它在他们的主页上说它们彼此之间是二进制兼容的,所以如果它已经构建,你可以在Mono上运行它。 No need to recompile. 无需重新编译。

Your best bet is to use Mono if you want to use a process like MsBuild. 如果你想使用像MsBuild这样的过程,最好的办法是使用Mono。 Mono has xBuild that is similar. Mono有类似的xBuild。 This SO question has some information about using Mono. 这个SO问题有一些关于使用Mono的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM