From aa4b2f0b0513a9fbf28387d20d553db74600f616 Mon Sep 17 00:00:00 2001 From: Aleksey Kliger <alklig@microsoft.com> Date: Tue, 24 Jan 2023 09:55:08 -0500 Subject: [PATCH] UseBlazorFramworkFiles: add webcil mime type mapping WebCIL is a new container format for .NET assemblies when publishing to webassembly. (See https://github.com/dotnet/runtime/pull/79416) Related to https://github.com/dotnet/runtime/issues/80807 --- .../src/ComponentsWebAssemblyApplicationBuilderExtensions.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/WebAssembly/Server/src/ComponentsWebAssemblyApplicationBuilderExtensions.cs b/src/Components/WebAssembly/Server/src/ComponentsWebAssemblyApplicationBuilderExtensions.cs index c7292d991b76..7e2e0c10481d 100644 --- a/src/Components/WebAssembly/Server/src/ComponentsWebAssemblyApplicationBuilderExtensions.cs +++ b/src/Components/WebAssembly/Server/src/ComponentsWebAssemblyApplicationBuilderExtensions.cs @@ -86,6 +86,7 @@ private static StaticFileOptions CreateStaticFilesOptions(IFileProvider webRootF options.FileProvider = webRootFileProvider; var contentTypeProvider = new FileExtensionContentTypeProvider(); AddMapping(contentTypeProvider, ".dll", MediaTypeNames.Application.Octet); + AddMapping(contentTypeProvider, ".webcil", MediaTypeNames.Application.Octet); // We unconditionally map pdbs as there will be no pdbs in the output folder for // release builds unless BlazorEnableDebugging is explicitly set to true. AddMapping(contentTypeProvider, ".pdb", MediaTypeNames.Application.Octet);