-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
Pillar: Technical Debtarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsarea-hostingIncludes HostingIncludes Hostingarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Milestone
Description
We have MSBuild targets in the repo that enable nullability on netstandard2.0 projects.
aspnetcore/eng/targets/CSharp.Common.targets
Lines 120 to 130 in 0793770
| <When Condition=" ('$(Nullable)' == 'annotations' OR '$(Nullable)' == 'enable') AND | |
| '$(SuppressNullableAttributesImport)' != 'true' AND | |
| (('$(TargetFrameworkIdentifier)' == '.NETStandard' AND $([MSBuild]::VersionLessThanOrEquals('$(TargetFrameworkVersion)', '2.1'))) OR '$(TargetFrameworkIdentifier)' == '.NETFramework')"> | |
| <PropertyGroup> | |
| <DefineConstants>$(DefineConstants),INTERNAL_NULLABLE_ATTRIBUTES</DefineConstants> | |
| <NoWarn>$(NoWarn);nullable</NoWarn> | |
| </PropertyGroup> | |
| <ItemGroup> | |
| <Compile Include="$(SharedSourceRoot)Nullable\NullableAttributes.cs" /> | |
| </ItemGroup> | |
| </When> |
However, the nullability warnings are not emitted during build by default.
aspnetcore/eng/targets/CSharp.Common.targets
Line 125 in 0793770
| <NoWarn>$(NoWarn);nullable</NoWarn> |
Removing the property above shows that we have ~150 unhandled nullability warnings in the projects that currently "enable" nullability.
eerhardt and maxkoshevoi
Metadata
Metadata
Assignees
Labels
Pillar: Technical Debtarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsarea-hostingIncludes HostingIncludes Hostingarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions