JasperFx / lamar

Fast Inversion of Control Tool and Successor to StructureMap
https://jasperfx.github.io/lamar
MIT License
563 stars 118 forks source link

.NET 5 web app with .AddHttpClient() Causes issue when running WhatDoIHave() #284

Closed MrKevHunter closed 3 years ago

MrKevHunter commented 3 years ago

I have created a clean repo here recreating the issue

https://github.com/MrKevHunter/LamarHttpClientIssue

It crashes on startup because it's attempting to split the word Client with `

from

https://github.com/aspnet/HttpClientFactory/blob/master/src/Microsoft.Extensions.Http/DefaultTypedHttpClientFactory.cs#L45

everything is fine if you comment out the services.AddHttpClient();

but if its there, i think this line causes the issue

https://github.com/aspnet/HttpClientFactory/blob/master/src/Microsoft.Extensions.Http/DependencyInjection/HttpClientFactoryServiceCollectionExtensions.cs#L44