Ask coding questions

← Back to all posts
Run .exe or .net
MatReiner (124)

is there a way to run a .exe/.net file in my repl?

Comments
hotnewtop
AmazingMech2418 (1102)

Well, Repl.it uses Linux emulators, so I don't think you can run a .exe file.

[deleted]

I don't think so, but you can do bash, that's as close as you'll get with it.

MatReiner (124)

@JacksonCowie c# generates a .exe file when ran, but i don't know if that could be helpful

[deleted]

@MatReiner Ah ok. Well, I still wouldn't think you would be able to make and run exe files on here. A second opinion from one of the repl.it team might help.

MatReiner (124)

@JacksonCowie ok. ill try. i won't give up easy

CSharpIsGud (1070)

@MatReiner Yes, replit runs linux, you can run an executable by simple doing ./exe however for .net you have to do mono exe as .net compiles to its own bytecode not native instructions a machine can execute

CSharpIsGud (1070)

@MatReiner you have to use mono(or dotnet) to run .net binaries on linux, exe's created from .net aren't actual binary executables, they are bytecode that has to be ran via a runtime like mono

MatReiner (124)

@CSharpIsGud i tried mono program.exe but i still get an error

MatReiner (124)

@CSharpIsGud Cannot open assembly './program.exe': File does not contain a valid CIL image.

CSharpIsGud (1070)

@MatReiner what language are you compiling then

MatReiner (124)

@CSharpIsGud I'm not compiling I have a ready-made .exe file

CSharpIsGud (1070)

@MatReiner then you have to chmod +x program.exe to make it executable then ./program.exe

JuanMulero (0)

@CSharpIsGud
bash: ./program.exe: cannot execute binary file: Exec format error

CSharpIsGud (1070)

@JuanMulero You can't run a non .NET exe file on replit without somehow running an emulator like wine first.

MatReiner (124)

btw: this is post 33333.