Unity's ResolutionFailedException

I have an old Asp.Net web application using Unity for dependency injection. Today I updated the Unity using NuGet to the latest version. On trying to run the application, I am getting an exception:

Unity.Exceptions.ResolutionFailedException: 'Resolution of the dependency failed, type = ‘SOME.Services.ISomeService’, name = ‘(none)’. Exception occurred while: while resolving. Exception is: InvalidOperationException - The property converter on type DAL.Repositories.SomeRepository is not settable.

The exception happened on line

_someService = container.Resolve();

I am very new to Unity. Could you please help?

You’ve got your Unity’s mixed up. This forum is for Unity 3D, a game building engine. You’re looking for support for Unity the IoC container.

I would suggest asking on the msdn bcl forums or on stackoverflow with the unity-container tag.

That said, it sounds like you are trying to use property injection but the property that needs setting is read only.
Why are you upgrading Unity? Why not just use the old version?

1 Like

Thank you for your answer. Unfortunately, nobody answered at stack overflow.
I guess, I will have to get back to the older version…