本文介绍了如何用C#.NET程序,在Linux /酒/单声道运行它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这种特殊情况下,我需要运行.complicated .NET应用程序用于Linux 通过复杂的我是说 - 这项目是3年开发的,我不希望在Java写一遍,或别的东西,开发及更高版本支持,.NET和Java版本。

应用程序正在生成鼠标和键盘事件(由WINAPI / DLL导入),并使用串行端口。我也有几个计时器延迟 - 串口通信(10-20ms,我不需要大$ P $这里pcision)

其余的就是很多简单的code,没有什么特别的,没有奇怪的控制,没有任何的DirectX等。

我应该期待什么?将这项工作?

如果code某些部分会失败 - 我可以改变它一点点,在Linux上,我可以写发送鼠标和键盘事件,或RS232通讯.NET应用程序和小应用程序之间的网络连接

另外,我想请教一下葡萄酒和.NET一般:

如何编写应该运行在Linux /酒/单声道?

.NET应用程序
  • 在该框架的版本? (1.x的,2.0或者我可以使用3.5?)
  • 我应该避免(在Windows DLL的进口?定时器?)
从评论

修改/移动:

我看到单数年前,但它是可怕的。现在我看到它growed起来,支持LINQ,线程和其他复杂的功能。此外,现在的帮助看起来真的很严重。我不是在接受答案了,因为我看到人们仍然张贴非常有用的链接。如果这个问题得到很多+1我将改写它,也许这将帮助别人。

我希望有人在这里有.NET在Linux上这里的一些实际经验......

解决方案

你有没有了解Mono.NET在 HTTP://www.mono -project.com

它可以让你写的.NET应用程序在Linux拥有微软实现的微小差别。我不认为将酒应付任何.NET组件。

刚刚看了面前的文件,你一展身手。

PS:这个也给你单声道和.NET之间的兼容性列表。 http://www.mono-project.com/Compatibility 和的是,将扫描已经创建如果兼容,看看在Linux上部署任何.NET应用程序的工具。

In this particular case I need to run .complicated NET application for Linux. By complicated i mean - that project was developed for 3 years and i don't want to write it again in java or something else and develop and support both, .NET and Java version later.

Application is generating mouse and keyboard events (by winapi/dll import) and uses serial port. I have also few timers for delays - for serial port communication (10-20ms, i dont need big precision here).

The rest is just a lot of simple code, nothing special, no weird controls, no directx etc.

What should i expect? Will this work?

If some part of code will fail - i can change it a little, make network connection between .net app and mini-application on linux that i can write for sending mouse and keyboard events, or RS232 communication.

Additionally i want to ask about Wine and .NET in general:

How to write .NET applications that should run on Linux/Wine/Mono?

  • which version of framework? (1.x, 2.0 or can i use 3.5?)
  • what should i avoid (imports from windows dll? timers?)

Edit/moved from comment:

I saw mono few years ago, but it was terrible. Now i see it growed up, supports LINQ, Threading and other complicated features. In addition now help looks really serious. Im not accepting answer yet, because i see that people still posting very useful links. If this question gets many +1 i will rewrite it and maybe this will help others.

I hope someone here have some practical experience with .NET on linux here...

解决方案

Have you read about Mono.NET on http://www.mono-project.com?

It allows you to write .NET apps for Linux with minor differences over the Microsoft implementation.I don't think wine will cope with any of the .NET components.

Just read the documentation before and you have a go.

PS: This also gives you the compatibility list between mono and .NET. http://www.mono-project.com/Compatibility and MoMA(mono migration analyzer) is a tool that will scan any .NET app already created to see if its compatible to deploy on linux.

这篇关于如何用C#.NET程序,在Linux /酒/单声道运行它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 07:12