Closed ekalchev closed 2 months ago
Basically this part of the registration
.Bind().As(Singleton).To<TelemetryRuntime>(ctx =>
{
ctx.Inject(out IDeploymentContext deploymentContext);
ctx.Inject(out Microsoft.Extensions.Configuration.IConfiguration configuration);
TelemetryRuntimeParameters parameters = new TelemetryRuntimeParameters(
"MobiSystems.ServiceHost",
configuration["TelemetryHost"],
configuration["BuildType"],
deploymentContext.DeploymentType.GetDeploymentTypeName(),
(_) => true);
return new TelemetryRuntime(parameters);
})
this line
ctx.Inject(out Microsoft.Extensions.Configuration.IConfiguration configuration);
should generate source code that calls
EnsureExistenceOf_singletonAppConfigurationM05D20di35
But it doesn't
Fixed in 2.1.20
I have this registration code
I am getting null reference exception at
It says localConfigurationM05D20di8 is null.
Seems to me that generated code is incorrect. If you look at line 179 EnsureExistenceOf_singletonSentryIOTelemetryM05D20di36(); there is nothing to instantiate AppConfiguration instance localConfigurationM05D20di8.