Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

[Question] Why stay on .NET 4? #22

Open
Hi-ImKyle opened this issue Feb 23, 2021 · 10 comments
Open

[Question] Why stay on .NET 4? #22

Hi-ImKyle opened this issue Feb 23, 2021 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@Hi-ImKyle
Copy link

Title, you can and probably should update to either 4.7.2 or 4.8. BepInEx will load it either way? If it stays on 4.0 then that's fine, just removes my idea for creating a pull request for something.

@AlexMog
Copy link
Owner

AlexMog commented Feb 23, 2021

It's just because I cannot guarantee that it will work correctly, because Unity seems to be stuck with v4.0 framework.

@Hi-ImKyle
Copy link
Author

I built and ran Longship with .NET 4.8 just fine. Might be something to look into if you're so concerned about updating the framework. I've never seen any issues that happen in the past with modding other games with BepInEx.

Also if you saw me try and push to the main repo, my bad, still getting used to git commands 👍

@AlexMog
Copy link
Owner

AlexMog commented Feb 23, 2021

I'll try then :)
Don't worry, you can't push directly on a repo that is not yours, you need to make a PR for that :)

@AlexMog AlexMog added the enhancement New feature or request label Feb 23, 2021
@AlexMog AlexMog self-assigned this Feb 23, 2021
@Hi-ImKyle
Copy link
Author

Hi-ImKyle commented Feb 23, 2021

I know, I just don't know if you get notifications for it saying I tried or something. I created a Reflection branch on my fork, which gives you a class with more accessibility over reflection, 4.8 is required for it. If you want it I can create a pull request for it.

@AlexMog
Copy link
Owner

AlexMog commented Feb 23, 2021

Don't hesitate to create a PR if you think it could be a good addition to Longship :) if it's not too specialized and can help other developers (as Longship is primarly a high level API), it's always something great to have !

@Hi-ImKyle
Copy link
Author

I'll keep it on my repo for now, just till Longship gets more updates and if I feel Longship will be better off with it I'll create the pull. But I still recommend updating to a somewhat newer framework, doesn't need to be the latest! This is going very good so far I have to say.

@AlexMog
Copy link
Owner

AlexMog commented Feb 23, 2021

I'll do it then :)

@kohanis
Copy link
Contributor

kohanis commented Mar 2, 2021

Mono support only up to 4.7 features, and even this not in full
// i was wrong, mono 6.6.0+ and unity 2020.2 support almost all c#8 features (information about it is a mess). But we have 2019.4, so, probably no luck

@Hi-ImKyle
Copy link
Author

I built and ran Longship with .NET 4.8 just fine

@kohanis
Copy link
Contributor

kohanis commented Mar 4, 2021

Yeah, as I said, it works particularly, but then you will need to indicate in readme about not-working features of 4.8 in mono+current unity(which aren't clearly listed anywhere) and c#8 in .net framework
Btw, harmony already have a huge part of this helpers in utilities like foo.GetType().GetFieldFull("bar") => AccessTools.Field(foo.GetType(), "bar") and SetFieldValue(foo, "myField", "bar") => Traverse.Create(foo).Property("myField").SetValue("bar")
Although AccessTools doesn't use cache. Traverse uses

// I never said it was a bad idea, just need some information in the readme, then

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants