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 want to load a DLL from different paths from executing directory and resolve from this DLL. But Castle.Windsor throw this exception
Castle.MicroKernel.SubSystems.Conversion.ConverterException: 'Could not convert string 'EngineA.AClass, EngineA' to a type. Assembly EngineA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null was matched, but it doesn't contain the type. Make sure that the type name was not mistyped.'
at Castle.MicroKernel.SubSystems.Conversion.TypeNameConverter.GetType(String name) in C:\Users\name\Source\Repos\Windsor\src\Castle.Windsor\MicroKernel\SubSystems\Conversion\TypeNameConverter.cs:line 125
at Castle.MicroKernel.SubSystems.Conversion.TypeNameConverter.PerformConversion(String value, Type targetType) in C:\Users\name\Source\Repos\Windsor\src\Castle.Windsor\MicroKernel\SubSystems\Conversion\TypeNameConverter.cs:line 72
at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion(String value, Type targetType) in C:\Users\name\Source\Repos\Windsor\src\Castle.Windsor\MicroKernel\SubSystems\Conversion\DefaultConversionManager.cs:line 106
at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion[TTarget](String value) in C:\Users\name\Source\Repos\Windsor\src\Castle.Windsor\MicroKernel\SubSystems\Conversion\DefaultConversionManager.cs:line 134
at Castle.Windsor.Installer.DefaultComponentInstaller.GetType(IConversionManager converter, String typeName) in C:\Users\name\Source\Repos\Windsor\src\Castle.Windsor\Windsor\Installer\DefaultComponentInstaller.cs:line 228
at Castle.Windsor.Installer.DefaultComponentInstaller.SetUpComponents(IConfiguration[] configurations, IWindsorContainer container, IConversionManager converter) in C:\Users\name\Source\Repos\Windsor\src\Castle.Windsor\Windsor\Installer\DefaultComponentInstaller.cs:line 183
at Castle.Windsor.Installer.DefaultComponentInstaller.SetUp(IWindsorContainer container, IConfigurationStore store) in C:\Users\name\Source\Repos\Windsor\src\Castle.Windsor\Windsor\Installer\DefaultComponentInstaller.cs:line 50
at Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers, DefaultComponentInstaller scope) in C:\Users\name\Source\Repos\Windsor\src\Castle.Windsor\Windsor\WindsorContainer.cs:line 323
at Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers) in C:\Users\name\Source\Repos\Windsor\src\Castle.Windsor\Windsor\WindsorContainer.cs:line 453
at Reflection.Program.Main(String[] args) in C:\Users\name\Source\Repos\Reflection\Reflection\Program.cs:line 26
publicstaticvoidMain(string[]args){IWindsorContainercontainer=new WindsorContainer();//container.Install(FromAssembly.InDirectory(new AssemblyFilter("C:\\Users\\name\\Source\\Repos\\Reflection\\EngineA\\bin\\Release"))); // dll in this directory
container.Install(Configuration.FromXmlFile("C:\\Users\\name\\Source\\Repos\\Reflection\\Reflection\\CastleInstallerConfig.xml"));// xml path. throw exception from thisIClassaa= container.Resolve<IClass>();stringres= aa.DoSomethings();
Console.WriteLine(res);}
Class and interface are as follows:
// It's in the EngineA.dllnamespaceEngineA{publicclassAClass:IClass{publicstringDoSomethings(){return"FromEngineA";}}}
It's in Reflection.exe
namespace Reflection
{publicinterfaceIClass{stringDoSomethings();}}
When I moved Engine.dll to the same folder as Reflection.exe , it can be work and not throw exception.
The text was updated successfully, but these errors were encountered:
Hi,
I want to load a DLL from different paths from executing directory and resolve from this DLL. But Castle.Windsor throw this exception
It is XML config file:
It's main method
Class and interface are as follows:
When I moved Engine.dll to the same folder as Reflection.exe , it can be work and not throw exception.
The text was updated successfully, but these errors were encountered: