Raylib-cs icon indicating copy to clipboard operation
Raylib-cs copied to clipboard

Update .NET Version from 5 to 8, and Language Version from 10 to 12

Open Captain-Quack opened this issue 1 year ago • 2 comments

The current version of .NET that the projects in this repo use, .NET 5, has reached its end of life and is no longer supported. This commit fixes that by upgrading the version to what is currently recommended, .NET 8.

Additionally, this pr bumps the language version from 10 to 12 to take advantage of modern language features.

Captain-Quack avatar Jan 12 '24 02:01 Captain-Quack

we can use LibraryImport instead of DllImport when we will update (https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke-source-generation)

danilwhale avatar Jan 14 '24 10:01 danilwhale

Oops, I'm sorry. I did not mean to merge again.

Captain-Quack avatar Jan 20 '24 21:01 Captain-Quack

Hi @Captain-Quack, is there any update on this?

thealpaca89 avatar Apr 09 '24 15:04 thealpaca89

@ChrisDill is this ready to be merged into the main repository?

Captain-Quack avatar Apr 14 '24 15:04 Captain-Quack

Updating the targetFramework put serious limitations on downstream for no reason. Unless there is a compelling case to do so, I don't see why we would do this.

Bumping the Language version is fine as it only requires a newer compiler, not a new runtime.

9ParsonsB avatar Apr 14 '24 23:04 9ParsonsB

@Captain-Quack I agree with @9ParsonsB on updating the language version. Not sure on the target framework. Could multi target to keep support for downstream projects though unsure if that is worth doing.

chrisdill avatar Apr 15 '24 06:04 chrisdill

Not against updating the framework, but I would ask: what do we gain by doing this? Because I think the answer will end up being very little

9ParsonsB avatar Apr 15 '24 23:04 9ParsonsB

(Sorry for the long wait) I don't have any strong reason for or against the framework update. This pr was done in the first place to perform a general update, and I totally get the concerns for downstream projects.

Captain-Quack avatar May 04 '24 17:05 Captain-Quack

@ChrisDill Do we want to move ahead with LanguageVersion change? I see no issue.

Need to update this PR to remove targetFramework change before merging

9ParsonsB avatar May 15 '24 00:05 9ParsonsB

@9ParsonsB Moving ahead with the LanguageVersion change sounds good to me.

chrisdill avatar May 16 '24 06:05 chrisdill

I wouldn't see why we'd abstain from updating the framework, considering the risks. Wouldn't .NET 8 provide more external support and future-usability? Just like with what @danilwhale mentioned for LibraryImport. I mean it sounds normal to me have downstream projects left-affected, it happens all the time.

recore67 avatar May 17 '24 10:05 recore67

I wouldn't see why we'd abstain from updating the framework, considering the risks

Because there is no reason to.

Wouldn't .NET 8 provide more external support and future-usability?

We can always change it when it becomes an issue. Right now, it would only be artificially limiting downstream.

like with what @danilwhale mentioned for LibraryImport

We've looked at LibraryImport and may move to it in the future, but we dont have the capacity to change & test everything right now.

This is not a diktat, if there is a reason to make the change, we are happy to do so. Contributions are welcome.

9ParsonsB avatar May 21 '24 06:05 9ParsonsB