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
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
🤔 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
🐛 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
🤔 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