View previous topic :: View next topic |
Author |
Message |
Tomsen n00b
Joined: 26 Feb 2005 Posts: 63 Location: Denmark
|
Posted: Mon Feb 05, 2007 12:58 pm Post subject: Execute C# program [Solved] |
|
|
Hi
I've begun to program in C# and my program works just fine, but when i try to execute the program from the konsole i get
Code: |
Tomas Debug # ./backend.exe
-su: ./backend.exe: cannot execute binary file
|
but with
Code: |
Tomas Debug # mono backend.exe
test!
|
It works just fine, so how do i make it possible to run the file, without having to write mono infront of it? _________________ Don't ever argue with an idiot, he will bring you down to his level and beat you with exprience
Last edited by Tomsen on Tue Feb 06, 2007 9:26 am; edited 1 time in total |
|
Back to top |
|
|
polle Veteran
Joined: 28 Feb 2003 Posts: 1498 Location: Belgium
|
Posted: Mon Feb 05, 2007 1:36 pm Post subject: |
|
|
the permissions on the file are right? chmod +x on the file |
|
Back to top |
|
|
lorenb Apprentice
Joined: 24 Aug 2002 Posts: 207 Location: Toronto, ON
|
Posted: Mon Feb 05, 2007 1:39 pm Post subject: |
|
|
In your kernel you need support for misc. binaries:
Code: | Executable file formats / Emulations --->
<*> Kernel support for MISC binaries |
After you have the compiled in, then you can just run:
Code: | echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register |
If you want it set automatically, just put the command into /etc/conf.d/local.start |
|
Back to top |
|
|
Tomsen n00b
Joined: 26 Feb 2005 Posts: 63 Location: Denmark
|
Posted: Tue Feb 06, 2007 9:26 am Post subject: |
|
|
Yes! It works now! Thx alot lorenb _________________ Don't ever argue with an idiot, he will bring you down to his level and beat you with exprience |
|
Back to top |
|
|
|