From ce80c68135b08fea7caaa9581b3c4eba61c3ec65 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 16 Aug 2021 19:43:55 -0400 Subject: [PATCH] fix segfault on Linux/macOS after .NET 5 update Harmony doesn't seem to support tiered compilation on Linux/macOS, but the vanilla game disables that too anyway. The bundled runtimeconfig files match the ones used by the vanilla game. Thanks to 0x0ade for identifying the cause! --- build/prepare-install-package.targets | 3 ++- src/SMAPI.Installer/assets/runtimeconfig.unix.json | 14 ++++++++++++++ .../assets/runtimeconfig.windows.json | 12 ++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/SMAPI.Installer/assets/runtimeconfig.unix.json create mode 100644 src/SMAPI.Installer/assets/runtimeconfig.windows.json diff --git a/build/prepare-install-package.targets b/build/prepare-install-package.targets index bc1716a3..21b02b87 100644 --- a/build/prepare-install-package.targets +++ b/build/prepare-install-package.targets @@ -36,13 +36,14 @@ + - + diff --git a/src/SMAPI.Installer/assets/runtimeconfig.unix.json b/src/SMAPI.Installer/assets/runtimeconfig.unix.json new file mode 100644 index 00000000..8a01ceb1 --- /dev/null +++ b/src/SMAPI.Installer/assets/runtimeconfig.unix.json @@ -0,0 +1,14 @@ +{ + "runtimeOptions": { + "tfm": "net5.0", + "includedFrameworks": [ + { + "name": "Microsoft.NETCore.App", + "version": "5.0.7" + } + ], + "configProperties": { + "System.Runtime.TieredCompilation": false + } + } +} diff --git a/src/SMAPI.Installer/assets/runtimeconfig.windows.json b/src/SMAPI.Installer/assets/runtimeconfig.windows.json new file mode 100644 index 00000000..b693d809 --- /dev/null +++ b/src/SMAPI.Installer/assets/runtimeconfig.windows.json @@ -0,0 +1,12 @@ +{ + "runtimeOptions": { + "tfm": "net5.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "5.0.0" + }, + "configProperties": { + "System.Runtime.TieredCompilation": false + } + } +}