Closed Washi1337 closed 1 month ago
Manually implementing all backports for System.ValueTuple
and System.Threading.Concurrent
seems to be much more work than initially expected. We may want to consider going with MonoMod.Backports.
System.Text.Json
is covered. Enough embeddable libraries exist that can (compiler conditionally) replace it (see #538).
For System.IO.MemoryMappedFiles
, we probably will need carve it out .NET itself, or write our own wrapper around the native APIs that facilitate this, as MonoMod.Backports does not cover this.
This is ready for integration / real-world scenario testing. Alpha nuget packages for this merge can be found on https://nuget.washi.dev/.
Problem Description
There has been some demand for .NET 3.5 targets. In particular, use cases include:
Currently, AsmResolver's is compatible with .NET standard 2.0 or higher. This means it requires at the very least .NET 4.6.1. We therefore miss out on all usecases that require an older version.
Proposal
Add a .NET 3.5 build target.
This is not as trivial as it may seem, due to the following incompatibilities that AsmResolver currently depends on:
System.Threading.Concurrent
. See #540System.Text.Json
. See #450System.ValueTuple
. See #540System.IO.MemoryMappedFiles
. See #544These will have to be polyfilled or shims have to be written.
Alternatives
As 3.5 is ancient technology, we could opt for not supporting .NET 3.5. However, unfortunately, Microsoft has declared .NET 3.5 is supported until at least Jan 2029 (source: https://learn.microsoft.com/en-us/lifecycle/products/microsoft-net-framework). Furthermore, bringing .NET 3.5 to the game modding community can significantly increase the surface area where AsmResolver could be used.
Additional Context
No response