2

I created a C# project using MonoDevelop (Xamarin) on my Mac. From what I've read, it seems that Windows should be able to run the .exe if it has .Net installed. However, no such luck. Any pointers on getting this .exe to run in Windows?

Thanks

Walrus the Cat
  • 2,314
  • 5
  • 35
  • 64
  • 2
    I believe you still need to recompile the executable in Windows. The cross-platform compatibility means that your .NET calls will work against the .NET libraries in both operating systems, but that doesn't mean that the executable file format is the same. You won't simply be able to copy the executable from one operating system and get it to work on another. – itsme86 Jan 02 '14 at 21:07
  • That'd be a lot easier than starting the project over. Can you give me some command line (or a GUI-driven step-by-step) to make this happen? – Walrus the Cat Jan 02 '14 at 21:10
  • @WalrustheCat: `no such luck` is not enough clear way to describe how it doesn't work, do you see any error message? please post it. I'm downvoting your question until you improve it. – knocte Jan 03 '14 at 13:03
  • possible duplicate of [How to compile windows binary on OSX](http://stackoverflow.com/questions/20876143/how-to-compile-windows-binary-on-osx) – Ashley Medway Jan 07 '14 at 00:12
  • I think @itsme86 is on the right track here. Ashley Medway claims that it "just works" for her (which answer was helpfully given by Walrus the Cat, and then helpfully deleted by Bill the Lizard), but it doesn't "just work" for Walrus the Cat. Additionally, when I tried to just open the project in VS in Windows and recompile, I got in trouble for using the GTK libraries, and basically had to re-do the project. That could be a reason things didn't work. – Walrus the Cat Jan 07 '14 at 23:52

2 Answers2

0

From monodevelop, with the project open, click Project, then settings. Under the build flag, click general. Change the target framework to .NET 4.0 Client Profile. Make sure mono is installed on windows.

http://www.go-mono.com/mono-downloads/download.html

0

Install Visual C++ 2013 redistributable package x86 and gtk# for .net. See here.

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135