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

Add additional settings for ILMerge #4032

Closed
gep13 opened this issue Oct 30, 2022 · 1 comment · Fixed by #4042
Closed

Add additional settings for ILMerge #4032

gep13 opened this issue Oct 30, 2022 · 1 comment · Fixed by #4042
Assignees
Milestone

Comments

@gep13
Copy link
Member

gep13 commented Oct 30, 2022

In the current version of Cake, 2.3.0, the ILMerge alias is defined as the following:

public static void ILMerge(this ICakeContext context, FilePath outputFile, FilePath primaryAssembly, IEnumerable<FilePath> assemblyPaths, ILMergeSettings settings)

with the following settings available to be set:

        /// <summary>
        /// Gets or sets a value indicating whether whether types in assemblies other
        /// than the primary assembly should have their visibility modified to internal.
        /// </summary>
        /// <value>
        /// <c>true</c> if types in assemblies other than the primary assembly should
        /// have their visibility modified to internal; otherwise, <c>false</c>.
        /// </value>
        public bool Internalize { get; set; }

        /// <summary>
        /// Gets or sets the target kind.
        /// </summary>
        /// <value>The target kind.</value>
        public TargetKind TargetKind { get; set; }

        /// <summary>
        /// Gets or sets the target platform.
        /// </summary>
        /// <value>The target platform.</value>
        public TargetPlatform TargetPlatform { get; set; }

However, looking at the output from the help message for the ILMerge tool, there are additional options that can be provided, and I would like to add in these available options:

❯ .\tools\ILMerge.3.0.41\tools\net452\ILMerge.exe -h
Usage: ilmerge [/lib:directory]* [/log[:filename]] [/keyfile:filename | /keycontainer:containername [/delaysign]] [/internalize[:filename]] [/t[arget]:(library|exe|winexe)] [/closed] [/ndebug] [/ver:version] [/copyattrs [/allowMultiple] [/keepFirst]] [/xmldocs] [/attr:filename] [/targetplatform:<version>[,<platformdir>] | /v1 | /v1.1 | /v2 | /v4] [/useFullPublicKeyForReferences] [/wildcards] [/zeroPeKind] [/allowDup:type]* [/union] [/align:n] /out:filename <primary assembly> [<other assemblies>...]

These options are:

  • /lib
  • /log
  • /keyfile
  • /keycontainer
  • /delaysign
  • /internalize - already covered in current implementation
  • /target - already covered in current implementation
  • /closed
  • /ndebug
  • /ver
  • /copyattrs
  • /allowmultiple
  • /keepfirst
  • /xmldocs
  • /attr
  • /targetplatform - already covered in current implementation
  • /useFullPublicKeyReferences
  • /wildcards
  • /zeroPeKind
  • /allowDup
  • /union
  • /align
  • /out - already covered in current implementation
@gep13 gep13 self-assigned this Oct 30, 2022
gep13 added a commit to gep13/cake that referenced this issue Nov 1, 2022
Using the documentation available here:

https://github.com/dotnet/ILMerge/blob/master/ilmerge-manual.md

added the missing settings that can be set when calling ilmerge.exe
@gep13 gep13 added this to the v3.0.0 milestone Nov 1, 2022
gep13 added a commit to gep13/cake that referenced this issue Nov 2, 2022
Using the documentation available here:

https://github.com/dotnet/ILMerge/blob/master/ilmerge-manual.md

added the missing settings that can be set when calling ilmerge.exe
@cake-build-bot
Copy link

🎉 This issue has been resolved in version v3.0.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants