1,105,409 Community Members

How to run executable file in windows using c# into centOS

Member Avatar
notconfirmed
Newbie Poster
14 posts since Apr 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

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!

Member Avatar
deceptikon
Eternally Awesome
4,695 posts since Jan 2012
Reputation Points: 1,341 [?]
Q&As Helped to Solve: 689 [?]
Skill Endorsements: 104 [?]
Administrator
Featured
 
0
 

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.

Member Avatar
Ketsuekiame
Posting Virtuoso
1,676 posts since May 2010
Reputation Points: 793 [?]
Q&As Helped to Solve: 231 [?]
Skill Endorsements: 27 [?]
 
0
 

/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.

Member Avatar
notconfirmed
Newbie Poster
14 posts since Apr 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

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!

Member Avatar
deceptikon
Eternally Awesome
4,695 posts since Jan 2012
Reputation Points: 1,341 [?]
Q&As Helped to Solve: 689 [?]
Skill Endorsements: 104 [?]
Administrator
Featured
 
0
 

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.

Member Avatar
caKus
Light Poster
27 posts since Mar 2010
Reputation Points: 14 [?]
Q&As Helped to Solve: 3 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

Member Avatar
rubberman
Senior Poster
3,999 posts since Mar 2010
Reputation Points: 513 [?]
Q&As Helped to Solve: 501 [?]
Skill Endorsements: 87 [?]
 
0
 

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.

Member Avatar
notconfirmed
Newbie Poster
14 posts since Apr 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

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!

Member Avatar
deceptikon
Eternally Awesome
4,695 posts since Jan 2012
Reputation Points: 1,341 [?]
Q&As Helped to Solve: 689 [?]
Skill Endorsements: 104 [?]
Administrator
Featured
 
0
 

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.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: