Description
When resolving an object via Microsoft Unity, if you have code such as the following...
var myObj = Sitecore.Ecommerce.Context.Entity.Resolve<SomeType>();
... you may see the following error when attempting to compile:
error CS0308: The non-generic method 'Microsoft.Practices.Unity.IUnityContainer.Resolve(System.Type, string, params Microsoft.Practices.Unity.ResolverOverride[])' cannot be used with type arguments
Cause
The syntax you are utilizing requires importing extension methods from the Microsoft.Practices.Unity namespace.
Solution
Ensure your project references the Microsoft.Practices.Unity assembly, and add the following to your class file:
using Microsoft.Practices.Unity;
Comments