diff --git a/Microsoft.Blazor.Server.Test/ReferencedAssemblyFileProviderTest.cs b/Microsoft.Blazor.Server.Test/ReferencedAssemblyFileProviderTest.cs index 7482f8dccb..5ef483f062 100644 --- a/Microsoft.Blazor.Server.Test/ReferencedAssemblyFileProviderTest.cs +++ b/Microsoft.Blazor.Server.Test/ReferencedAssemblyFileProviderTest.cs @@ -16,11 +16,9 @@ namespace Microsoft.Blazor.Server.Test [Fact] public void RootDirContainsOnlyBinDir() { - var (entrypoint, entrypointData) = GetBclAssemblyForTest("mscorlib"); var provider = new ReferencedAssemblyFileProvider( - entrypoint, - entrypointData, - MonoStaticFileProvider.BclFiles); + "mscorlib", + new ReferencedAssemblyResolver(MonoStaticFileProvider.BclFiles, string.Empty)); Assert.Collection(provider.GetDirectoryContents("/"), item => { Assert.Equal("/_bin", item.PhysicalPath); @@ -31,11 +29,9 @@ namespace Microsoft.Blazor.Server.Test [Fact] public void FindsReferencedAssemblyGraphSimple() { - var (entrypoint, entrypointData) = GetBclAssemblyForTest("System.Linq.Expressions"); var provider = new ReferencedAssemblyFileProvider( - entrypoint, - entrypointData, - MonoStaticFileProvider.BclFiles); + "System.Linq.Expressions", + new ReferencedAssemblyResolver(MonoStaticFileProvider.BclFiles, string.Empty)); var contents = provider.GetDirectoryContents("/_bin").OrderBy(i => i.Name).ToList(); Assert.Collection(contents, item => { Assert.Equal("/_bin/mscorlib.dll", item.PhysicalPath); }, @@ -48,11 +44,12 @@ namespace Microsoft.Blazor.Server.Test public void FindsReferencedAssemblyGraphRealistic() { // Arrange - var standaloneAppAssemblyLocation = typeof(StandaloneApp.Program).Assembly.Location; + var standaloneAppAssembly = typeof(StandaloneApp.Program).Assembly; var provider = new ReferencedAssemblyFileProvider( - AssemblyDefinition.ReadAssembly(standaloneAppAssemblyLocation), - File.ReadAllBytes(standaloneAppAssemblyLocation), - MonoStaticFileProvider.BclFiles); + standaloneAppAssembly.GetName().Name, + new ReferencedAssemblyResolver( + MonoStaticFileProvider.BclFiles, + Path.GetDirectoryName(standaloneAppAssembly.Location))); var expectedContents = new[] { /* diff --git a/samples/HostedInAspNet.Server/Startup.cs b/samples/HostedInAspNet.Server/Startup.cs index 92ceba8905..1729f0bce0 100644 --- a/samples/HostedInAspNet.Server/Startup.cs +++ b/samples/HostedInAspNet.Server/Startup.cs @@ -25,7 +25,7 @@ namespace HostedInAspNet.Server app.UseBlazorDevelopmentServer("../HostedInAspNet.Client"); } - app.UseBlazor(clientAssembly: typeof(Client.Program).Assembly); + app.UseBlazor(clientAssemblyPath: typeof(Client.Program).Assembly.Location); } } } diff --git a/samples/MonoSanity/Startup.cs b/samples/MonoSanity/Startup.cs index d40144e6fe..baa1b9db57 100644 --- a/samples/MonoSanity/Startup.cs +++ b/samples/MonoSanity/Startup.cs @@ -3,9 +3,6 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using MonoSanityClient; -using System.IO; -using System.Net.Mime; namespace MonoSanity { @@ -15,7 +12,7 @@ namespace MonoSanity { app.UseDeveloperExceptionPage(); app.UseFileServer(); - app.UseBlazor(clientAssembly: typeof(MonoSanityClient.Examples).Assembly); + app.UseBlazor(clientAssemblyPath: typeof(MonoSanityClient.Examples).Assembly.Location); } } } diff --git a/samples/StandaloneApp/wwwroot/index.html b/samples/StandaloneApp/wwwroot/index.html index 715729c43c..048bb1aa3f 100644 --- a/samples/StandaloneApp/wwwroot/index.html +++ b/samples/StandaloneApp/wwwroot/index.html @@ -6,6 +6,7 @@