C#C
C#3y ago
17 replies
Wizard

❔ Output error when user missing .NET runtime

I have an AvaloniaUI project targetting .NET Framework 4.6.2 AND .NET6. It builds two EXEs: one for NET6 and one for NET462. Works great, except there's an annoyance I'd like to fix:

When the user opens my program and they're missing the required NET runtime for that specific EXE, my program will crash to desktop. No errors, warnings, popups, nothing. Happens before any of my stuff is initialized so I can't even log to a file.

I realize this is a user issue but I'd like to at least be able to tell my user the problem.

Does anyone by chance know a solution?
Was this page helpful?