I’m in the process of trying to update a bunch of NuGet packages in my solution and I’ve been avoiding updating Unity for a while. I’m close to having it updated to 5.x but I’m having trouble getting it to work with Hangfire.
My code looks like this:
var container = new Unity.UnityContainer(); ... GlobalConfiguration.Configuration.UseUnityActivator(container); <-- line 52
I’m getting this error:
Severity Code Description Project File Line Suppression State
Error CS0012 The type ‘IUnityContainer’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘Unity.Abstractions, Version=22.214.171.124, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f’. MyProj C:*****\App_Start\HangFireConfig.cs 52 Active
I suspect it’s some kind of version dependency either artificial (meaning it would work if the explicit requirement was not specified) or real (meaning the code needs to change before it supports it).
Any help would be greatly appreciated.