diff --git a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs index f49eacb4cbdb5..6d8f70b47f7d0 100644 --- a/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs +++ b/src/libraries/Microsoft.Extensions.FileProviders.Physical/src/PollingFileChangeToken.cs @@ -65,7 +65,7 @@ private DateTime GetLastWriteTimeUtc() catch (IOException) { } // https://github.com/dotnet/runtime/issues/57221 } - return lastWriteTimeUtc.Value; + return lastWriteTimeUtc ?? DateTime.MinValue; } ///