Skip to content

Package not working with Hosting #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Denny09310 opened this issue Apr 7, 2025 · 0 comments
Open

Package not working with Hosting #51

Denny09310 opened this issue Apr 7, 2025 · 0 comments

Comments

@Denny09310
Copy link

Denny09310 commented Apr 7, 2025

Overview

This PR addresses an issue encountered when integrating the BlazorWasmPreRendering.Build package into an ASP.NET Core WebAPI project for creating a Blazor WASM Core Hosted app. While the package works as expected when publishing a standalone Blazor WASM app, the prerendering compilation step is skipped when referenced from an ASP.NET Core WebAPI project, causing it to fall back to a standard build.

Problem Description

  • Expected Behavior: When using BlazorWasmPreRendering.Build, the prerendering compilation step should be executed during the build process, regardless of whether the Blazor WASM project is standalone or hosted within an ASP.NET Core WebAPI.
  • Observed Behavior: When the Blazor WASM project is integrated as part of a Core Hosted app (referenced by an ASP.NET Core WebAPI project), the prerendering compilation step is not triggered. This results in the application using the normal build process instead of the optimized prerendered build.

Reproduction

Just create a minimal project for the Blazor WASM + Core Hosted template in .net 9 and dotnet publish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant