From 938908f0d74ed57d38a08e94108b2fa2563e55e8 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 8 Nov 2019 05:51:02 -0600 Subject: [PATCH] ManifestEmbeddedFileProvider assembly (#15580) --- aspnetcore/fundamentals/file-providers.md | 6 +++--- .../samples/2.x/FileProviderSample/Startup.cs | 2 +- .../samples/3.x/FileProviderSample/Startup.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aspnetcore/fundamentals/file-providers.md b/aspnetcore/fundamentals/file-providers.md index 5d4fb9bb71..f8b0217a32 100644 --- a/aspnetcore/fundamentals/file-providers.md +++ b/aspnetcore/fundamentals/file-providers.md @@ -5,7 +5,7 @@ description: Learn how ASP.NET Core abstracts file system access through the use monikerRange: '>= aspnetcore-2.1' ms.author: riande ms.custom: mvc -ms.date: 10/07/2019 +ms.date: 11/07/2019 uid: fundamentals/file-providers --- # File Providers in ASP.NET Core @@ -99,7 +99,7 @@ The sample app creates an `ManifestEmbeddedFileProvider` and passes the currentl ```csharp var manifestEmbeddedProvider = - new ManifestEmbeddedFileProvider(Assembly.GetEntryAssembly()); + new ManifestEmbeddedFileProvider(typeof(Program).Assembly); ``` Additional overloads allow you to: @@ -246,7 +246,7 @@ The sample app creates an `ManifestEmbeddedFileProvider` and passes the currentl ```csharp var manifestEmbeddedProvider = - new ManifestEmbeddedFileProvider(Assembly.GetEntryAssembly()); + new ManifestEmbeddedFileProvider(typeof(Program).Assembly); ``` Additional overloads allow you to: diff --git a/aspnetcore/fundamentals/file-providers/samples/2.x/FileProviderSample/Startup.cs b/aspnetcore/fundamentals/file-providers/samples/2.x/FileProviderSample/Startup.cs index a786d4ff2f..9713516d5c 100644 --- a/aspnetcore/fundamentals/file-providers/samples/2.x/FileProviderSample/Startup.cs +++ b/aspnetcore/fundamentals/file-providers/samples/2.x/FileProviderSample/Startup.cs @@ -24,7 +24,7 @@ namespace FileProviderSample #region snippet1 var physicalProvider = _env.ContentRootFileProvider; var manifestEmbeddedProvider = - new ManifestEmbeddedFileProvider(Assembly.GetEntryAssembly()); + new ManifestEmbeddedFileProvider(typeof(Program).Assembly); var compositeProvider = new CompositeFileProvider(physicalProvider, manifestEmbeddedProvider); diff --git a/aspnetcore/fundamentals/file-providers/samples/3.x/FileProviderSample/Startup.cs b/aspnetcore/fundamentals/file-providers/samples/3.x/FileProviderSample/Startup.cs index da32125041..aa80dff1ba 100644 --- a/aspnetcore/fundamentals/file-providers/samples/3.x/FileProviderSample/Startup.cs +++ b/aspnetcore/fundamentals/file-providers/samples/3.x/FileProviderSample/Startup.cs @@ -23,7 +23,7 @@ namespace FileProviderSample #region snippet1 var physicalProvider = _env.ContentRootFileProvider; var manifestEmbeddedProvider = - new ManifestEmbeddedFileProvider(Assembly.GetEntryAssembly()); + new ManifestEmbeddedFileProvider(typeof(Program).Assembly); var compositeProvider = new CompositeFileProvider(physicalProvider, manifestEmbeddedProvider);