Skip to content

[Known Build Error] Failed webcil conversion: image is too small #61987

@ilonatommy

Description

@ilonatommy
Member

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1043546&view=logs&j=d9092465-e29c-5735-3051-a3146222728b
Build error leg or test failing: Build / Test: Windows local development validation / Build (Release)
Pull request: #61748

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": "error : Failed to convert .*.dll' to webcil: Image is too small.",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}
 Wasm.Performance.TestApp (Blazor output) -> D:\a\_work\1\s\src\Components\benchmarkapps\Wasm.Performance\TestApp\bin\Release\net10.0\wwwroot
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Optimizing assemblies for size. This process might take a while.
C:\Users\cloudtest\.nuget\packages\microsoft.net.sdk.webassembly.pack\10.0.0-preview.5.25260.104\build\Microsoft.NET.Sdk.WebAssembly.Browser.targets(631,5): error : Failed to convert 'D:\a\_work\1\s\artifacts\obj\BasicTestApp\Release\net10.0\linked\System.Private.Xml.dll' to webcil: Image is too small. [D:\a\_work\1\s\src\Components\test\testassets\BasicTestApp\BasicTestApp.csproj]
  Publishing without optimizations. Although it's optional for Blazor, we strongly recommend using `wasm-tools` workload! You can install it by running `dotnet workload install wasm-tools` from the command line.
  BasicTestApp -> D:\a\_work\1\s\src\Components\test\E2ETest\bin\Release\net10.0\trimmed-or-threading\BasicTestApp\

The exception is thrown by PEBinaryReader in
https://github.com/dotnet/runtime/blob/2e77d32dfcd5465434e4b0963e9be50b749521f6/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEBinaryReader.cs#L118
called by
https://github.com/dotnet/runtime/blob/2e77d32dfcd5465434e4b0963e9be50b749521f6/src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ConvertDllsToWebCil.cs#L70

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1043546
Error message validated: [error : Failed to convert .*.dll' to webcil: Image is too small.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/19/2025 7:10:00 AM UTC

Report

Build Definition Step Name Console log Pull Request
1190764 dotnet/aspnetcore Build (Release) Log #64214
1173385 dotnet/aspnetcore Build (Release) Log #64020

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 2

Activity

self-assigned this
on May 19, 2025
SilverioMiranda

SilverioMiranda commented on Jul 19, 2025

@SilverioMiranda

Same here : /opt/azagent/_work/2/.nuget/packages/microsoft.net.sdk.webassembly.pack/9.0.7/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets(506,5): error : Failed to convert '/opt/azagent/_work/2/s/src/SRM.Login.Admin/SRM.Login.Admin.Client/obj/Debug/net9.0/linked/System.Private.CoreLib.dll' to webcil: Image is too small. [/opt/azagent/_work/2/s/src/SRM.Login.Admin/SRM.Login.Admin.Client/SRM.Login.Admin.Client.csproj]

added this to the 10.0-rc2 milestone on Aug 7, 2025
maraf

maraf commented on Aug 12, 2025

@maraf
Member

It happens during publish on ILLinked dlls. The System.Private.Xml.dll could have been linked to "0", but there is no chance it could happen for System.Private.CoreLib.dll. It looks like some race condition.

Duplicate of dotnet/runtime#111698

maraf

maraf commented on Aug 12, 2025

@maraf
Member

Also dotnet/runtime#101154 in which is was caused by publish run in parallel.

@SilverioMiranda Are you publishing only a server project or whole solution?

maraf

maraf commented on Aug 20, 2025

@maraf
Member

A possible workaround could be to generate temp webcil files to a guid-containing folder

modified the milestones: 10.0-rc2, Backlog on Sep 3, 2025

3 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Known Build ErrorIssue that should show up in Build Analysisarea-blazorIncludes: Blazor, Razor Components

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @SilverioMiranda@danmoseley@javiercn@maraf@ilonatommy

      Issue actions

        [Known Build Error] Failed webcil conversion: image is too small · Issue #61987 · dotnet/aspnetcore