From fc93e595ceffbb1e3e85532bf454e92a6a80dd6b Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Tue, 1 Dec 2020 23:40:10 +0100 Subject: [Blazor] Update template to pass in attribute as boolean (#28285) Description We introduced a public property as part of #27907 to enable users to opt-in. Turns out that this caused issues since we didn't update the target pack. As a result, the Razor compiler treats this new property as a regular HTML attribute (of type string) instead of as a boolean. In turn this causes the template to error at runtime when the application starts. Customer Impact Customers using 5.0.1 won't be able to create and run new blazor apps out of the box. They can fix the template code by preceding the true value in the attribute with @ to force the compiler to interpret it as C#. (Which is the same fix we are applying). Regression? Yes, 5.0.0. Users were able to create new blazor templates without this issue. Risk Low. We've manually validated the fix against a new project from a 5.0.1 template. --- .../Web.ProjectTemplates/content/BlazorServerWeb-CSharp/App.razor | 4 ++-- .../content/ComponentsWebAssembly-CSharp/Client/App.razor | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/App.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/App.razor index a7210c9197..0e1ea89371 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/App.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/App.razor @@ -1,5 +1,5 @@ @*#if (NoAuth) - + @@ -11,7 +11,7 @@ #else - + diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/App.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/App.razor index f0d75aaa2a..9cbaddae54 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/App.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/App.razor @@ -1,5 +1,5 @@ @*#if (NoAuth) - + @@ -11,7 +11,7 @@ #else - + -- cgit v1.2.3