Skip to content

Commit c56cf34

Browse files
fix: Enable nullable globally via _ViewImports instead of per-file
Move #nullable enable to _ViewImports.cshtml files so it applies globally to all Razor views, matching the project-level Nullable=enable setting in Directory.Build.props.
1 parent 7973c9c commit c56cf34

3 files changed

Lines changed: 2 additions & 1 deletion

File tree

EssentialCSharp.Web/Areas/Identity/Pages/_ViewImports.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
@using EssentialCSharp.Web.Areas.Identity.Pages
44
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
55
@using EssentialCSharp.Web.Areas.Identity.Data
6+
#nullable enable

EssentialCSharp.Web/Views/Shared/_Layout.cshtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#nullable enable
21
@using EssentialCSharp.Web.Extensions
32
@using System.Globalization
43
@using EssentialCSharp.Web.Services
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
@using EssentialCSharp.Web
22
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
3+
#nullable enable

0 commit comments

Comments
 (0)