diff --git a/Elwig/Elwig.csproj b/Elwig/Elwig.csproj
index c4078c8..8ed2c23 100644
--- a/Elwig/Elwig.csproj
+++ b/Elwig/Elwig.csproj
@@ -13,6 +13,8 @@
de-AT
true
App.manifest
+
+ Elwig.Program
diff --git a/Elwig/Program.cs b/Elwig/Program.cs
new file mode 100644
index 0000000..9a5d8e6
--- /dev/null
+++ b/Elwig/Program.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Diagnostics;
+
+namespace Elwig {
+ // FIXME remove with .NET 11.0.1
+ public static class Program {
+ [STAThread]
+ public static int Main(string[] args) {
+ if (Environment.GetEnvironmentVariable("DOTNET_JITMinOpts") != "1" && Environment.ProcessPath is string exePath) {
+ if (Process.Start(new ProcessStartInfo(exePath, args) {
+ UseShellExecute = false,
+ Environment = { ["DOTNET_JITMinOpts"] = "1" },
+ }) != null)
+ {
+ return 0;
+ }
+ }
+ var app = new App();
+ app.InitializeComponent();
+ return app.Run();
+ }
+ }
+}