You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using Windsor container with config via new WindsorContainer("path_to_config") for a while in NetFramework till we've decided migrate to Net6. And in Net6 it doesn't work anymore. I can load class from dll only if that dll is referenced from my program.
If I remove reference - I get error
Exception: Castle.MicroKernel.SubSystems.Conversion.ConverterException: Could not convert string 'ClassLibrary.TestClass, ClassLibrary' to a type. Assembly was not found. Make sure it was deployed and the name was not mistyped.
at Castle.MicroKernel.SubSystems.Conversion.TypeNameConverter.GetType(String name)
at Castle.MicroKernel.SubSystems.Conversion.TypeNameConverter.PerformConversion(String value, Type targetType)
at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion(String value, Type targetType)
at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion[TTarget](String value)
at Castle.Windsor.Installer.DefaultComponentInstaller.GetType(IConversionManager converter, String typeName)
at Castle.Windsor.Installer.DefaultComponentInstaller.SetUpComponents(IConfiguration[] configurations, IWindsorContainer container, IConversionManager converter)
at Castle.Windsor.Installer.DefaultComponentInstaller.SetUp(IWindsorContainer container, IConfigurationStore store)
at Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers, DefaultComponentInstaller scope)
at Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers)
That is a client code:
try
{
var container = new WindsorContainer();
container.Install(Configuration.FromXmlFile("config.xml"));
var driver = container.Resolve<IDriver>();
driver.Start();
}
catch (Exception ex)
{
Console.WriteLine($"Exception: {ex}!");
}
If I add reference to ClassLibrary.dll - all works as expected.
I'm using Castle.Windsor 5.1.2 from nuget
I've tried to examine source code and didn't find any tries to load dll from config dinamically.
So, is that a changed behavior? Or, may be, I missed some special option/property/whatever? Is it still possible to load dll dynamically via config file, without reference to dll?
The text was updated successfully, but these errors were encountered:
I have been using Windsor container with config via new WindsorContainer("path_to_config") for a while in NetFramework till we've decided migrate to Net6. And in Net6 it doesn't work anymore. I can load class from dll only if that dll is referenced from my program.
If I remove reference - I get error
Exception: Castle.MicroKernel.SubSystems.Conversion.ConverterException: Could not convert string 'ClassLibrary.TestClass, ClassLibrary' to a type. Assembly was not found. Make sure it was deployed and the name was not mistyped.
at Castle.MicroKernel.SubSystems.Conversion.TypeNameConverter.GetType(String name)
at Castle.MicroKernel.SubSystems.Conversion.TypeNameConverter.PerformConversion(String value, Type targetType)
at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion(String value, Type targetType)
at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion[TTarget](String value)
at Castle.Windsor.Installer.DefaultComponentInstaller.GetType(IConversionManager converter, String typeName)
at Castle.Windsor.Installer.DefaultComponentInstaller.SetUpComponents(IConfiguration[] configurations, IWindsorContainer container, IConversionManager converter)
at Castle.Windsor.Installer.DefaultComponentInstaller.SetUp(IWindsorContainer container, IConfigurationStore store)
at Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers, DefaultComponentInstaller scope)
at Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers)
That is a client code:
That is a config.xml file:
If I add reference to ClassLibrary.dll - all works as expected.
I'm using Castle.Windsor 5.1.2 from nuget
I've tried to examine source code and didn't find any tries to load dll from config dinamically.
So, is that a changed behavior? Or, may be, I missed some special option/property/whatever? Is it still possible to load dll dynamically via config file, without reference to dll?
The text was updated successfully, but these errors were encountered: