C
C#2mo ago
Phrog

Compiling C# without Visual Studio

I'm new to C# and I understood that if i want to compile code without Visual Studio i need to use Roslyn, but on github it marks the latest release as .NET 6.0. Is there no way to compile C# code with .NET 8.0 as it is the latest LTS release? Visual Studio is very heavy, especially since i don't intend to use C# for big projects and my system isn't too performant.
12 Replies
leowest
leowest2mo ago
you just use dotnet cli you can download the SDK u wish to target then u can do dotnet build or run or whichever is your goal https://dotnet.microsoft.com/en-us/download https://learn.microsoft.com/en-us/dotnet/core/tools/
Phrog
Phrog2mo ago
Oh guess i missed that, thank you
leowest
leowest2mo ago
but if you're a beginner the goto is indeed visual studio u will have a much easier learning and less downtime figuring out things u dont need to worry initially
Evyr
Evyr2mo ago
you'll already have the SDK installed if you've done any c# programming in visual studio
leowest
leowest2mo ago
yeah if u installed visual studio u can just run in the cmd dotnet --info to see which SDK u have installed
Evyr
Evyr2mo ago
if you just want to build then you'll be navigating to the file directory containing the project with the cd cmd command, then using the dotnet build command. You can show info about it with dotnet build -h
No description
333fred
333fred2mo ago
As a side note, I have no idea what you mean by the latest release being .NET 6.0 Those aren't releases, they're just tags
Phrog
Phrog2mo ago
So this doesn't mean that roslyn works with up to .NET 6.0?
No description
333fred
333fred2mo ago
That's just a tag
Phrog
Phrog2mo ago
oh
Phrog
Phrog2mo ago
i see now, thanks everyone
Want results from more Discord servers?
Add your server