Skip to content

Package not working with Hosting #51

@Denny09310

Description

@Denny09310

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions