From 77d23f0856276022a5d8315551670884656ea5a1 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Thu, 22 Jul 2021 15:30:46 -0500 Subject: [PATCH] Fix build break (#56179) Disable the warning until a proper fix can be made. See #56178 --- src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs b/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs index 3827761382a13..927a287da77e1 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs +++ b/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs @@ -192,7 +192,9 @@ private void CreateHostingEnvironment() _hostingEnvironment.ApplicationName = Assembly.GetEntryAssembly()?.GetName().Name; } +#pragma warning disable CA1416 // 'PhysicalFileProvider' is unsupported on: 'browser' https://github.com/dotnet/runtime/issues/56178 _hostingEnvironment.ContentRootFileProvider = _defaultProvider = new PhysicalFileProvider(_hostingEnvironment.ContentRootPath); +#pragma warning restore CA1416 // 'PhysicalFileProvider' is unsupported on: 'browser' } private string ResolveContentRootPath(string contentRootPath, string basePath)