-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: Add custom MsBuild targets to remove unnecessary files from bin directory #2737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: Add custom MsBuild targets to remove unnecessary files from bin directory #2737
Conversation
@adamsitnik Do you have any concerns with this change? |
For additional confirmation: It seems x86/x64 disassembler is processed by Iced library. |
Additionally, currently ARM32 disassembler for
And disassembler on maxOS seems also not supported by current BenchmarkDotNet version. BenchmarkDotNet/src/BenchmarkDotNet/Disassemblers/DisassemblyDiagnoser.cs Lines 145 to 147 in c21ac5a
Note: Latest version of ClrMD supports macOS. So I though it can add disassembler support for macOS. |
This PR intended to resolve #2736
What's changed in this PR
1. Add custom MSBuild targets file to nupkg.
This custom target is packed as
buildTransitive/BenchmarkDotNet.targets
file.And it'sused by .NET SDK-Style projects. (It's ignored when referenced from .NET Framework non-SDK style project)
2. Details of custom MSBuild target process.
It try to set
BenchmarkDotNetTargetPlatform
property.If target
runtime
is explicitly specified (e.g.--runtime
) just use specified runtime.Otherwise. try to use current build environment platform.
Then
FilterBenchmarkDotNetPackageAssets
custom target try to remove following files.runtime/*
files that are copied fromGee.External.Capstone
packageMicrosoft.CodeAnalysis.*
packageBreaking changes
This PR contains following breaking changes.
runtimes\*
files that not matched to current build environment are not copied to bin by default.When it need to use old behaviors. It need to set following MSBuild property on benchmark project.
What's tested on my environment.
I've confirmed PR behaviors with following steps (On Windows/Ubuntu on WSL)
packages
directory as package source.3.1.
runtimes/*
directory contains only current build environment's runtime only3.2. Satellite assembly directory is not copied to bin directory.
--keepFiles
options. and confirm temporary project outputs.Additionally, I've confirmed following behaviors.
dotnet publish -r {runtimeIdentifier}
command works as expected. (Satellite assembly is not copied)