Skip to content
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

(#3534) Fix ILMerge of no7zip version of choco.exe #3537

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gep13
Copy link
Member

@gep13 gep13 commented Oct 26, 2024

Description Of Changes

This commit addresses this problem by updating the build configuration to remove the compiling of the test projects when it is the ReleaseOfficialNo7zip configuration. With this change in place, the compiled choco.exe for the no7zip version is now smaller than the normal choco.exe.

Motivation and Context

It was noted that during the compilation of the final release build, the generated choco.exe for the no7zip version of Chocolatey CLI was bigger then expected.

After investigation, it was found that tests project output, including all the WireMock assemblies were being added to the output directory. Due to the fact that the selection of the files to be ILMerge'd collects all the files in the output directory, all of these files were being put into the final choco.exe.

Testing

  1. ./build.ps1 -Configuration ReleaseOfficial
  2. Check the size of the choco.exe in the following folders:
    • code_drop\temp\_PublishedApps\choco_merged
    • code_drop\temp\_PublishedApps\choco_no7zip_merged
  3. Verify that the latter is smaller than the former

Operating Systems Testing

N/A

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?

Related Issues

Fixes #3534

It was noted that during the compilation of the final release build,
the generated choco.exe for the no7zip version of Chocolatey CLI was
bigger then expected.

After investigation, it was found that tests project output, including
all the WireMock assemblies were being added to the output directory.
Due to the fact that the selection of the files to be ILMerge'd collects
all the files in the output directory, all of these files were being
put into the final choco.exe.

This commit addresses this problem by updating the build configuration
to remove the compiling of the test projects when it is the
ReleaseOfficialNo7zip configuration.  With this change in place, the
compiled choco.exe for the no7zip version is now smaller than the
normal choco.exe.
@gep13 gep13 requested a review from vexx32 October 26, 2024 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no7zip build step is ILmerging all the test assemblies into the final choco.exe
1 participant