I'm facing Detected some kind of bi-directional dependency while trying to discover and plan a missing service registration. Examining types: System.Uri upon Container instanciation, but can't understand why.
Am I misusing Ctor usage ?
I'm using a dotnet core 2.1 console application with the latest Lamar version (3.0.3)
interface IInjectionIssue { }
class InjectionIssue : IInjectionIssue
{
public InjectionIssue(Uri uri) { }
}
class Program
{
static void Main(string[] args)
{
IContainer container = new Container(x =>
{
//breaks
x.For<IInjectionIssue>()
.Use<InjectionIssue>()
.Ctor<Uri>().Is(new Uri("http://localhost:9200"));
//works
x.For<IInjectionIssue>()
.Use(new InjectionIssue(new Uri("http://localhost:9200")));
});
}
}
Hello there,
I'm facing
Detected some kind of bi-directional dependency while trying to discover and plan a missing service registration. Examining types: System.Uri
uponContainer
instanciation, but can't understand why. Am I misusingCtor
usage ?I'm using a dotnet core 2.1 console application with the latest Lamar version (3.0.3)