Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Using DLL files and lazy loading them rather than using a Project Reference

$
0
0

I have a main project called "Core" and another project called "tool". "Core" has a reference to "tool", and the tool is displayed in Core's UI.

In the core.csproj, I am using lazy loading and referencing the project as follows:

<ItemGroup><ProjectReference Include="Tool.csproj" /></ItemGroup><ItemGroup><BlazorWebAssemblyLazyLoad Include="Tool.wasm" /></ItemGroup>

Instead of this, I want to use the DLL file directly. I was able to achieve this using:

AssemblyLoader.LoadAssembliesAsync("path to dll");

However, this approach results in the following error:

blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]      Unhandled exception rendering component: Error: Tool.dll must be marked with 'BlazorWebAssemblyLazyLoad' item group in your project file to allow lazy-loading.Error: Tool.dll must be marked with 'BlazorWebAssemblyLazyLoad' item group in your project file to allow lazy-loading.

How do I solve this error?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>