Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Execute C# program [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Tomsen
n00b
n00b


Joined: 26 Feb 2005
Posts: 63
Location: Denmark

PostPosted: Mon Feb 05, 2007 12:58 pm    Post subject: Execute C# program [Solved] Reply with quote

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
View user's profile Send private message
polle
Veteran
Veteran


Joined: 28 Feb 2003
Posts: 1498
Location: Belgium

PostPosted: Mon Feb 05, 2007 1:36 pm    Post subject: Reply with quote

the permissions on the file are right? chmod +x on the file
Back to top
View user's profile Send private message
lorenb
Apprentice
Apprentice


Joined: 24 Aug 2002
Posts: 207
Location: Toronto, ON

PostPosted: Mon Feb 05, 2007 1:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Tomsen
n00b
n00b


Joined: 26 Feb 2005
Posts: 63
Location: Denmark

PostPosted: Tue Feb 06, 2007 9:26 am    Post subject: Reply with quote

Yes! It works now! Thx alot lorenb :D
_________________
Don't ever argue with an idiot, he will bring you down to his level and beat you with exprience
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum