MapsterMapper / Mapster

A fast, fun and stimulating object to object Mapper
MIT License
4.38k stars 331 forks source link

Use assembly loading context to isolate loaded assemblies from AppDomain #714 #715

Closed boylec closed 5 months ago

boylec commented 5 months ago

See issue #714

I was running into issues running Mapster.Tool against projects with .NET 9 preview assemblies references (either directly or transitively from other dependencies.)

After sleuthing through dotnet/runtime CLR code I ran into this issue which seemed pertinent:

https://github.com/dotnet/runtime/discussions/102981

This PR is based off of recommendations by @jkotas there about how to load assemblies in an isolated way. It appears to have solved my issue with Mapster.Tool 8.4.1-pre01 mentioned.

boylec commented 5 months ago

need to work on this a bit more