0
votes

I was using Unity version 4.0.1 and I updated to the version 5.8.11
I had this line working before the update

using Microsoft.Practices.Unity;

class Bootstrapper : UnityBootstrapper
{
    protected override void ConfigureContainer()
    {
        base.ConfigureContainer();
        this.Container.RegisterInstance<Manager>(new Manager());
    }
}

There was no problem with RegisterInstance Method because I was using the Microsoft.Practices.Unity namespace. But after the update, the code is not compiled anymore. I really searched and I found that there was a break for the compatibility between the two version, but I can not figure out the solution.

update using the Unity namespace did not work. I still received the same compile time error

The type 'IUnityContainer' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f'.

update updating Unity without updating Prism still cause the same problem, but interestingly, updating prism without updating Unity does not cause a problem.

1

1 Answers

1
votes

The namespace is just Unity in version 5.8.11:

using Unity;

...but you can't update just Unity without updating Prism. Your version of Prism is not compatible with this version of Unity.