dotnet / dotnet/linker

NETSDK1144: Optimizing assemblies for size failed .NET 7

Open
#3,119 8 comments 0 reactions 0 assignees View on GitHub
area-Linker: Meta regression
Dominant language
C#
Stars
392
Forks
128
Avg merge
2d 10h
Merged PRs (30d)
2

Description

I have upgraded a Blazor client app from .net 6 to .net 7
and I'm getting this while building a container image

Error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false.

I am using this in my DockerFile
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS base

Adding
PublishTrimmed false PublishTrimmed

to the blazor client project file does "fix" the issue, but im not really sure what the actual issue is?
https://learn.microsoft.com/en-us/dotnet/core/tools/sdk-errors/
Refers to the error, with no information.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.