question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blazor AOT .Net6 Preview 7 - Still downloading Dlls

See original GitHub issue

Describe the bug

I raised this issue previously, but I cannot find anywhere where it is being tracked to see status (apologies if I’m just missing it - happy to be linked to another ticket).

https://github.com/dotnet/aspnetcore/issues/33730

There are still a large amount of dlls being downloaded with AOT. Perhaps it is my misunderstanding of how it works but I do not expect the dlls, just a larger .wasm file?

Larger wasm file than before AOT: image

But still a large number of dlls: image

To Reproduce

Install workload: dotnet workload install wasm-tools

Project with RunAOTCompilation set to true.

<PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
    <BlazorEnableTimeZoneSupport>false</BlazorEnableTimeZoneSupport>
    <BlazorWebAssemblyPreserveCollationData>false</BlazorWebAssemblyPreserveCollationData>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)'!='DEBUG'">
    <!-- Bug in .Net 6 Preview 7 - this should not be non-debug only. https://github.com/dotnet/runtime/issues/55750 -->
    <InvariantGlobalization>true</InvariantGlobalization>

    <RunAOTCompilation>true</RunAOTCompilation>
  </PropertyGroup>

Publish application.

Further technical details

.NET SDK (reflecting any global.json):
 Version:   6.0.100-preview.7.21379.14
 Commit:    22d70b47bc

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19043
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.100-preview.7.21379.14\

Host (useful for support):
  Version: 6.0.0-preview.7.21377.19
  Commit:  91ba01788d

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:27 (7 by maintainers)

github_iconTop GitHub Comments

15reactions
danroth27commented, Aug 12, 2021

The DLLs are still expected. Even with AOT compilation, there are scenarios where we need to fall back to using the interpreter with the .NET binaries. This increases the download size, but provides a more compatible .NET experience.

11reactions
charlesroddiecommented, Dec 29, 2021

This is the main issue tracking AOT support in Blazor so should be reopened.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.NET 7 WebAssembly Plans: Mixed-Mode AOT, Multi- ...
Blazor doesn't have full AOT yet as reported in Blazor AOT . Net6 Preview 7 -- Still downloading Dlls #35302, yet this issue...
Read more >
Native AOT deployment overview - .NET
Native AOT deployment is currently in preview for ASP.NET Core 8.0. The native AOT deployment model uses an ahead-of-time compiler to compile IL ......
Read more >
Blazor Web Assembly not downloading dlls
I have just started with Blazor and following this tutorial. ... But when I run the sample application in my local, there are...
Read more >
Blazor - .NET 7 Preview 1 (AOT) vs .NET 6.0.2 (AOT) Huge ...
.NET 7 Preview 1 dropped this week and even in it's infancy it "can" be much ... rofl, that .net 7 page still...
Read more >
How to enable and run AOT compilation
How to enable and run AOT compilation. Verify that .NET 6.0 is installed. To do this, open a command prompt and run the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found