jcrodriguez-dis / moodle-mod_vpl

Virtual Programming Lab for Moodle (Module)
GNU General Public License v3.0
103 stars 89 forks source link

Support for .NET Core (C#) #79

Open frankneumann opened 5 years ago

frankneumann commented 5 years ago

Currently the scripts for C# use the Mono environment to compile and run C# code. As Mono supports C# 6 only, it might be advisable to migrate the C# environment to use .NET Core 2.2 and higher. What do you think? Regards, Frank

jcrodriguez-dis commented 5 years ago

Hello Frank,

I will change the C# script to use the available compiler (mcs/mono or dotnet). If someday ".NET core" is available directly from Ubuntu or RedHat as a standard package I will add it to the VPL installer.

Thanks for the information.

Best regards, Juan Carlos.

frankneumann commented 5 years ago

Hello Juan Carlos,

many thanks - I appreciate that. I recently looked at the Bash script files for Jave: Their way of supporting JUnit is really what we would need for C#'s NUnit as well. Should I open another request?

Best regards,

Frank

frankneumann commented 5 years ago

Hello Juan Carlos,

I looked into the current development for .NET again: At the Build Conference 2019 Microsoft announced that Mono and .NET Core will be fused together in Nov. 2020 (https://mybuild.techcommunity.microsoft.com/sessions/77031?source=sessions) in .NET 5.0. Therefore I propose to stick to Mono in the meantime. Would it be possible to update the supported Mono version to 5.20 (https://www.mono-project.com/docs/about-mono/releases/5.20.0/) as it started to feature support for newer C# features. Apparently we now have the choice between the older Mono C# compiler (mcs) and the newer Roslyn compiler (csc). Regarding the support for the language features the csc is much better developed, but the scripts have to be changed. What do you think - is this the best strategy? Best regards, Frank

jcrodriguez-dis commented 5 years ago

Hello Frank, It seems straightforward to add "scs" as the default compiler for C#. I have modified the scripts to use "scs" or mcs if scs not found. I have also added support for Nunit. There is a problem with the package chicken-bin (e.g. in Ubuntu) that install a program named csc. To use these new features you must wait to the next VPL release or take the scripts from Github after the next commit.

Best regards, Juan Carlos.