microsoft / fluentui-blazor

Microsoft Fluent UI Blazor components library. For use with ASP.NET Core Blazor applications
https://www.fluentui-blazor.net
MIT License
3.91k stars 377 forks source link

fix: Generated initial project Template for Fluent Blazor App (or Blazor Web App) fails to build as App.Client is incomplete when Auto and per Page/component selected #2999

Closed jhogan05 closed 11 hours ago

jhogan05 commented 19 hours ago

🐛 Bug Report

Generated New Project in VS2022 using .Net 8, No authentication, Auto (Server or Webassesmbly) and (per Page/component) and no sample pages and no top level statements does not build.

On reviewing the outputted source code the FluentBlazorApp.Client project does not contain any Razor files or folders (e.g Layout or Pages). This results in an error on Build because there is no generated code using the Layout namespace which appears in _Imports.razor

Error (active) CS0234 The type or namespace name 'Layout' does not exist in the namespace 'BlazorApp6.Client' (are you missing an assembly reference?)

Switching to (Global) results in a buildable empty app, but running .Client fails

💻 Repro or Code Sample

Image

🤔 Expected Behavior

The initial template should Build regardless of the options selected.

The online reference to the non-fluent version (which is also affected in same way) say:

_In the .Client project:

The Pages folder contains routable client-side Razor components. The route for each page is specified using the @page directive.

The wwwroot folder is the Web Root folder for the .Client project that holds the app's public static assets.

The Program.cs file is the project's entry point that sets up the WebAssembly host and contains the project's startup logic, including service registrations, configuration, logging, and request processing pipeline._

😯 Current Behavior

Fails to build. .Client appears to generate incompletely. Does not run.

💁 Possible Solution

Empty template should run (App and App.Client) after first instantiation. Should be generated appropriately to give sample of what is trying to achieive with this combination.

🔦 Context

New users exploring the different intiial templated outcome and behaviour

🌍 Your Environment

jhogan05 commented 19 hours ago

.NET Version: 8.0.403 Fluent template version: Microsoft.FluentUI.AspNetCore.Templates::4.10.4

vnbaaij commented 11 hours ago

Will be fixed with next Template (v4.11.0) package