Microsoft.IdentityModel and Microsoft.IdentityModel.Extensions nuget required for A/B testing to list KPI's

Vote:
 

I had to install the Microsoft.IdentityModel.Extensions and Microsoft.IdentityModel nuget packages for the IKpi implementations to be listed.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at System.Linq.Enumerable.d__16`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at EPiServer.Marketing.Testing.Web.Repositories.KpiWebRepository.GetKpiTypes()
at EPiServer.Marketing.Testing.Web.Controllers.KpiStore.Get()

using "EPiServer.Marketing.Testing" version="2.2.3"

#178124
May 02, 2017 15:42
Vote:
 

hi,

I got the same problem right now, but thoose 2 nugets did not help. frown

#178529
May 12, 2017 15:31
Vote:
 

For me it was an obsolete nuget package, Microsoft.AspNet.SignalR.Owin. 

I wrote small method based on how EPiServer.Marketing.Testing.Web.Repositories.KpiWebRepository.GetKpiTypes() gets its types.

Published as gist:
https://gist.github.com/perhemmingson/05d5b94b371558b6dfc1f52406f56c7a

public void TestForLoaderExceptions()
        {
            try
            {
                ((IEnumerable<Assembly>)AppDomain.CurrentDomain.GetAssemblies())
                    .SelectMany<Assembly, Type>((Func<Assembly, IEnumerable<Type>>)(s => (IEnumerable<Type>)s.GetTypes())).ToList();
            }
            catch (ReflectionTypeLoadException e)
            {
                foreach (var e2 in e.LoaderExceptions)
                {
                    Console.WriteLine(e2);
                }
            }
        }
#178612
May 15, 2017 15:54