title: How to write programs in C# .NET, to run them on Linux/Wine/Mono?
body: <p><strong>In this particular case I need to run .complicated NET application for Linux.</strong> 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.</p>
  
  <p>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).</p>
  
  <p>The rest is just a lot of simple code, nothing special, no weird controls, no directx etc.</p>
  
  <p>What should i expect? Will this work?</p>
  
  <p>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.</p>
  
  <p><strong>Additionally i want to ask about Wine and .NET in general:</strong></p>
  
  <p>How to write .NET applications that should run on Linux/Wine/Mono?</p>
  
  <ul>
  <li>which version of framework? (1.x, 2.0 or can i use 3.5?)</li>
  <li>what should i avoid (imports from windows dll? timers?)</li>
  </ul>
  
  <p><strong>Edit/moved from comment:</strong></p>
  
  <p>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.</p>
  
  <p>I hope someone here have some practical experience with .NET on linux here...</p>