#Installing .NET 4.8 on Linux

1 messages · Page 1 of 1 (latest)

tribal cobalt
#

I'm using Ubuntu as my operating system and I'm struggling to figure out how to install .NET Framework 4.8 to start making plugins for SL. They have .NET 9.0, 8.0, 3.0 for Linux but not 4.8. Planning to use VSC as my IDE.
I assume I need use Mono but I have no idea how to use that
Any help would be greatly appreciated

atomic notch
#

Have you tried using .net standard 2.1

tribal cobalt
#

Im struggling to install that too on Ubuntu. I'm on Ubuntu 24.02

#

I have no idea what im doing

winter wing
#

This may help you

#

Haven't used the extensions they link in the post myself but they may give you a way to work in .net core at the very least and you can try go from there

tribal cobalt
#

Would any version of 2.1 work?

cobalt dagger
#

.Net framework is not available for Windows. However, you can use mono instead. I advice you to install Rider because it's free now and also has support for it, so makes the development easier

tribal cobalt
#

But how do I use mono

#

Im a bit of an idiot

cobalt dagger
#

To be honest I've experienced the same issue as you, but when I found out about it, I installed Windows back

tribal cobalt
#

Wow...

winter wing
#

Honestly dualbooting might be easier to set up PepeLaugh

tribal cobalt
#

Sounding like it

#

Otherwise i might have to get used to remotely connecting to my laptop to make a plugin and switching to my desktop to launch the server and client

cobalt dagger
#

Just take a look at the mono docs

jagged saddle
#

🤔

#

You just need to install mono for .net framework development as they said yeah

#

No need to switch os

tribal cobalt
#

I'm using Rider rn and it seems to be working
And rn im trying to figure out how LabAPI works and see if i can make a plugin and test it

latent drum
#

Good luck!

severe meteor
#

Using C# with vscode is a bit messy

stable glade
tribal cobalt
#

Dotnet 8 doesn't work with SL apparently

#

I did manage to somehow get a simple print on startup plugin working once, but after a while it just stopped working for some reason

severe meteor
#

Dotnet and .NET Framework only really have one similarity between them
They use C# and mostly the same CIL

#

but one is a complete rewrite made with crossplatform support in mind

tribal cobalt
#

Got it working thank god

#

Ended up installing mono and using JetBrains Rider

jagged saddle
stable glade
jagged saddle
#

Yes but can you explain how you build using it?

stable glade
jagged saddle
#

Do you have a repo with a project file I can look at?

jagged saddle
#

Just dotnet build?

tribal cobalt
#

I confused the hell out of Riptide when i told him i bulit it with 8.0 once

stable glade
jagged saddle
#

Ok well that doesnt say much

tribal cobalt
#

I was using VSC when i did it

#

Also just simply pressed the build button

jagged saddle
#

Can you build it using dotnet directly instead?

tribal cobalt
#

Dunno, never tried

jagged saddle
#

I mean try it now

tribal cobalt
#

Im using 4.8 now

jagged saddle
#

Sky then

stable glade
#

But i'll try when i go home

jagged saddle
#

👍

jagged saddle
glass tapir
#

SDK-style projects are sooooo much easier to manage
@frozen geyser showed me this

#

Before that I just let Rider manage the csproj files xd

jagged saddle
#

Yeah the only issue I have had in rider is that it breaks completely if you have a dotnet and mono project in the same solution

#

So it would be nice to solve that

glass tapir
#

Haven't tried that yet
But the CLI works, right?

jagged saddle
#

Well no, I have to build one using mono and one using dotnet

frozen geyser
frozen geyser
jagged saddle
#

Great, sounds good

untold dagger
#

Yeah, .NET Framework is kinda weird one i have only .NET installed but I can compile to .NET framework just fine on my fedora laptop

stable glade
cobalt dagger
#

Does Discord work well for you?

#

When I had fedora, I experienced some problems with voice chats

untold dagger
cunning seal
acoustic veldt
# atomic notch Have you tried using .net standard 2.1

netstandard2.1 isn't compatible with net48, which labapi uses i think, use netstandard2.0 instead
however, it is possible to use net48 on linux
just install the net9.0 sdk, on arch(btw) theyre these packages: dotnet-targeting-pack dotnet-sdk dotnet-host dotnet-runtime
and then through an ide(im using rider), you can create a class library using the net9.0 sdk, and then change the target framework to either netframework2.0 or net48

atomic notch
#

2.1 works although your IDE will complain

acoustic veldt
#

some features are available in 2.1, but aren't available in 4.8 which might cause runtime issues that you will run into

#

for example system.net.http

atomic notch
#

you should reference the one the game provides which is compatible on both versions

#

im going to try it out, see if it does work

grand torrent
#

Was quite certain until now that building with .net (core) basically just called .net framework msbuild under the hood and using it on linux meant mono (like unity does)

acoustic veldt
# grand torrent

it didn't work for me, i have to add a system.net.http nuget package and add it as depend to work

#

maybe its just because i am on linux and netframework libraries just arent available for me

frozen geyser
#

SCPSL_Data/Managed/System.Net.Http.dll

Use that file

stable glade
#

i just hit the limits of using .NET 8.0

tight nimbus
#

Yeah you have to use .NET 4.8.x

#

otherwise it wont simply work

stable glade
untold dagger
#

what limit?

stable glade
untold dagger
#

cool, but why would you do that

#

I remember I could compile .net 4.8 on Linux just fine

stable glade
#

just rider was shiting or idk but he needed a restart

untold dagger
#

fun

#

I don't use RIder anymore and I do dotnet build -c Release for everything, lol

stable glade
#

visual studio ?

untold dagger
#

vs code

#

the blue one

stable glade
#

yea understandable

untold dagger
#

the thing is, I don't need their features very much

stable glade
#

it's just logic taht both take more Ram and Cpu than VS Code

untold dagger
#

well, plain VS code for C# is shit, but one extension fixes that

stable glade
#

idk i never tried

#

i prefere using VS Code for Javascript

#

and HTML

frozen geyser
#

notepad for the win

untold dagger
#

I tired all 3 and I think Rider is the best for most people, especialy since they make it "free" to use

stable glade
#

NO FUCKING WAY

frozen geyser
#

only for non commercial

untold dagger
#

^

stable glade
#

and i use the student version

frozen geyser
#

i dont use it

stable glade
#

well i'ts a good thing

frozen geyser
#

vs started faster than rider

stable glade
frozen geyser
#

so obv that was a win, like in multiple projects ones

#

I have ram,they can eat it

stable glade
#

and because of this rider start faster than cs for me

#

vs*

frozen geyser
#

well my chore tab eat more than vs so

stable glade
acoustic veldt
#

5x ram usage than my browser 😭