From c6108ffd62df094a2241f12caaad29d7c02559fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20Kentt=C3=A4?= Date: Sat, 16 Dec 2023 14:34:29 +0200 Subject: [PATCH] Warn about old .Net version if methods are missing --- src/Setup.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Setup.cs b/src/Setup.cs index e1f2abf..26002d4 100644 --- a/src/Setup.cs +++ b/src/Setup.cs @@ -996,7 +996,13 @@ public class Setup { WriteLine(); WriteLine($"Unexpected error: {e.Message}"); Log(e.ToString()); - WriteLine("If this is the most current release, please report this bug."); + if (e is MissingMemberException || e is TypeLoadException) { + WriteLine("This installer requires a recent version of .Net Framework."); + WriteLine("Use Windows Update or download manually:"); + WriteLine("https://dotnet.microsoft.com/en-us/download/dotnet-framework"); + } else { + WriteLine("If this is the most current release, please report this bug."); + } return 1; } finally { if (DryRun) {