diff --git a/src/Tools/dotnet-monitor/StartupHook/StartupHookApplicator.cs b/src/Tools/dotnet-monitor/StartupHook/StartupHookApplicator.cs index 6623bc1e351..7f84318382a 100644 --- a/src/Tools/dotnet-monitor/StartupHook/StartupHookApplicator.cs +++ b/src/Tools/dotnet-monitor/StartupHook/StartupHookApplicator.cs @@ -48,13 +48,13 @@ public async Task ApplyAsync(string tfm, string fileName, CancellationToke return true; } -#nullable disable if (_endpointInfo.RuntimeVersion?.Major < 8) { +#nullable disable _logger.StartupHookInstructions(_endpointInfo.ProcessId, fileInfo.Name, fileInfo.PhysicalPath); +#nullable restore return false; } -#nullable restore return await ApplyUsingDiagnosticClientAsync(fileInfo, client, token); } diff --git a/src/Tools/dotnet-monitor/ValidationResultExtensions.cs b/src/Tools/dotnet-monitor/ValidationResultExtensions.cs index 308cd1074d9..f31b8396132 100644 --- a/src/Tools/dotnet-monitor/ValidationResultExtensions.cs +++ b/src/Tools/dotnet-monitor/ValidationResultExtensions.cs @@ -10,6 +10,7 @@ internal static class ValidationResultExtensions { public static bool IsSuccess([NotNullWhen(false)] this ValidationResult? result) { + // ValidationResult.Success is null, and a null value indicates there are no validation errors. return result == ValidationResult.Success; } }