Current build of Linux CoreCLR


#1

A few days ago I downloaded the Linux port of CoreCLR, according to the instructions here. I ended up with 1.0.0-beta8-15120. Unfortunately when I tried to run the hello world sample, I got an exception, which seems to be the same one described in bug 2482.

That bug is marked resolved and apparently I need build beta8-15138. I’m now a bit confused.

  • Where do I get beta8-15138?

  • The exception seems to be thrown from inside the c# compiler. Is it possible to use the Mono c# compiler, then run the resulting .exe under CoreCLR?

  • More generally, how do I run a program under CoreCLR if it has already been compiled? I don’t really want the overhead of recompiling the c# code every time I run my application, but dnx doesn’t seem to save or use .exe files. Is there something I’m missing?

By the way, it’s great news that this code has been open sourced, and that a Linux port is under way. I do understand that it’s early days and not everything will work out of the box.


#2

In the issue you linked, the problem stems that in the previous beta releases of dnx you had to pass the current directory to the command with the dot as: dnx . run however that has changed to not require the dot, as dnx run

Today, if you use the Mono compiler, the application will be compiled to target dnx451 framework. If you compile using the CoreCLR compiler, it will target dnxcore50.

To run the application that has already been compiled, such as the Console example, you can do dnx ConsoleApp.dll Make sure that the dnx you use matches the compiler that the application was compiled with.

For testing with the latest prerelease compilers, I start the day with:

dnvm upgrade -u -r mono
dnvm upgrade -u -r coreclr -p

Then in the package.json for the project, I specify that I want both compilers to build the application:

"frameworks": { "dnx451": {}, "dnxcore50": {} }

Then I build the application with dnu build and the results application resides in bin/Debug/dnx451 and bin/Debug/dnxcore50 . The resulting dlls can be executed with their matching dnx runtimes as dnx ConsoleApp.dll


#3

Thanks for the information, that’s very helpful.


.NET Foundation Website | Blog | Projects | Code of Conduct