Is there any way to make a C# assignment (repl) based on a newer framework? The DOTNET ecosysystem has quite evolved since the versions used on replit.
My students code primarily in Visual Studio and use the replit teams only for submissions (and sometimes also for smaller assignments) primarily because of the level of support, debugging tools, hinting etc. However, after installing Visual Studio 2022, all their C# projects are using top-level statements. For beginners this is perfect, there is no “unnecessary” code around, they can focus on their own statements only.
This feature is available since C# 9, with the new Visual Studio it is just “preferred for new projects”, but for my students this means that they cannot simply copy&pase to replit. They are also confused by the unexpected code around. Is there any way to create projects supporting C# 9 or even C#10 ?
- Nowadays the standard option for a C# project (repl) in Teams is using the mono compiler, this is however quite outdated as mono is an almost dead technology (the latest supported version of the language is C# 6 C# Compiler | Mono)
- It is possible to set up a nix project and manually create the project file and code file (https://replit.com/@turbio/dotnet) This is a step forward, but only brings us to C# 7.1 since the installed framework version is netcoreapp2.1 (unsupported by Microsoft, not even LTS, NET Core Releases and Support - .NET Blog)
- I tried to modify the
main.csprojfile and change
<TargetFramework>netcoreapp2.1</TargetFramework>to a newer framework version. Expectly this failed with a message :
error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0. Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [/home/runner/abc/main.csproj]and a similar one for
- There is a Dotnet 5 demo at https://replit.com/talk/templates/C-9-NET-5-template/121959 , however it is huge (hundreds of MBs - and I have more than hundred of projects) and extremely slow to run. I also haven’t found a way how to fork a standard repl into replit Teams to make it a project.
Is there any help for me how to setup a modern C# project in replit teams?
Any help appreciated