Hello,

I have a application created in windows using c# language. Now my client wants to run the executable file on the centOS server. Do you have idea on how to run my executable file into centOS server?..please help me. I appriciate some suggestion.

Regards!

Your best bet is to try running Mono on the machine and hope for the best. However, there's a fairly strong likelihood that your code uses .NETisms not available in Mono and will require modification to port it.

/Agree

Your best option is to re-write and re-compile using the C++ language and gcc compiler for Linux.

Mono might just work, so it's worth a try, but don't hold your breath.

Ensure your client understands that there will be porting work involved as you're switching operating systems. Make sure you give realistic time-scales and set expectations appropriately. The worst thing you can do is lie to your client.

It does you no favours and gives all developers a bit of a bad rep. Having a client that expects you to lie and deceive them is especially frustrating!

As you're going to effectively be re-developing your application, you should be able to charge them again for it (at a reduced rate obviously). But this depends on your initial contract that you signed.

If you can't program in C++ or for Linux, then unfortunately I don't think there is much that can be done to help.

Hi Ketsuekiame/deceptikon,

Thanks for your response guys. I googled it everything but I ain't got the exactly what to do.Based on http://www.go-mono.com/mono-downloads/download.html what platform I used to run into centOS?. I already used the mono windows platform and I tried to open my solution from VS2010 to monoDevelop IDE. http://monodevelop.com/ said that "MonoDevelop makes it easy for developers to port .NET applications created with Visual Studio to Linux and to maintain a single code base for all platforms." is have a configuration in monoDevelop IDE so that the executable file will run into centOS server?..pls. guide me and send me a link.

Regards!

is have a configuration in monoDevelop IDE so that the executable file will run into centOS server?

You don't need the IDE to run an executable, you only need to install the virtual machine. Just like on Windows where you'd simply install the .NET packages and don't need Visual Studio.

I really can't help you much more than that as I'm neither familiar with Mono nor CentOS.

1) Install mono on your Linux system
2) copy you program .exe (for instance myProgram.exe) and associated dll from Visual udio onto the Linux.
3) In Linux type the command :
mono myProgram.exe
4) See ... what happens.

1) Install mono on your Linux system
2) copy you program .exe (for instance myProgram.exe) and associated dll from Visual udio onto the Linux.
3) In Linux type the command :
mono myProgram.exe
4) See ... what happens.

And good luck! Yes, mono provides a .NET VM for Linux, but much stuff won't work because they assume a Windows environment. As suggested, either use C++, or optionally recode in Java if you really need something that will work well on both Windows and Linux. I'd recommend Java for such cross-platform stuff - I have written a LOT of cross-platform C++ code for Linux/Unix/Windows that had to behave identically on all such systems, and it is not trivial to do. Java is a lot easier to accomplish that.

Thank you guys for your helpful suggestion. It comes to my mind that I'd rather use some virtual machine like virtualbox for Linux and then install the the windows os and .net packages. I think that is the best solution to run the executable file in c#. What do you think?..

Regards!

It comes to my mind that I'd rather use some virtual machine like virtualbox for Linux and then install the the windows os and .net packages. I think that is the best solution to run the executable file in c#. What do you think?..

That doesn't strike me as something your client will go for, since the requirement was to run your program on CentOS. You could bring it up as an option, certainly, but don't be surprised if they poo-poo the idea.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.