This project has moved and is read-only. For the latest updates, please go here.


Issue with SimpleIoc public void Unregister<TClass>(TClass instance)


The descrpition states that the Unregister instance method simply removes the instance and allows SimpleIoc to create a new instance of the class when it is called again. When unregistering, and trying to create a new instance, an exception occurs.

I've looked into the code and have found that during the Unregister procedure, the factory is also removed which prevents SimpleIoc from creating a new instance. After commenting this bit out, it works. Not sure if there are any further issues that could stem from commenting this out though...
Closed Feb 15, 2015 at 6:13 PM by lbugnion


llewelynrex wrote May 8, 2014 at 5:22 PM

Issue seems to be contained in the "public void Unregister<TClass>(string key)" method as well.

lbugnion wrote Feb 6, 2015 at 9:46 AM

For more info on this issue and the (upcoming) fix, see

lbugnion wrote Feb 6, 2015 at 3:37 PM

Fixed in V5.1 (upcoming)

lbugnion wrote Feb 6, 2015 at 5:12 PM

DLLs are available here:

Nuget will be updated ASAP.