Skip to content
New issue

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

It does not support .netcore2.2? #17

Open
273299007 opened this issue Apr 2, 2019 · 1 comment
Open

It does not support .netcore2.2? #17

273299007 opened this issue Apr 2, 2019 · 1 comment
Labels
Requires Investigation 👮 Requires further verification

Comments

@273299007
Copy link

273299007 commented Apr 2, 2019

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

@jrilheu
Copy link

jrilheu commented Nov 27, 2019

Hi,

How about use the default DI implemented by ASP Net Core? we used and load types from the appsettings.json file.

@ENikS ENikS added this to the Bugs and Questions milestone Apr 3, 2020
@ENikS ENikS added the Requires Investigation 👮 Requires further verification label Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Requires Investigation 👮 Requires further verification
Projects
None yet
Development

No branches or pull requests

3 participants