Skip to content

BlazorEnableCompression flag is ignored when publishing Blazor WASM projects #50451

@LostBeard

Description

@LostBeard

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Brotli and Gzip compression cannot be turned off when publishing a Blazor WASM project using dotnet publish.

Microsoft reference on how to disable compression in Blazor WASM

Expected Behavior

I expected compression to be disabled.

Steps To Reproduce

To reproduce:
Create a new Blazor WebAssembly project and attempt to publish with BlazorEnableCompression disabled either by setting the flag <BlazorEnableCompression>false</BlazorEnableCompression> in the project's .csproj file or using the flag -p:BlazorEnableCompression=false with dotnet publish. Both fail to disable the output of Brotli and Gzip encoded files in the published files (.br and .gz files in _framework folder.)

Exceptions (if any)

No response

.NET Version

8.0.100-preview.7.23376.3

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor Componentstask

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions