Skip to content

UseStaticFiles does compression on publish with .net9 #59518

@praxmarer

Description

@praxmarer

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hi,

we noticed an increased publish time with .net9. What i found so far is that now in .net9 - static assets compression is happening - even when we do not use the new MapStaticAssets ? We still use UseStaticFiles.

When i set the TargetFramework to net8.0 - and call

dotnet publish BlazorApp1\BlazorApp1.csproj -c Release --self-contained -r linux-musl-x64

build happens without compression

When i set the TargetFramework to net9.0 - without any other changes and do the same - assets are compressed during publish?

Why - i do not find any breaking changes on this topic?

Expected Behavior

No compression happens since we still use UseStaticFiles

Steps To Reproduce

Simply create a new Blazor Web app - Target net8.0 - and call

dotnet publish BlazorApp1\BlazorApp1.csproj -c Release --self-contained -r linux-musl-x64

Then change TargetFramework to net9.0 and do the same

Exceptions (if any)

No response

.NET Version

9.0.101

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions