SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

ModBuildConfig 4.3.0: ContentPacks IgnoreModFilePatterns attribute not working as expected

b-b-blueberry opened this issue ยท 1 comments

commented

Expected:
Using ItemGroup ContentPacks, including a CP project in the same solution would copy both C# and CP components to a parent folder when the C# project is built, ignoring paths and patterns given in the IgnoreModFilePatterns and IgnoreModFilePaths attributes on ContentPacks.

Issue:
Solution projects included in ContentPacks will deploy all files and folders to the output folder, regardless of attributes given in the main project ContentPacks or the CP project PropertyGroup.

Reproduce:

  1. Create solution including multiple projects buildable with ModBuildConfig,
  2. Add ItemGroup ContentPacks to the main project, including any other projects,
  3. Build main project, bundling all files from included projects.

Attachments:
Minimum repro solution with basic C# and CP projects
Solution.zip

Other info:
Possible cause?

// parse ignore patterns
string[] ignoreFilePaths = this.GetCustomIgnoreFilePaths(this.IgnoreModFilePatterns).ToArray();
Regex[] ignoreFilePatterns = this.GetCustomIgnorePatterns(this.IgnoreModFilePaths).ToArray();

// get options
ignoreFilePaths = this.GetCustomIgnoreFilePaths(item.GetMetadata("IgnoreModFilePatterns")).ToArray();
ignoreFilePatterns = this.GetCustomIgnorePatterns(this.IgnoreModFilePaths).ToArray();

commented

Fixed via 5030379 in mod build package 4.3.2. Thanks for reporting it!