The Wayback Machine - https://web.archive.org/web/20220214174203/https://github.com/dotnet/aspnetcore/issues/40209
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor AOT publish failed on Microsoft.AspNetCore.Components.WebAssembly.dll #40209

Open
1 task done
elylv opened this issue Feb 14, 2022 · 0 comments
Open
1 task done

Blazor AOT publish failed on Microsoft.AspNetCore.Components.WebAssembly.dll #40209

elylv opened this issue Feb 14, 2022 · 0 comments

Comments

@elylv
Copy link

@elylv elylv commented Feb 14, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am trying to publish my Blazor WASM app with AOT compilation, but I get a failure:

Failed to load method 0x6000063 from 'MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll' due to Could not load file or assembly 'Microsoft.JSInterop.WebAssembly, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies..

I have tried adding the Microsoft.JSInterop.WebAssembly 6.0.2 package directly to my project, but it makes no difference. Running mono-aot-cross.exe on this assembly with debugging, I get this output:

Mono: Assembly Loader probing location: 'MyProject\Client\obj\Release\net6.0\linked\System.Private.CoreLib.dll'.
Mono: Image addref System.Private.CoreLib[0000016084F5F040] (asmctx DEFAULT) -> MyProject\Client\obj\Release\net6.0\linked\System.Private.CoreLib.dll[0000016084F5E380]: 2
Mono: Prepared to set up assembly 'System.Private.CoreLib' (MyProject\Client\obj\Release\net6.0\linked\System.Private.CoreLib.dll)
Mono: Image 'MyProject\Client\obj\Release\net6.0\linked\System.Private.CoreLib.dll' has no debug directory.
Mono: Assembly Loader loaded assembly from location: 'MyProject\Client\obj\Release\net6.0\linked\System.Private.CoreLib.dll'.
Mono: Loading assembly System.Private.CoreLib (0000016084F5F040) into domain Microsoft.AspNetCore.Components.WebAssembly.dll (0000016084F34CC0) and ALC 0000016084F49E00
Mono: Assembly System.Private.CoreLib[0000016084F5F040] added to ALC '(null)'[0000016084F49E00], ref_count=1
Mono: Assembly Loader probing location: 'MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll'.
Mono: Image addref Microsoft.AspNetCore.Components.WebAssembly[0000016084F298A0] (asmctx DEFAULT) -> MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll[0000016084F5D4B0]: 3
Mono: Prepared to set up assembly 'Microsoft.AspNetCore.Components.WebAssembly' (MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll)
Mono: Loading assembly Microsoft.AspNetCore.Components.WebAssembly (0000016084F298A0) into domain Microsoft.AspNetCore.Components.WebAssembly.dll (0000016084F34CC0) and ALC 0000016084F49E00
Mono: Assembly Microsoft.AspNetCore.Components.WebAssembly[0000016084F298A0] added to ALC '(null)'[0000016084F49E00], ref_count=1
Mono: Assembly Loader loaded assembly from location: 'MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll'.
Mono: Assembly Loader probing location: 'MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll'.
Mono: Loading assembly Microsoft.AspNetCore.Components.WebAssembly (0000016084F298A0) into domain Microsoft.AspNetCore.Components.WebAssembly.dll (0000016084F34CC0) and ALC 0000016084F49E00
Mono Ahead of Time compiler - compiling assembly MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll
Mono: Requesting loading reference 0 (of 23) of MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll
Mono: Loading reference 0 of MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll asmctx DEFAULT, looking for System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Mono: Request to load System.Runtime in alc 0000016084F49E00
Mono: Assembly Loader probing location: 'MyProject\Client\obj\Release\net6.0\linked\System.Runtime.dll'.
Mono: Image addref System.Runtime[0000016084F797C0] (asmctx DEFAULT) -> MyProject\Client\obj\Release\net6.0\linked\System.Runtime.dll[0000016084F790C0]: 2
Mono: Prepared to set up assembly 'System.Runtime' (MyProject\Client\obj\Release\net6.0\linked\System.Runtime.dll)
Mono: Loading assembly System.Runtime (0000016084F797C0) into domain Microsoft.AspNetCore.Components.WebAssembly.dll (0000016084F34CC0) and ALC 0000016084F49E00
Mono: Assembly System.Runtime[0000016084F797C0] added to ALC '(null)'[0000016084F49E00], ref_count=1
Mono: Image 'MyProject\Client\obj\Release\net6.0\linked\System.Runtime.dll' has no debug directory.
Mono: Assembly Loader loaded assembly from location: 'MyProject\Client\obj\Release\net6.0\linked\System.Runtime.dll'.
Mono: Assembly found with the filesystem probing logic: 'System.Runtime'.
Mono: Assembly Ref addref Microsoft.AspNetCore.Components.WebAssembly[0000016084F298A0] -> System.Runtime[0000016084F797C0]: 2
Mono: Requesting loading reference 0 (of 2) of MyProject\Client\obj\Release\net6.0\linked\System.Runtime.dll
Mono: Loading reference 0 of MyProject\Client\obj\Release\net6.0\linked\System.Runtime.dll asmctx DEFAULT, looking for System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
Mono: Request to load System.Private.CoreLib in alc 0000016084F49E00
Mono: Assembly already loaded in the active ALC: 'System.Private.CoreLib'.
Mono: Assembly Ref addref System.Runtime[0000016084F797C0] -> System.Private.CoreLib[0000016084F5F040]: 2
Mono: Requesting loading reference 4 (of 23) of MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll
Mono: Loading reference 4 of MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll asmctx DEFAULT, looking for System.Text.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
Mono: Request to load System.Text.Json in alc 0000016084F49E00
Mono: Assembly Loader probing location: 'MyProject\Client\obj\Release\net6.0\linked\System.Text.Json.dll'.
Mono: Image addref System.Text.Json[0000016084F79860] (asmctx DEFAULT) -> MyProject\Client\obj\Release\net6.0\linked\System.Text.Json.dll[0000016084FCE920]: 2
Mono: Prepared to set up assembly 'System.Text.Json' (MyProject\Client\obj\Release\net6.0\linked\System.Text.Json.dll)
Mono: Loading assembly System.Text.Json (0000016084F79860) into domain Microsoft.AspNetCore.Components.WebAssembly.dll (0000016084F34CC0) and ALC 0000016084F49E00
Mono: Assembly System.Text.Json[0000016084F79860] added to ALC '(null)'[0000016084F49E00], ref_count=1
Mono: Image 'MyProject\Client\obj\Release\net6.0\linked\System.Text.Json.dll' has no debug directory.
Mono: Assembly Loader loaded assembly from location: 'MyProject\Client\obj\Release\net6.0\linked\System.Text.Json.dll'.
Mono: Assembly found with the filesystem probing logic: 'System.Text.Json'.
Mono: Assembly Ref addref Microsoft.AspNetCore.Components.WebAssembly[0000016084F298A0] -> System.Text.Json[0000016084F79860]: 2
Mono: Requesting loading reference 0 (of 7) of MyProject\Client\obj\Release\net6.0\linked\System.Text.Json.dll
Mono: Loading reference 0 of MyProject\Client\obj\Release\net6.0\linked\System.Text.Json.dll asmctx DEFAULT, looking for System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
Mono: Request to load System.Private.CoreLib in alc 0000016084F49E00
Mono: Assembly already loaded in the active ALC: 'System.Private.CoreLib'.
Mono: Assembly Ref addref System.Text.Json[0000016084F79860] -> System.Private.CoreLib[0000016084F5F040]: 3
Mono: Requesting loading reference 3 (of 23) of MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll
Mono: Loading reference 3 of MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll asmctx DEFAULT, looking for Microsoft.AspNetCore.Components, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
Mono: Request to load Microsoft.AspNetCore.Components in alc 0000016084F49E00
Mono: Assembly Loader probing location: 'MyProject\Client\obj\Release\net6.0\linked\Microsoft.AspNetCore.Components.dll'.
Mono: Image addref Microsoft.AspNetCore.Components[0000016084F30B80] (asmctx DEFAULT) -> MyProject\Client\obj\Release\net6.0\linked\Microsoft.AspNetCore.Components.dll[0000016084FCF970]: 2
Mono: Prepared to set up assembly 'Microsoft.AspNetCore.Components' (MyProject\Client\obj\Release\net6.0\linked\Microsoft.AspNetCore.Components.dll)
Mono: Loading assembly Microsoft.AspNetCore.Components (0000016084F30B80) into domain Microsoft.AspNetCore.Components.WebAssembly.dll (0000016084F34CC0) and ALC 0000016084F49E00
Mono: Assembly Microsoft.AspNetCore.Components[0000016084F30B80] added to ALC '(null)'[0000016084F49E00], ref_count=1
Mono: Image 'MyProject\Client\obj\Release\net6.0\linked\Microsoft.AspNetCore.Components.dll' has no debug directory.
Mono: Assembly Loader loaded assembly from location: 'MyProject\Client\obj\Release\net6.0\linked\Microsoft.AspNetCore.Components.dll'.
Mono: Assembly found with the filesystem probing logic: 'Microsoft.AspNetCore.Components'.
Mono: Assembly Ref addref Microsoft.AspNetCore.Components.WebAssembly[0000016084F298A0] -> Microsoft.AspNetCore.Components[0000016084F30B80]: 2
Mono: Requesting loading reference 0 (of 9) of MyProject\Client\obj\Release\net6.0\linked\Microsoft.AspNetCore.Components.dll
Mono: Loading reference 0 of MyProject\Client\obj\Release\net6.0\linked\Microsoft.AspNetCore.Components.dll asmctx DEFAULT, looking for System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
Mono: Request to load System.Private.CoreLib in alc 0000016084F49E00
Mono: Assembly already loaded in the active ALC: 'System.Private.CoreLib'.
Mono: Assembly Ref addref Microsoft.AspNetCore.Components[0000016084F30B80] -> System.Private.CoreLib[0000016084F5F040]: 4
Mono: Requesting loading reference 6 (of 23) of MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll
Mono: Loading reference 6 of MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll asmctx DEFAULT, looking for Microsoft.JSInterop.WebAssembly, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
Mono: Request to load Microsoft.JSInterop.WebAssembly in alc 0000016084F49E00
Mono: The following assembly referenced from MyProject\Client\bin\Release\net6.0\Microsoft.AspNetCore.Components.WebAssembly.dll could not be loaded:
     Assembly:   Microsoft.JSInterop.WebAssembly    (assemblyref_index=6)
     Version:    6.0.2.0
     Public Key: adb9793829ddae60

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

6.0.2

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant