Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What would it take to update to a newer .NET version? #438

Open
markski1 opened this issue Aug 1, 2024 · 16 comments
Open

What would it take to update to a newer .NET version? #438

markski1 opened this issue Aug 1, 2024 · 16 comments

Comments

@markski1
Copy link

markski1 commented Aug 1, 2024

Hello, my question is basically the title. Imagine I wanted to update SampSharp for targetting .NET 8, what would need to be changed? Would it require a rewrite of the library or minor things?

It catches my eye that the default Project package targets .NET Core 3.1, despite this library not seeming abandoned, so I was wondering how viable would it be to try and bring it up to date

@CiprianN23
Copy link
Contributor

Well SampSharp on main branch is targeting net 6 and the nuget package from what i see is net standard 2.1
But i do see the template for creating the project is targeting an older version.

Basically it takes nothing apart from updating to the latest nuget package of SampSharp and changing your project to target a newer net version, no need to change anything for it to work

@markski1
Copy link
Author

markski1 commented Aug 1, 2024

Hi Ciprian, thanks for the quick answer!

I haven't tried this yet because I don't have a Linux machine available, but theoretically, if I targetted .NET 8, and put the x32 Linux runtime of .NET 8 in my "runtime" folder for my samp server, would it then run just fine on .NET 8?

@CiprianN23
Copy link
Contributor

Yes, it will just be fine

@LYZENCORE-9
Copy link

SampSharp is supporting .NET 8 , i test it and it's working

@markski1
Copy link
Author

markski1 commented Aug 2, 2024

Many thanks

@markski1 markski1 closed this as completed Aug 2, 2024
@markski1
Copy link
Author

markski1 commented Aug 4, 2024

SampSharp is supporting .NET 8 , i test it and it's working

Sorry to bring this up again, but may I ask, where did you find an x86 build of .NET 8? Seems the official download is only x64

@LYZENCORE-9
Copy link

SampSharp is supporting .NET 8 , i test it and it's working

Sorry to bring this up again, but may I ask, where did you find an x86 build of .NET 8? Seems the official download is only x64

go to this repository [https://github.com/Servarr/dotnet-linux-x86](NET 8 x86_64 Linux Unofficial Build)

@markski1
Copy link
Author

markski1 commented Aug 4, 2024

Very nice, thanks once again.

@MrDave1999
Copy link
Contributor

@LYZENCORE-9 @markski1 I can't run dotnet linux x86 for .net 8 (https://github.com/Servarr/dotnet-linux-x86/releases/tag/v8.0.4-90). I'm testing it on a VPS with ubuntu 20.04 but it does not run gamemode:

image

As shown in the image, it keeps initializing the runtime and from there it does nothing, the server never starts. Do you know what it could be?

@markski1
Copy link
Author

@MrDave1999 I ran into the same problem and sadly did not have enough free time to troubleshoot it. It seems to balloon in commit memory size until it crashes out. Very strange

@markski1 markski1 reopened this Oct 24, 2024
@MrDave1999
Copy link
Contributor

Yes, that's the problem: Servarr/dotnet-linux-x86#5 (comment)

@LYZENCORE-9
Copy link

@LYZENCORE-9 @markski1 I can't run dotnet linux x86 for .net 8 (https://github.com/Servarr/dotnet-linux-x86/releases/tag/v8.0.4-90). I'm testing it on a VPS with ubuntu 20.04 but it does not run gamemode:

image

As shown in the image, it keeps initializing the runtime and from there it does nothing, the server never starts. Do you know what it could be?

weird , i use this runtimes in my server at my home and it works

@KoertLichtendonk
Copy link

Also running into this issue where it is initializing the runtime, consumes all memory briefly and then kills the process. Any known solutions would be greatly appreciated!

@MrDave1999
Copy link
Contributor

@KoertLichtendonk I have not found any solution. The only thing we could do is to manually compile the runtime .net 8.0 for an x86 machine.
For now I am running my server with this runtime: https://github.com/Servarr/dotnet-linux-x86/releases/tag/v6.0.35-97

@Duduzera1997
Copy link

Based on my recent experiences, using updated versions of .NET is only possible on Windows servers. Servers running Linux unfortunately still need to use .NET 6 with the https://github.com/Servarr/dotnet-linux-x86/releases/tag/v6.0.35-97 runtime.

I think the one way to solve this problem once and for all would be to use Open.mp in 64 bits and use .NET x64. I don't know if this is possible yet, but I see that finding a .NET 8 x86 runtime that works would only be a pothole filler because we would have the problem happening with each new .NET version, so we would always need a compilation of the working x86 runtime.

Yes, this is very boring, Microsoft unfortunately does not support 32-bit Linux so we will not have x86 being provided by them officially.

@LYZENCORE-9
Copy link

@Duduzera1997 @MrDave1999
after i finish from some works and some tests from my academy , i will recompile all .NET 8 runtimes for 32-bit linux target (x86)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants