Skip to content

Blazor WASM AOT Compilation Failture #132071

Description

@ChristopherHaas

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hi,

We have a problem with Blazor WASM AOT compilation that I cannot seem to diagnose. From dotnet publish, I get the error:
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\10.0.10\Sdk\WasmApp.Common.targets(672,5): Error : Precompiling failed for G:\source\xxxx\src\xxxx\obj\Release\net10.0\wasm\for-publish\aot-in\xxxxx.dll with exit code -1073741571.

The same error appears when building on our Azure DevOps Linux-based agents.

The build output includes the mono-aot-cross.exe command that failed. When I run that command directly, I end up with:

Failed to load method 0x600014e from 'G:\source\xxxx\src\xxxxx\bin\Release\net10.0\xxxxx.dll' due to Could not resolve type with token 0100001f from typeref (expected class 'System.Collections.Generic.Dictionary`2' in assembly 'System.Collections, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') assembly:System.Collections, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Collections.Generic.Dictionary`2 member:(null).

The xxxx.dll is a custom .NET 10 library. I am not sure what triggers this problem. How do I find which method 0x600014e is, and what type 0100001f is?

The .NET version mentioned here is the current insider preview, but the same issue occurs on the latest stable.

Expected Behavior

Successful compilation, or a more detailed error message pointing to the problem.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

10.0.400-preview.0.26322.102

Anything else?

No response

Metadata

Metadata

Assignees

Labels

arch-wasmWebAssembly architecturearea-Codegen-AOT-mononeeds-author-actionAn issue or pull request that requires more info or actions from the author.os-browserBrowser variant of arch-wasm

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions