You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building BenchmarkDotNet project. bin directory takes about 79MB, and runtimes directory takes about 47MB of them.
These files are also outputted for build results of CsProjToolChain.
Is it able to remove these files?
These runtimes files are almost copied from Gee.External.Capstone package.
And these files seems required when using DisassemblyDiagnoser and requires only benchmark target runtime.
Example custom MSBuild target
I've confirmed. It can remove runtimes files by using following custom target.
(Note: It's tested Windows Environment only)
<PropertyGroup>
<!-- When TargetFramework containstarget platform -->
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform )' == ''">%(RuntimePack.RuntimeIdentifier)</BenchmarkDotNetTargetPlatform >
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform )' == ''">$(RuntimeIdentifier)</BenchmarkDotNetTargetPlatform >
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform )' == ''">$(RuntimeIdentifiers)</BenchmarkDotNetTargetPlatform >
<!-- Otherwise, resolve current build platform -->
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform)' == '' AND $([MSBuild]::IsOSPlatform('Linux')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X86'">linux-X86</BenchmarkDotNetTargetPlatform>
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform)' == '' AND $([MSBuild]::IsOSPlatform('Linux')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">linux-x64</BenchmarkDotNetTargetPlatform>
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform)' == '' AND $([MSBuild]::IsOSPlatform('Linux')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">linux-arm64</BenchmarkDotNetTargetPlatform>
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform)' == '' AND $([MSBuild]::IsOSPlatform('Windows')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X86'">win-x86</BenchmarkDotNetTargetPlatform>
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform)' == '' AND $([MSBuild]::IsOSPlatform('Windows')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">win-x64</BenchmarkDotNetTargetPlatform>
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform)' == '' AND $([MSBuild]::IsOSPlatform('Windows')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">win-arm64</BenchmarkDotNetTargetPlatform>
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform)' == '' AND $([MSBuild]::IsOSPlatform('OSX')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">osx-x64</BenchmarkDotNetTargetPlatform>
<BenchmarkDotNetTargetPlatformCondition="'$(BenchmarkDotNetTargetPlatform)' == '' AND $([MSBuild]::IsOSPlatform('OSX')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">osx-arm64</BenchmarkDotNetTargetPlatform>
</PropertyGroup>
<TargetName="FilterCopyLocalFiles"AfterTargets="ResolveLockFileCopyLocalFiles">
<ItemGroupCondition="'$(BenchmarkDotNetTargetPlatform)' != '' AND $(BenchmarkDotNetTargetPlatform) != 'all'">
<ReferenceCopyLocalPathsRemove="@(ReferenceCopyLocalPaths)"Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' == 'Gee.External.Capstone' AND '%(ReferenceCopyLocalPaths.RuntimeIdentifier)' != $(BenchmarkDotNetTargetPlatform)" />
</ItemGroup>
</Target>
Additionally Microsoft.CodeAnalysis satellite assemblies takes about 6MB.
These files should be removed also if possible. (via SatelliteResourceLanguages property or custom MSBuild target)
The text was updated successfully, but these errors were encountered:
If you push your changes to a branch on your fork, it should automatically run the tests on Linux and windows so you can see if it works properly. Happy to review a PR.
When building BenchmarkDotNet project.
bin
directory takes about 79MB, andruntimes
directory takes about47MB
of them.These files are also outputted for build results of
CsProjToolChain
.Is it able to remove these files?
These
runtimes
files are almost copied fromGee.External.Capstone
package.And these files seems required when using
DisassemblyDiagnoser
and requires only benchmark target runtime.I thought it's better to copy runtime that are required for current build environment by default.
Playwright.NET using this approach. https://playwright.dev/dotnet/docs/library#bundle-drivers-for-different-platforms
Example custom MSBuild target
I've confirmed. It can remove runtimes files by using following custom target.
(Note: It's tested Windows Environment only)
Additionally
Microsoft.CodeAnalysis
satellite assemblies takes about 6MB.These files should be removed also if possible. (via
SatelliteResourceLanguages
property or custom MSBuild target)The text was updated successfully, but these errors were encountered: