From 5a9a98543f7ab6b747dd436bec57e2fbbf73f832 Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Thu, 11 Jun 2020 22:13:05 +0200 Subject: [PATCH] [Blazor] Switches Error.razor to Error.cshtml (#22777) * [Blazor] Switch to use a cshtml file for errors * Update template tests --- .../Pages/{Error.razor => Error.cshtml} | 32 +++++++++---------- .../test/template-baselines.json | 12 +++---- 2 files changed, 22 insertions(+), 22 deletions(-) rename src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/{Error.razor => Error.cshtml} (94%) diff --git a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/Error.razor b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/Error.cshtml similarity index 94% rename from src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/Error.razor rename to src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/Error.cshtml index cd87ea9518..6436437154 100644 --- a/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/Error.razor +++ b/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Pages/Error.cshtml @@ -1,16 +1,16 @@ -@page "/error" - - -

Error.

-

An error occurred while processing your request.

- -

Development Mode

-

- Swapping to Development environment will display more detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

\ No newline at end of file +@page + + +

Error.

+

An error occurred while processing your request.

+ +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/src/ProjectTemplates/test/template-baselines.json b/src/ProjectTemplates/test/template-baselines.json index 9152fc62d0..3c9cef897b 100644 --- a/src/ProjectTemplates/test/template-baselines.json +++ b/src/ProjectTemplates/test/template-baselines.json @@ -914,7 +914,7 @@ "Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs", "Data/Migrations/ApplicationDbContextModelSnapshot.cs", "Pages/Counter.razor", - "Pages/Error.razor", + "Pages/Error.cshtml", "Pages/FetchData.razor", "Pages/Index.razor", "Pages/_Host.cshtml", @@ -951,7 +951,7 @@ "Data/WeatherForecast.cs", "Data/WeatherForecastService.cs", "Pages/Counter.razor", - "Pages/Error.razor", + "Pages/Error.cshtml", "Pages/FetchData.razor", "Pages/Index.razor", "Pages/_Host.cshtml", @@ -988,7 +988,7 @@ "Data/WeatherForecast.cs", "Data/WeatherForecastService.cs", "Pages/Counter.razor", - "Pages/Error.razor", + "Pages/Error.cshtml", "Pages/FetchData.razor", "Pages/Index.razor", "Pages/_Host.cshtml", @@ -1024,7 +1024,7 @@ "_Imports.razor", "Data/WeatherForecast.cs", "Data/WeatherForecastService.cs", - "Pages/Error.razor", + "Pages/Error.cshtml", "Pages/Counter.razor", "Pages/FetchData.razor", "Pages/Index.razor", @@ -1061,7 +1061,7 @@ "Data/WeatherForecast.cs", "Data/WeatherForecastService.cs", "Pages/Counter.razor", - "Pages/Error.razor", + "Pages/Error.cshtml", "Pages/FetchData.razor", "Pages/Index.razor", "Pages/_Host.cshtml", @@ -1098,7 +1098,7 @@ "Data/WeatherForecast.cs", "Data/WeatherForecastService.cs", "Pages/Counter.razor", - "Pages/Error.razor", + "Pages/Error.cshtml", "Pages/FetchData.razor", "Pages/Index.razor", "Pages/_Host.cshtml",