How to load assemblies in ASP.NET Core 1.0 RC2
<p>I am migrating my web app from ASP.NET Core RC1 to RC2. I'm trying to load my referenced class libraries.</p>

<p>This code snippet doesn't work with RC2 any more:</p>

<pre><code>public class Startup
{  
    public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
    {
        // libraryManager is null .... 
        ILibraryManager libraryManager = app.GetService&lt;ILibraryManager&gt;();

        List&lt;Assembly&gt; result = new List&lt;Assembly&gt;();

        IEnumerable&lt;Library&gt; libraries = libraryManager.GetLibraries();

        IEnumerable&lt;AssemblyName&gt; assemblyNames = libraries.SelectMany(e =&gt; e.Assemblies).Distinct();
        assemblyNames = Enumerable.Where(assemblyNames, e =&gt; e.Name.StartsWith("projectNamespace"));

        foreach (AssemblyName assemblyName in assemblyNames)
        {
            Assembly assembly = Assembly.Load(assemblyName);
            .
            .
            .
        }
    }
}
</code></pre>