Are you over 21?
No
Skip to main content
ATHENS PUBLIC HOUSE TEMPORARILY CLOSED!

.net Desktop Runtime 8 -

Environment.Exit(1);

// In App.xaml.cs or Program.cs using Microsoft.Win32; private static bool IsDesktopRuntimeInstalled() .net desktop runtime 8

<PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>net8.0-windows</TargetFramework> <UseWPF>true</UseWPF> <!-- Or UseWindowsForms --> <SelfContained>true</SelfContained> <PublishSingleFile>true</PublishSingleFile> <IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract> </PropertyGroup> Environment

April 13, 2026 | Read Time: 4 minutes

var result = MessageBox.Show( "This app requires .NET Desktop Runtime 8.0.4 or higher. Download now?", "Missing Runtime", MessageBoxButton.YesNo); private static bool IsDesktopRuntimeInstalled() &lt

return installedVersion != null && new Version(installedVersion) >= new Version("8.0.4");