fix self-contained install on Windows

This commit is contained in:
Jesse Plamondon-Willard 2021-12-04 20:25:53 -05:00
parent c80d07fddf
commit cc35dbdb3d
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
4 changed files with 10 additions and 20 deletions

View File

@ -97,11 +97,10 @@ for folder in ${folders[@]}; do
rm -rf "$internalPath/assets"
# runtime config for SMAPI
if [ $folder == "linux" ] || [ $folder == "macOS" ]; then
cp "$installAssets/runtimeconfig.unix.json" "$bundlePath/StardewModdingAPI.runtimeconfig.json"
else
cp "$installAssets/runtimeconfig.$folder.json" "$bundlePath/StardewModdingAPI.runtimeconfig.json"
fi
# This is identical to the one generated by the build, except that the min runtime version is
# set to 5.0.0 (instead of whatever version it was built with) and rollForward is set to latestMinor instead of
# minor.
cp "$installAssets/runtimeconfig.json" "$bundlePath/StardewModdingAPI.runtimeconfig.json"
# installer DLL config
if [ $folder == "windows" ]; then

View File

@ -5,11 +5,12 @@
{
"name": "Microsoft.NETCore.App",
"version": "5.0.0",
"rollForward": "major"
"rollForward": "latestMinor"
}
],
"configProperties": {
"System.Runtime.TieredCompilation": false
"System.Runtime.TieredCompilation": false,
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
}
}
}

View File

@ -1,13 +0,0 @@
{
"runtimeOptions": {
"tfm": "net5.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "5.0.0",
"rollForward": "major"
},
"configProperties": {
"System.Runtime.TieredCompilation": false
}
}
}

View File

@ -13,6 +13,9 @@
<!--copy dependency DLLs to bin folder so we can include them in installer bundle -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<!-- tiered compilation breaks Harmony -->
<TieredCompilation>false</TieredCompilation>
</PropertyGroup>
<Import Project="..\..\build\common.targets" />