In order to create a new class instance by config file. I use Unity.configuration. and Unity(5.10.2).
I used the latest version of "5.10.0" in .net core 2.2 console application. It threw exception for the following code:
using (var container = new UnityContainer()) { UnityConfigurationSection section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity"); section.Configure(container, "Default");// threw exception in this line }
Below the exception:
System.InvalidOperationException HResult=0x80131509 Message=The type name or alias **** could not be resolved.Please check your configuration file and verify this type name. Source=Unity.Configuration StackTrace: at Microsoft.Practices.Unity.Configuration.ConfigurationHelpers.TypeResolverImpl.ResolveType(String typeNameOrAlias, Boolean throwIfResolveFails) at Microsoft.Practices.Unity.Configuration.RegisterElement.ConfigureContainer(IUnityContainer container) at Microsoft.Practices.Unity.Configuration.ContainerElement.ConfigureContainer(IUnityContainer container) at Microsoft.Practices.Unity.Configuration.UnityConfigurationSection.Configure(IUnityContainer container, String configuredContainerName)
The same code work fine in .net 4.6.
does it not support .netcore2.2? May I know when will release the new version which support .netcore 2.2?
In order to create a new class instance by config file. I use Unity.configuration. and Unity(5.10.2).
I used the latest version of "5.10.0" in .net core 2.2 console application. It threw exception for the following code:
using (var container = new UnityContainer()) { UnityConfigurationSection section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity"); section.Configure(container, "Default");// threw exception in this line }
Below the exception:
System.InvalidOperationException HResult=0x80131509 Message=The type name or alias **** could not be resolved.Please check your configuration file and verify this type name. Source=Unity.Configuration StackTrace: at Microsoft.Practices.Unity.Configuration.ConfigurationHelpers.TypeResolverImpl.ResolveType(String typeNameOrAlias, Boolean throwIfResolveFails) at Microsoft.Practices.Unity.Configuration.RegisterElement.ConfigureContainer(IUnityContainer container) at Microsoft.Practices.Unity.Configuration.ContainerElement.ConfigureContainer(IUnityContainer container) at Microsoft.Practices.Unity.Configuration.UnityConfigurationSection.Configure(IUnityContainer container, String configuredContainerName)
The same code work fine in .net 4.6.does it not support .netcore2.2? May I know when will release the new version which support .netcore 2.2?
thank you so much
@ENikS