Skip to content

chore: Add setting to remove unused files from bin directory on local build#3192

Merged
timcassell merged 1 commit into
dotnet:masterfrom
filzrev:chore-remove-unneeded-files-on-local-build
Jul 9, 2026
Merged

chore: Add setting to remove unused files from bin directory on local build#3192
timcassell merged 1 commit into
dotnet:masterfrom
filzrev:chore-remove-unneeded-files-on-local-build

Conversation

@filzrev

@filzrev filzrev commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This PR is the successor to #2737.

On existing implementation,
Custom targets is executed only when using NuGet package (PackageReference).
And it's not works on local build (ProjectReference)

By this PR changes,
BdnFilterPackageAssets target is executed on local build also.

1. What's changed in this PR

1.1.Add Directory.Build.targets file under samples/tests directory.
By this change custom target is loaded on local build.

1.2.Modify BenchmarkDotNet/BenchmarkDotNet.targets file

  • Rename custom target name to use Bdn prefix. (To improve searchability in the binlog)
  • Add additional conditions to filter satellite assembly resources.
  • Apply code formatter.

2. Tasks that are not covered in this PR

1. Remove non arm64 platform native dependencies
Currently Capstone's native dependencies are used for arm64 platform only.
So it can remove native dependencies.

2. Remove unused files that generated on temp build directory.
Autogenerated project don't use BenchmarkDotNet.targets.
So custom target is not executed on CsProjGenerator relating toolchain currently.

@timcassell timcassell merged commit 7067dfd into dotnet:master Jul 9, 2026
11 checks passed
@timcassell timcassell added this to the v0.16.0 milestone Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants