UnityExtensions references ServiceLocation, bindingRedirect doesn't help

After doing an update of all NuGet packages, one of my applications began crashing on start-up with a FileLoadException: Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Versio...

Id #12767 | Release: None | Updated: Mon at 10:29 PM by CharlieHess | Created: Mon at 10:29 PM by CharlieHess

Reference required to assembly 'System.Runtime...'

This is a very odd error. It pops up sporadically, with no apparent cause. So here is what I did: I have a WPF application that targets .NET 4.5 I installed Unity from NuGet, and added a contain...

Id #12766 | Release: None | Updated: Oct 8 at 6:19 PM by cjrogala | Created: Oct 8 at 6:19 PM by cjrogala

Unity Container | Register Instance in XML Configuration

I need to register types in Unity.Config file and have this issue where remote object cannot be registered when done from the XML Configuration file. For e.g: This works var test=AccessorHelper....

Id #12765 | Release: None | Updated: Sep 22 at 2:49 AM by randylevy | Created: Sep 19 at 6:51 PM by RMK_P

Unity doesn’t work on real device in Xamarin.iOS (only in the simulator)

The Unity container doesn’t work on real device in Xamarin.iOS. It works fine only the simulator. I get following two errors, if I try to start my simple test project on iPhone (iOS 7.1): Error 1...

Id #12764 | Release: None | Updated: Aug 25 at 6:52 AM by MarianG | Created: Aug 23 at 8:01 AM by MarianG

parameterless public constructor

"An error occurred when trying to create a controller of type 'AirTimeController'. Make sure that the controller has a parameterless public constructor."

Id #12763 | Release: None | Updated: Aug 8 at 10:23 AM by dot_NET_Junkie | Created: Aug 6 at 6:47 PM by King007

Concurrency bug and memory leak in UnityServiceLocator

The constructor of the UnityServiceLocator class calls the container.RegisterInstance method to register itself and in doing that it creates both a concurrency bug and a memory leak, since the use...

Id #12762 | Release: None | Updated: Jul 21 at 1:01 PM by qujck | Created: Jul 21 at 9:35 AM by dot_NET_Junkie

Inconsistent Lazy<T> behaviour when resolving dependency

public class Bar {} public class Foo { public Foo(Bar b) { ; } } public class ChildBar : Bar {} unityContainer.RegisterInstance<Bar> ( new ChildBar() ); unityContainer.Resolve<Foo>(); // ret...

Id #12761 | Release: None | Updated: Jul 18 at 9:49 AM by clynamen | Created: Jul 18 at 9:35 AM by clynamen

Exception when registering UnityPerRequestHttpModule with MVC 5

I use Unity3 with MVC5, and need per request life time manager. However, when I launch the web app, I got server error saying "Cannot register a module after the application has been initialized." ...

Id #12760 | Release: None | Updated: Jul 17 at 5:37 PM by luizfbicalho | Created: Jul 17 at 2:20 AM by bargitta

container.RegisterInstance failed for COM interfaces

.Net 4.5.1 Microsoft.Practices.Unity.dll, v3.5 IComObj1 obj1 = new ComObj1Class(); IComObj2 obj2 = obj1.GetObj2(); _container.RegisterInstance<IComObj2>(obj2); // it failed with System.Argumen...

Id #12759 | Release: None | Updated: Sep 4 at 11:53 AM by olgierd15 | Created: May 26 at 1:15 PM by TimSolovyov

Adding the Package to a Visual Basic project inject two C# classes

I believe it is descriptive, but just to clarify, UnityMvcActivator.cs and UnityConfig.cs are in the Project. Of course, written in C# language. Regards

Id #12758 | Release: None | Updated: May 16 at 12:49 AM by randylevy | Created: May 15 at 2:46 PM by Dani_Seara