openrpg / OpenRpg

For core RPG related data models and logic
MIT License
67 stars 8 forks source link

Could we get this updated to .Net 4 #8

Closed parspeq closed 1 year ago

parspeq commented 1 year ago

It would be appreciated if this was usable in .Net 4 projects.

grofit commented 1 year ago

Do you mean .Net Framework i.e the old Windows only one?

The current builds should support .net standard so .net core 3 up to .net 6.

The idea is to move everything to .net 6 once Unity bumps up support for newer .net versions.

parspeq commented 1 year ago

It won't build for .Net 4. in Visual Studio 2022. the error message reports that the project was created for an earlier version of .Net and cannot be referenced in a .Net 4.x project. I tried creating a new project also for .Net 4x and had similar results. It appears I could manually update the .Net version in the xml file for each individual project but there are other errors indicated possible api differences. Unity does support .Net framework 4 now, perhaps there could be a lot more work involved in delaying until .Net 6. Thanks.

On Wed, Feb 8, 2023 at 3:51 PM LP @.***> wrote:

Do you mean .Net Framework i.e the old Windows only one?

The current builds should support .net standard so .net core 3 up to .net 6.

The idea is to move everything to .net 6 once Unity bumps up support for newer .net versions.

— Reply to this email directly, view it on GitHub https://github.com/openrpg/OpenRpg/issues/8#issuecomment-1423285246, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWVE7OXKN5DS6GO5BIYGPIDWWQIMZANCNFSM6AAAAAAUVZDRDI . You are receiving this because you authored the thread.Message ID: @.***>

grofit commented 1 year ago

Official Stance

Ah right yes I think you are using the older .net framework which is no longer really supported and is on life support from Microsoft, so supporting that would be a downgrade not an upgrade.

Im sure you have a valid reason for using .Net Framework but if you are able to its HIGHLY recommended to move over to .net 5 or 6, as I think even WinForms (the only thing I know people would still use older versions for) can be run in newer .net frameworks without too much faffing.

If think you may be able to upgrade but are unsure on anything in your project by all means drop into the discord server and im happy to talk you through your options as its deemed a legacy platform at the moment.

Also just to clarify as the naming of them all is a bit silly but there is:

If you cant do the above

You can always download the older version of OpenRpg which targets .net standard 2.0 and .net framework 4.6 which I think is in Nuget 0.19.x versions.

I think it was in 0.20.x that we moved over to use .net standard 2.1 so you should be fine using that, as for the most part it would be the same, just missing some bits around persistence that came in newer versions.

parspeq commented 1 year ago

The version you suggested 0.19 built fine in 4.8 after I removed the unit tests.

From https://www.codemag.com/Article/2211082/Upgrade-Tooling-for-.NET-7

In some cases, it may make sense to retarget projects to .NET Framework 4.8 prior to upgrading to .NET 7. For very large projects or projects targeting old versions of .NET Framework (before .NET Framework 4.5, for example), this can be valuable because it allows you to address breaking changes between older and newer versions of .NET Framework separate from further breaking changes moving from .NET Framework to .NET 7. For small or medium-sized projects or those targeting more recent .NET Framework versions, upgrading to .NET Framework 4.8 isn't necessary because the number of breaking changes moving to .NET Framework 4.8 is likely to be small.

grofit commented 1 year ago

Sure sure, and for those stuck on the .Net Framework on larger projects it may make sense to stay on it, however if we wanted to re-target that we have to ensure we are not using any C# language features > 7.3 which we use now, so it was decided the majority of developers would be using .net 5+ and we can at least improve the code base slightly (and even further when we can move past .net standard 2.1).

You are still fine though, as you can still use this library, you are just limited on using version 0.19.* unfortunately.

I will close this ticket but feel free to post on here if you have any related queries etc.