# problem with IOC container

**URL:** <https://tech-community.robotics.abb.com/t/problem-with-ioc-container/8263>\
**Category:** Developer Tools\
**Tags:** solved\
**Created:** [May 28, 2018, 10:14am UTC](https://tech-community.robotics.abb.com/t/problem-with-ioc-container/8263 "2018-05-28T10:14:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inri](https://avatars.discourse-cdn.com/v4/letter/i/53a042/32.png) [@Inri](https://tech-community.robotics.abb.com/u/Inri)\
**Post date:** [May 28, 2018, 10:14am UTC](https://tech-community.robotics.abb.com/t/problem-with-ioc-container/8263/1 "2018-05-28T10:14:04Z")

</div>

Hello,  
I would like to ask for probably fix or some kind of advice how to fix for this error:  
**Type not found in cache: RobotStudioWrapperLib.Interfaces.IControllerManager.**

I am working on addin, which was working correctly till version 6.07. Since 6.07 I´m getting this error when my plugin is used and then switch to another table(such as Controller, Simulation, Modeling, Home…).

Whole process is like this:  
-user click to my addin(new tab in top menu, next to Add-Ins  
-user click on button on ribbon. here is wpf control with some functionality. At this point is used viewModelLocator  
-user can freely continue to work with addin, everything is ok  
-when user click on any other tab beside addin it throw RS Fatal Error(Unhandled exception) : RobotStudio .NET exception: Type not found in cache: RobotStudioWrapperLib.Interfaces.IControllerManager.

here is Exception from RS:

Base exception: ActivationException  
Type not found in cache: RobotStudioWrapperLib.Interfaces.IControllerManager.  
at GalaSoft.MvvmLight.Ioc.SimpleIoc.DoGetService(Type serviceType, String key, Boolean cache) in c:\MvvmLight\Source\GalaSoft.MvvmLight\GalaSoft.MvvmLight.Extras (PCL)\Ioc\SimpleIoc.cs:line 586  
at GalaSoft.MvvmLight.Ioc.SimpleIoc.GetInstanceTService in c:\MvvmLight\Source\GalaSoft.MvvmLight\GalaSoft.MvvmLight.Extras (PCL)\Ioc\SimpleIoc.cs:line 912  
at ABB.IOF.Config.AddIn.IoAddIn.OnActiveRibbonTabChanged(Object sender, EventArgs e)  
at System.EventHandler.Invoke(Object sender, EventArgs e)  
at ABB.Robotics.RobotStudio.Environment.UIEnvironment.set\_ActiveRibbonTab(RibbonTab value)  
at ABBInternal.StudioAppFramework.RibbonControl.OnMouseDown(MouseEventArgs e)  
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)  
at System.Windows.Forms.Control.WndProc(Message& m)  
at ABBInternal.StudioAppFramework.RibbonControl.WndProc(Message& m)  
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Any ideas?  
When I am debuggoing after this exception whole RS is closed, so it is complicating my life big times.  
in nonDebug mode RS continue to work(After clicking on No option), but still making me uneasy what else this can affect later.

Thanks in advance  
BR Ondrej

---

<div class="post-metadata">

**Author:** ![Inri](https://avatars.discourse-cdn.com/v4/letter/i/53a042/32.png) [@Inri](https://tech-community.robotics.abb.com/u/Inri)\
**Post date:** [June 5, 2018, 5:52am UTC](https://tech-community.robotics.abb.com/t/problem-with-ioc-container/8263/2 "2018-06-05T05:52:45Z")

</div>

**Solved.**  
problem was in my case in one row: ServiceLocator.SetLocatorProvider(() =\> SimpleIoc.Default);  
New version RS probably using Service locator as well so its important to have it separate in every case.
