I have a (Core RC1) web project that has a dependency listed in the project.json. However, it appears that the compiler is optimizing it out as an assembly that is not directly referenced (We're using the Interfaces that the concrete classes implement).
I'm loading the dependency in by iterating over the assemblies loaded through
AppDomain.CurrentDomain.GetAssemblies()
.Where(x => x.Firstname.StartsWith("orgPrefix")
and then calling Assembly.Load()
and
builder.RegisterAssemblyTypes(assembly).AsSelf()
.AsImplementedInterfaces();
Is there anyway to mark a dependency to not be optimized out by the compiler?