set DOTNET_EnableWriteXorExecute=0 under win10

https://github.com/2dust/v2rayN/issues/5186
This commit is contained in:
2dust 2024-06-21 14:09:57 +08:00
parent 74a0a93201
commit 9039d401da

View file

@ -58,10 +58,12 @@ namespace v2rayN
Environment.Exit(0);
return;
}
//if (RuntimeInformation.ProcessArchitecture != Architecture.X86 && RuntimeInformation.ProcessArchitecture != Architecture.X64)
//{
// _config.guiItem.enableStatistics = false;
//}
//Under Win10
if (Environment.OSVersion.Version.Major < 10)
{
Environment.SetEnvironmentVariable("DOTNET_EnableWriteXorExecute", "0", EnvironmentVariableTarget.Process);
}
}
private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)