diff --git a/Directory.Build.props b/Directory.Build.props
index 3305fdccc..457faceb4 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -10,7 +10,7 @@
true
net8.0
enable
- CS8002,nullable
+ CS9057,CS8002,nullable
true
True
$(MSBuildThisFileDirectory)