We have some services in our project which we recently ported to .NetCore 3.0. Additionally, since StructureMap is to be sunset, we removed all references and are moving to Lamar since it was the fastest to migrate to. When bootstrapping, one of the service throws "System.NullReferenceException: 'Object reference not set to an instance of an object". Ofcourse I rewrote the registry classes for Lamar. I couldnt find any helpful Diagnosis methods in Lamar to find the source of an error. Please let me know if someone could guide me how to trap the source of the error because now the call stack just provides the the Bootstrap init call as the source of error. We look for all assemblies with a certain string in Assembly name eg: "Project-Name"
var container = new Container(x =>
x.Scan(y =>
{
// Scan all DLLs for Registries
y.AssembliesFromApplicationBaseDirectory(
assembly =>
{
if (assembly.FullName.Contains("Project-Name"))
{
return true;
}
return false;
});
y.LookForRegistries();
}));