MapsterMapper / Mapster

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

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

Closed boylec closed 3 weeks ago

boylec commented 3 weeks 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 3 weeks ago

need to work on this a bit more