I've been reading about how ASP.NET Web API looks up the locations of controllers in assemblies, and ways to dynamically add a new assembly to look in. So far this has all been fine, except I've noticed a few random references to how the controller cache will ignore loading any controller that lives in a dynamic assembly (.IsDynamic == true), and some workarounds to force it to work with a dynamic assembly.
However, I can't find any documentation as to the why. Is this just an implementation decision by the ASP.NET team, or is there something more fundamental about this that having a dynamically generated assembly would cause real trouble or breaking something?
Any insights or links to docs that could shed some light on this? I have some guesses, but I'm curious to know the real reasons.
I want to be completely clear that I'm not having trouble making any of this work, I'm wondering why this design route was taken and what caveats accompany it.
Links:
https://www.strathweb.com/2013/08/customizing-controller-discovery-in-asp-net-web-api/ - specifically references a way to work with dynamic assemblies and that they would be ignored otherwise
https://stackoverflow.com/questions/28567070/simple-injector-container-fails-to-register-web-api-controller-from-pluggedin-ex - a SO question that lists making sure the assembly is not dynamic in troubleshooting steps.