Elwig: Hotfix for .NET 11 JIT compiler error
This commit is contained in:
1 parent
5cdb83601d
commit
2ed559eb3f
2 files changed
+25
No files matched your search
@@ -13,6 +13,8 @@
|
||||
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ApplicationManifest>App.manifest</ApplicationManifest>
|
||||
<!-- FIXME remove with .NET 11.0.1 -->
|
||||
<StartupObject>Elwig.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user