Closed maxisoft closed 3 years ago
Sorry for the long delay here. The little fix for this will be in the next Lamar release. How do you even manage that? That code came straight over from StructureMap, so it's been in use since about '08 w/o anybody hitting this.
Hello,
Lamar 4.4.0
doesn't handle scanning assemblies containing any classes without namespace. It crash with aNullReferenceException
.I know it's a bad practice to not use a namespace. But i guess crashing on this case shouldn't be the expected behavior in Lamar. Or at least it should crash in a better documented way :)
For some context: I built a simple plugin system using Roslyn and Lamar. This issue prevent one to write quick and dirty plugins classes (eg without namespace), also it took me some time to figure out why the app was crashing.
To reproduce I use this simple container:
Gist with minimal sample Program.cs to reproduce crash
Here's the stack trace