RegisterTaskObject/GetRegisteredTaskObject should be AssemblyLoadContext aware
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
Today, RegisterTaskObject/GetRegisteredTaskObject use a string key in a flat namespace that's available to all tasks. Now that tasks get AssemblyLoadContext isolation, that can result in a stored object being retrieved in a different context and failing to cast--like #5080 but across task assemblies (even if they have compatible references).
I don't know if anyone uses this pattern; it'd be pretty hard to coordinate the store/retrieve/cast types even in the old world (on Core they would have been force-unified; on Framework you could have different versions of a type in the different tasks and have the same cast problem).
Ideally this would work if the types were compatible, but it would probably be ok to GetRegisteredTaskObject to consider the ALC of its caller (is that even possible?) and return nothing if there's no match.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.