In the .NET 4.6 project, we used castle Windsor as a Dependency resolver.
The following code resolves all the dependencies within the current project.
IWindsorContainer container = new WindsorContainer().Install(Configuration.FromAppConfig());
var service = container.Resolve<IInterfaceSerice>();
We are upgrading this to .NET 6/7 and Configuration.FromAppConfig() not supported in .NET latest version.
Is there a quick way to register the current assembly and all its dependencies without registering each component one by one?
Error "Configuration does not contain a definition for 'FromAppConfig'
The XML configuration is still supported, however it's a holdover from the old Windsor since the Fluent API is more powerful. Here's a fix:
You may want to separate your XML registrations into another file which could simplify the xml file name.
For future reference, you could look into moving your XML config to the fluent API while still keeping the assembly scanning (docs).