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 5:13 PM by lbugnion


llewelynrex wrote May 8, 2014 at 4:22 PM

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

lbugnion wrote Feb 6, 2015 at 8:46 AM

For more info on this issue and the (upcoming) fix, see https://mvvmlight.codeplex.com/discussions/483764

lbugnion wrote Feb 6, 2015 at 2:37 PM

Fixed in V5.1 (upcoming)

lbugnion wrote Feb 6, 2015 at 4:12 PM

DLLs are available here:

Nuget will be updated ASAP.