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

How to add a RCLShared library to MAUI project without causing runtime issues

$
0
0

I have a .net8 class library RCLshared and a .net8 MAUI blazor hybrid project (also blazor project no issues here).Initially added RCLshared to MAUI following this: https://learn.microsoft.com/en-us/aspnet/core/blazor/components/class-libraries?view=aspnetcore-8.0&tabs=visual-studio

After adding nuget packages to the RCLshared lib the MAUI build failed : NETSDK1082 There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier

Removing the packages breaks the web version.

Removing the RCLshared as a project reference and adding it as a shared project reference fixes the build issues

However when i want to use anything in the wwwroot (image/css ect) it no longer servers them _content/RCLShared/css/app.css due to it no longer being a project ref

Questions:

  1. Should i be adding nuget packages to the shared lib ?
  2. Is there a workaround for adding the project reference to not cause build issues ?
  3. should the MAUI run independantly from the web version (not reuse services/pages/styles from RCLShared)
  4. Should i use a packages solution and reference them this way (i feel this will lead to the result of a broken MAUI build)
  5. any ideas ?

Viewing all articles
Browse latest Browse all 4839

Trending Articles



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