blazor-lazy-loading icon indicating copy to clipboard operation
blazor-lazy-loading copied to clipboard

Support new .NET 5 lazy assembly loader

Open isc30 opened this issue 3 years ago • 15 comments

Blazor team did a lot of work to introduce a partial implementation of the lib into blazor itself. This means that the LazyAssemblyLoader is a native part of blazor now! When .NET 5 RC1 is released, this library should shrink and reuse as much as it can from the official lazy loading support.

isc30 avatar Sep 04 '20 08:09 isc30

Has there been any movement on this at all? I've been looking at this library as a way to help modularize a set of apps into Blazor and if it's using the native Blazor lazy loading that would be cool. This lib seems super easy to configure and use so I would love to start prototyping with it.

knight1219 avatar Oct 22 '20 19:10 knight1219

No movement cause R1 was super buggy. Now that they released R2 I'll give it another go and hopefully adapt the library to it :)

isc30 avatar Oct 22 '20 20:10 isc30

Had some time to look into this, some bits of the metadata generation are broken and need to investigate the .net5 internals to make it work. Will take some time. If anyone wants to contribute i can push my changes and coordinate.

isc30 avatar Oct 26 '20 19:10 isc30

If anyone wants

I'm want)

Daeamon avatar Oct 27 '20 18:10 Daeamon

Hi @isc30 - just a quick check whether you already know when you could have the .NET5-based new version available? Thanks for the great lib!

ChristianWeyer avatar Nov 14 '20 13:11 ChristianWeyer

Hi, I'm super busy lately but this is top in my priority list. I didn't manage to make it work yet but im optimistic :)

isc30 avatar Nov 14 '20 13:11 isc30

:-)

ChristianWeyer avatar Nov 14 '20 14:11 ChristianWeyer

Sorry for disturbing again. Maybe you have a remote idea of when the ETA of this update might be? 😇 @isc30

ChristianWeyer avatar Nov 17 '20 09:11 ChristianWeyer

Hi, since stable .net5 was released some days ago, I'm working on making it work for that specific version. I expect to have it by this week.

isc30 avatar Nov 17 '20 11:11 isc30

WIP in branch feature/net5 https://github.com/isc30/blazor-lazy-loading/compare/feature/net5

isc30 avatar Nov 19 '20 22:11 isc30

Blocked by the following error when trying to execute the custom MsBuild Task: GenerateManifest imagen

any ideas if net5.0 target dlls can contain msbuild Tasks?

isc30 avatar Nov 19 '20 22:11 isc30

Tried if porting only the components project to .net5 would help with the msbuild task issue but nothing. After some days of fighting with this I'm out of ideas on how to make a custom MsBuild task work in .net5.....

There are 2 approaches I tried:

  • Porting everything to net5.0: feature/net5
  • Porting only blazor libraries to net5.0: feature/net5.0-only-components Both suffer from the same error I mentioned before.

When this gets fixed, missing work is to:

  • [ ] Implement a new LazyRouter that wraps the new <Router> and hooks into the new OnNavigateAsync and Navigating
  • [ ] Change AssemblyLoader internals to use the new LazyAssemblyLoader instead of doing the locate+fetch itself

isc30 avatar Nov 19 '20 22:11 isc30

Did you ask over at the .NET Core repo? They are quite helpful, usually.

ChristianWeyer avatar Nov 20 '20 10:11 ChristianWeyer

No, I didn't reach them. I will be trying using NestedTask this afternoon and will reach them if it doesn't work. If you want to help, the easiest way is to checkout feature/net5.0-only-components, build BlazorLazyLoading.sln and then build demo/Demo.sln to see the error. If we manage to sort this out, the rest of the implementation is quite straightforward.

Please make sure you use the stable net5.0.0 sdk

isc30 avatar Nov 20 '20 10:11 isc30

I'll be available in https://gitter.im/Blazor-Lazy-Loading/community

isc30 avatar Nov 20 '20 14:11 isc30