Reputation: 73
I would like to write a program in C# on Visual Studio on my windows computer and then upload it to my school's Linux server and run the program there. Assignments are turned in via this server: my professor receives the file and runs it from his directory. Is this possible and if so how can I do it?
I read about Mono but from my understanding of it, Mono is used to write and run C# applications on Linux so if it's not on my school's server then I would't be able to run the application. So even if I uploaded a copy of Mono to my personal directory on the server, my professor wouldn't be able to run the program from his directory. Is this correct?
I would like to know if there is any way to do this with or without Mono.
Edit: The professor will be running the program like this:
$p1 testfile
where "testfile" is a command line argument being passed to my program. "p1" will probably be a script that I'll write to run the program.
Upvotes: 4
Views: 1665
Reputation:
I would suggest first checking to see if your school's Linux machines have mono already installed. Check the lib folder and see if there's a mono folder. The directory may not line up exactly, but it should be something along this line:
/usr/local/lib/mono/ ; various things here
If the school system doesn't have mono, I would ask the professor to have the system admin install mono on one or more machines. If that isn't possible then I would go down the route of packaging it yourself.
Check out the Mono project here.
Upvotes: 4
Reputation: 4020
you can bundle your compiled application with the required runtime files so the app can be run without having a mono runtime installed, but you should test it out before giving it them and it would just be easier to have your professor install mono.
read: http://www.mono-project.com/Guide:Running_Mono_Applications
Upvotes: 4