diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2023-01-09 12:27:49 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2023-01-09 12:27:49 -0500 |
commit | b4e95a92b33c541d36379d69d3650c5c22ea324c (patch) | |
tree | de020a6dc7e065f725d68ea43b4a3a57eb7ccf8c /src/SMAPI.ModBuildConfig | |
parent | 368b25b5411683192f4398616abed61441457799 (diff) | |
parent | 25b8e13ba827a0512f5089d3bd22e8ed1a15e7ba (diff) | |
download | SMAPI-b4e95a92b33c541d36379d69d3650c5c22ea324c.tar.gz SMAPI-b4e95a92b33c541d36379d69d3650c5c22ea324c.tar.bz2 SMAPI-b4e95a92b33c541d36379d69d3650c5c22ea324c.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.ModBuildConfig')
-rw-r--r-- | src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs | 23 | ||||
-rw-r--r-- | src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj | 4 |
2 files changed, 19 insertions, 8 deletions
diff --git a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs index 00f3f439..d47e492a 100644 --- a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs +++ b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs @@ -215,13 +215,24 @@ namespace StardewModdingAPI.ModBuildConfig.Framework return true; } - // check for bundled assembly types - // When bundleAssemblyTypes is set, *all* dependencies are copied into the build output but only those which match the given assembly types should be bundled. - if (bundleAssemblyTypes != ExtraAssemblyTypes.None) + // ignore by assembly type + ExtraAssemblyTypes type = this.GetExtraAssemblyType(file, modDllName); + switch (bundleAssemblyTypes) { - var type = this.GetExtraAssemblyType(file, modDllName); - if (type != ExtraAssemblyTypes.None && !bundleAssemblyTypes.HasFlag(type)) - return true; + // Only explicitly-referenced assemblies are in the build output. These should be added to the zip, + // since it's possible the game won't load them (except game assemblies which will always be loaded + // separately). If they're already loaded, SMAPI will just ignore them. + case ExtraAssemblyTypes.None: + if (type is ExtraAssemblyTypes.Game) + return true; + break; + + // All assemblies are in the build output (due to how .NET builds references), but only those which + // match the bundled type should be in the zip. + default: + if (type != ExtraAssemblyTypes.None && !bundleAssemblyTypes.HasFlag(type)) + return true; + break; } return false; diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj index cded6f65..badabfc7 100644 --- a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -10,7 +10,7 @@ <!--NuGet package--> <PackageId>Pathoschild.Stardew.ModBuildConfig</PackageId> <Title>Build package for SMAPI mods</Title> - <Version>4.0.2</Version> + <Version>4.1.0</Version> <Authors>Pathoschild</Authors> <Description>Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 3.13.0 or later.</Description> <PackageLicenseExpression>MIT</PackageLicenseExpression> @@ -24,7 +24,7 @@ <ItemGroup> <PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.10" /> - <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> + <PackageReference Include="Newtonsoft.Json" Version="13.0.2" /> <!-- This is imported through Microsoft.Build.Utilities.Core. When installed by a mod, NuGet |