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:
- Should i be adding nuget packages to the shared lib ?
- Is there a workaround for adding the project reference to not cause build issues ?
- should the MAUI run independantly from the web version (not reuse services/pages/styles from RCLShared)
- Should i use a packages solution and reference them this way (i feel this will lead to the result of a broken MAUI build)
- any ideas ?