Closed wizardars closed 2 years ago
Hi @wizardars,
No effort has been made so far to support net6.0 directly in all of excubo's open source projects, as net6.0 is not yet released. AOT is a net6.0-only feature, as far as I know, so I'm not surprised this failed. Looking at the error message, it'll likely require a minor change to how dependencies are consumed, but I will only look at this once net6.0 is released.
Thanks for your understanding, Stefan
Hi @stefanloerwald, the same error is still there.
Steps to reproduce:
1) Install AOT compiler (Visual studio installer 2022 current v17.0.0 > modify > individual components > select .NET WebAssembly build tools > Modify)
2) Create default blazor project (Visual studio 2022 current > Create new project > Blazor WebAssembly App > Next > ASP.NET core hosted > Next > Create
3) Add Excubo.Blazor.Canvas by Stefan Lörwald 3.0.0 to BlazorApp1.Client
4) Prepare project for AOT compilation (Add to BlazorApp1.Client.csproj that line:<PropertyGroup><PublishTrimmed>false</PublishTrimmed><RunAOTCompilation>true</RunAOTCompilation></PropertyGroup>
)
5) Compile with AOT (Publish BlazorApp1.Server > Deployment mode: Self-contained > Save > Publish)
Hi @wizardars,
Thanks for checking this again. I've just applied the change that I think is required to make things work for you. Could you please try with the newest version (3.0.2)?
Thanks Stefan
Precompiling failed for \linked\ApiGroupGenerator.dll
Failed to load method 0x6000011 from 'C:\Users\WIZARD\source\repos\BlazorApp1\BlazorApp1\Client\obj\Release\net6.0\linked\ApiGroupGenerator.dll' due to Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.. Mono Ahead of Time compiler - compiling assembly C:\Users\WIZARD\source\repos\BlazorApp1\BlazorApp1\Client\obj\Release\net6.0\linked\ApiGroupGenerator.dll Run with MONO_LOG_LEVEL=debug for more information. AOT of image ApiGroupGenerator.dll failed.