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

Add .NET 3.5 Targets #536

Closed
4 tasks done
Washi1337 opened this issue Mar 15, 2024 · 2 comments · Fixed by #540
Closed
4 tasks done

Add .NET 3.5 Targets #536

Washi1337 opened this issue Mar 15, 2024 · 2 comments · Fixed by #540
Milestone

Comments

@Washi1337
Copy link
Owner

Washi1337 commented Mar 15, 2024

Problem Description

There has been some demand for .NET 3.5 targets. In particular, use cases include:

  • Dynamic analysis / deobfuscation of binaries targeting .NET 3.5
  • Game mods that target games running Unity targeting .NET 3.5 Mono.

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:

These 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

@Washi1337 Washi1337 added this to the 6.0.0 milestone Mar 15, 2024
@Washi1337
Copy link
Owner Author

  • 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 Replace System.Text.Json with SimpleJSON for older build targets #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.

@Washi1337 Washi1337 linked a pull request Mar 17, 2024 that will close this issue
@Washi1337
Copy link
Owner Author

This is ready for integration / real-world scenario testing. Alpha nuget packages for this merge can be found on https://nuget.washi.dev/.

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

Successfully merging a pull request may close this issue.

1 participant