Warn about old .Net version if methods are missing

This commit is contained in:
Lauri Kenttä
2023-12-16 14:34:29 +02:00
parent 6dc447a8ce
commit c6108ffd62

View File

@@ -996,7 +996,13 @@ public class Setup {
WriteLine(); WriteLine();
WriteLine($"Unexpected error: {e.Message}"); WriteLine($"Unexpected error: {e.Message}");
Log(e.ToString()); 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; return 1;
} finally { } finally {
if (DryRun) { if (DryRun) {