Description
Describe the bug
Using lazy loading of assemblies fails when a service extension method is used.
Additional context
A blazor wasm project is configured to use lazy loading for a class library project that has some dependencies. The app is inspired by the example from Dan Roth and the MyComponents lib.
The problem occurs when a service extension method is used, which is empty. Not using this method works as expected and no errors are thrown.
To Reproduce
- Clone https://github.com/Stamo-Gochev/blazor-wasm-lazy-loading-issue
- Set the server project as a startup project
- Run the app by pressing
Ctrl + F5
Expected
The dependency assemblies are loaded without errors.
Actual
An exception is thrown and the app crashes. The actual component that triggers lazy loading is in the Counter.razor file.
Exceptions (if any)
AN exception is thrown in the console
System.IO.FileNotFoundException: Could not load file or assembly 'MyComponents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Further technical details
- ASP.NET Core version 5.0 RC2
- Include the output of
dotnet --info
- The IDE (VS / VS Code/ VS4Mac) latest