We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See the original ticket in the dotnet runtime repository: dotnet/runtime#104372
How I use the LightInject container in our dotnet8 asp.net core api project
var builder = WebApplication.CreateBuilder(args); builder.Host .UseLightInject() .ConfigureContainer<ServiceContainer>(container => { ConfigureContainer(container); ConfigureServicesWithContainer(container, builder.Services);//Add services to the container. }); var app = builder.Build(); //Results in the exception ... void ConfigureContainer(IServiceContainer container) { //Bootstrap container //https://www.lightinject.net/#assembly-scanning var dllFilePaths = Directory.GetFiles(AppContext.BaseDirectory, "MyNamespace.*.dll"); foreach (var dllFilePath in dllFilePaths) { var assembly = Assembly.LoadFrom(dllFilePath); container.RegisterAssembly(assembly); } //Add/override registrations container.RegisterSingleton<AppSettings>(factory => AppSettingsFactory.Create()); }
Should this be:
Thanks
The text was updated successfully, but these errors were encountered:
Seems like the bug is resolved: dotnet/roslyn#74676
(will be released under milestone 17.12)
Sorry, something went wrong.
No branches or pull requests
See the original ticket in the dotnet runtime repository:
dotnet/runtime#104372
How I use the LightInject container in our dotnet8 asp.net core api project
Should this be:
Thanks
The text was updated successfully, but these errors were encountered: