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);