Closed TheCakeIsNaOH closed 2 years ago
Unfortunately, updating ilmerge to 3.0.41 did not do anything. https://github.com/TheCakeIsNaOH/choco/actions/runs/1936527475
The error is slightly different, but appears to be the same issue:
Timestamp (UTC): 3/5/2022 12:29:44 AM
ILMerge version 3.0.0.0
Copyright (C) Microsoft Corporation 2004-2006. All rights reserved.
ILMerge /internalize:D:\a\choco\choco\.build.custom\ilmerge.internalize.ignore.txt /targetplatform:v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 /target:exe /out:D:\a\choco\choco\code_drop\merge\choco.exe /keyfile:D:\a\choco\choco\chocolatey.snk /log:D:\a\choco\choco\code_drop\build_artifacts\ilmerge\ilmerge.log /allowDup choco.exe AlphaFS.dll chocolatey.dll chocolatey.resources.dll log4net.dll Microsoft.Web.XmlTransform.dll mscorlib.dll NuGet.Core.dll Rhino.Licensing.dll SimpleInjector.dll System.Reactive.Core.dll System.Reactive.Interfaces.dll System.Reactive.Linq.dll
Set platform to 'v4', using directory 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0' for mscorlib.dll
An exception occurred during merging:
Unable to cast object of type 'System.Compiler.Class' to type 'System.Compiler.DelegateNode'.
at System.Compiler.SystemTypes.Initialize(Boolean doNotLockFile, Boolean getDebugInfo, PostAssemblyLoadProcessor postAssemblyLoad)
at System.Compiler.TargetPlatform.ResetCci(String platformAssembliesLocation, Version targetVersion, Boolean doNotLockFile, Boolean getDebugInfo, PostAssemblyLoadProcessor postAssemblyLoad)
at ILMerging.ILMerge.Merge()
at ILMerging.ILMerge.Main(String[] args)
@TheCakeIsNaOH for now, I think it makes sense to pin to windows-2019
and we can re-visit this once we switch over to using the Chocolatey.Cake.Recipe package for doing this build.
What You Are Seeing?
Recent builds for integration test runs are failing, specifically the ilmerge part of the build is failing. Example: https://github.com/chocolatey/choco/runs/5326351196?check_suite_focus=true
It seems to be due to the
windows-latest
switchover from server 2019 to server 2022.What is Expected?
That the builds succeed.
How Did You Get This To Happen? (Steps to Reproduce)
N/A
Output Log
Build log
~~~sh Running custom tasks if D:\a\choco\choco\.build.custom\ilmerge.replace.build exists (or with .ps1/.rb added to the end of it). Setting app.ruby to 'ruby' Setting app.powershell to 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' [echo] [echo] ==================== [echo] ilmerge REPLACE Extension [echo] ==================== [echo] Running 'D:\a\choco\choco\.build.custom\ilmerge.replace.build' - details will be in the build.log. [nant] D:\a\choco\choco\.build.custom\ilmerge.replace.build Buildfile: file:///D:/a/choco/choco/.build.custom/ilmerge.replace.build Target framework: Microsoft .NET Framework 4.0 Base Directory: D:\a\choco\choco\.build.custom. Target(s) specified: go [property] Property "build.config.settings" already exists, and "overwrite" is set to false. [include] Including file D:\a\choco\choco\.uppercut. [property] Property "project.name" already exists, and "overwrite" is set to false. [property] Property "repository.path" already exists, and "overwrite" is set to false. [property] Property "company.name" already exists, and "overwrite" is set to false. [property] Property "folder.build_scripts" already exists, and "overwrite" is set to false. [property] Property "folder.build_scripts_custom" already exists, and "overwrite" is set to false. [property] Property "version.use_semanticversioning" already exists, and "overwrite" is set to false. [property] Property "version.major" already exists, and "overwrite" is set to false. [property] Property "version.minor" already exists, and "overwrite" is set to false. [property] Property "version.patch" already exists, and "overwrite" is set to false. [property] Property "version.fix" already exists, and "overwrite" is set to false. [property] Property "version.nuget.prerelease" already exists, and "overwrite" is set to false. [property] Property "version.use.build_date" already exists, and "overwrite" is set to false. [property] Property "assembly.description" already exists, and "overwrite" is set to false. [property] Property "assembly.copyright" already exists, and "overwrite" is set to false. [property] Property "sign.project_with_key" already exists, and "overwrite" is set to false. [property] Property "microsoft.framework" already exists, and "overwrite" is set to false. [property] Property "test.framework" already exists, and "overwrite" is set to false. [property] Property "cover.framework" already exists, and "overwrite" is set to false. [property] Property "run.environmentbuilder" already exists, and "overwrite" is set to false. [property] Property "run.deploymentbuilder" already exists, and "overwrite" is set to false. [property] Property "run.gems" already exists, and "overwrite" is set to false. [property] Property "run.metrics" already exists, and "overwrite" is set to false. [property] Property "run.nitriq" already exists, and "overwrite" is set to false. [property] Property "run.moma" already exists, and "overwrite" is set to false. [property] Property "run.fxcop" already exists, and "overwrite" is set to false. [property] Property "run.obfuscator" already exists, and "overwrite" is set to false. [property] Property "run.ilmerge" already exists, and "overwrite" is set to false. [property] Property "run.codesign" already exists, and "overwrite" is set to false. [property] Property "app.test.console" already exists, and "overwrite" is set to false. [property] Property "app.test.console.x86" already exists, and "overwrite" is set to false. [property] Property "app.coveralls" already exists, and "overwrite" is set to false. [property] Property "msbuild.configuration" already exists, and "overwrite" is set to false. [property] Property "run.teamcity" already exists, and "overwrite" is set to false. [property] Property "folder.build_scripts" already exists, and "overwrite" is set to false. [include] Including file D:\a\choco\choco\.build\default.build.settings. [property] Property "project.name" already exists, and "overwrite" is set to false. [property] Property "repository.path" already exists, and "overwrite" is set to false. [property] Property "path_to_solution" already exists, and "overwrite" is set to false. [property] Property "company.name" already exists, and "overwrite" is set to false. [property] Property "file.current.no_extension" already exists, and "overwrite" is set to false. [property] Property "folder.app.drop" already exists, and "overwrite" is set to false. [property] Property "folder.build_scripts" already exists, and "overwrite" is set to false. [property] Property "dirs.build_scripts" already exists, and "overwrite" is set to false. [property] Property "folder.build_scripts_custom" already exists, and "overwrite" is set to false. [property] Property "dirs.build_scripts_custom" already exists, and "overwrite" is set to false. [include] Including file D:\a\choco\choco\.build\csharp.functions. [script] Adding assembly NAnt.Core [script] Adding assembly System [script] Scanning assembly "yw1wpyjt" for extensions. [property] Property "folder.code_build" already exists, and "overwrite" is set to false. [property] Property "dirs.code_build" already exists, and "overwrite" is set to false. [property] Property "dirs.build" already exists, and "overwrite" is set to false. [property] Property "dirs.build.code" already exists, and "overwrite" is set to false. [property] Property "folder.code_drop" already exists, and "overwrite" is set to false. [property] Property "dirs.code_drop" already exists, and "overwrite" is set to false. [property] Property "dirs.drop" already exists, and "overwrite" is set to false. [property] Property "dirs.drop.app" already exists, and "overwrite" is set to false. [property] Property "folder.build_artifacts" already exists, and "overwrite" is set to false. [property] Property "dirs.build_artifacts" already exists, and "overwrite" is set to false. [property] Property "folder.database" already exists, and "overwrite" is set to false. [property] Property "dirs.db" already exists, and "overwrite" is set to false. [property] Property "dirs.database" already exists, and "overwrite" is set to false. [property] Property "dirs.build.database" already exists, and "overwrite" is set to false. [property] Property "folder.reports" already exists, and "overwrite" is set to false. [property] Property "dirs.reports" already exists, and "overwrite" is set to false. [property] Property "folder.deployment" already exists, and "overwrite" is set to false. [property] Property "dirs.deployment" already exists, and "overwrite" is set to false. [property] Property "dirs.drop.deployment" already exists, and "overwrite" is set to false. [property] Property "folder.documentation" already exists, and "overwrite" is set to false. [property] Property "dirs.docs" already exists, and "overwrite" is set to false. [property] Property "dirs.documentation" already exists, and "overwrite" is set to false. [property] Property "dirs.build.docs" already exists, and "overwrite" is set to false. [property] Property "folder.references" already exists, and "overwrite" is set to false. [property] Property "dirs.references" already exists, and "overwrite" is set to false. [property] Property "dirs.tools" already exists, and "overwrite" is set to false. [property] Property "dirs.lib" already exists, and "overwrite" is set to false. [property] Property "folder.settings" already exists, and "overwrite" is set to false. [property] Property "dirs.settings" already exists, and "overwrite" is set to false. [property] Property "dirs.environments.settings" already exists, and "overwrite" is set to false. [property] Property "folder.environment_files" already exists, and "overwrite" is set to false. [property] Property "dirs.environment_files" already exists, and "overwrite" is set to false. [property] Property "dirs.build.environmentfiles" already exists, and "overwrite" is set to false. [property] Property "folder.file_server" already exists, and "overwrite" is set to false. [property] Property "dirs.file_server" already exists, and "overwrite" is set to false. [property] Property "folder.gems" already exists, and "overwrite" is set to false. [property] Property "dirs.gems" already exists, and "overwrite" is set to false. [property] Property "dirs.drop.gems" already exists, and "overwrite" is set to false. [property] Property "folder.nuget" already exists, and "overwrite" is set to false. [property] Property "dirs.nuget" already exists, and "overwrite" is set to false. [property] Property "dirs.drop.nuget" already exists, and "overwrite" is set to false. [property] Property "dirs.program_files" already exists, and "overwrite" is set to false. [property] Property "dirs.program_files_x86" already exists, and "overwrite" is set to false. [property] Property "version.uppercut" already exists, and "overwrite" is set to false. [property] Property "build.step.name" already exists, and "overwrite" is set to false. [property] Property "build.step.path" already exists, and "overwrite" is set to false. [property] Property "file.build_info" already exists, and "overwrite" is set to false. [property] Property "file.uppercut.assembly" already exists, and "overwrite" is set to false. [property] Property "path.uppercut.assembly" already exists, and "overwrite" is set to false. [property] Property "microsoft.framework" already exists, and "overwrite" is set to false. [property] Property "language.short" already exists, and "overwrite" is set to false. [property] Property "language.long" already exists, and "overwrite" is set to false. [property] Property "test.framework" already exists, and "overwrite" is set to false. [property] Property "source_control_type" already exists, and "overwrite" is set to false. [property] Property "cover.framework" already exists, and "overwrite" is set to false. [property] Property "version.use_semanticversioning" already exists, and "overwrite" is set to false. [property] Property "version.major" already exists, and "overwrite" is set to false. [property] Property "version.minor" already exists, and "overwrite" is set to false. [property] Property "version.patch" already exists, and "overwrite" is set to false. [property] Property "version.build" already exists, and "overwrite" is set to false. [property] Property "version.revision" already exists, and "overwrite" is set to false. [property] Property "version.hash" already exists, and "overwrite" is set to false. [property] Property "file.sharedassembly" already exists, and "overwrite" is set to false. [property] Property "path.file.sharedassembly" already exists, and "overwrite" is set to false. [property] Property "assembly.description" already exists, and "overwrite" is set to false. [property] Property "assembly.copyright" already exists, and "overwrite" is set to false. [property] Property "assembly.clscompliant" already exists, and "overwrite" is set to false. [property] Property "allow.partially_trusted_callers" already exists, and "overwrite" is set to false. [property] Property "sign.project_with_key" already exists, and "overwrite" is set to false. [property] Property "path.key.name.private" already exists, and "overwrite" is set to false. [property] Property "path.key.name.public" already exists, and "overwrite" is set to false. [property] Property "version.use.build_date" already exists, and "overwrite" is set to false. [property] Property "version.gem.suffix" already exists, and "overwrite" is set to false. [property] Property "use.gem.build_date" already exists, and "overwrite" is set to false. [property] Property "version.nuget.prerelease" already exists, and "overwrite" is set to false. [property] Property "nuget.version" already exists, and "overwrite" is set to false. [property] Property "nuget.version" already exists, and "overwrite" is set to false. [property] Property "msbuild.configuration" already exists, and "overwrite" is set to false. [property] Property "msbuild.platform" already exists, and "overwrite" is set to false. [property] Property "msbuild.override_output_path" already exists, and "overwrite" is set to false. [property] Property "run.policychecks" already exists, and "overwrite" is set to false. [property] Property "run.manifestbuilder" already exists, and "overwrite" is set to false. [property] Property "run.environmentbuilder" already exists, and "overwrite" is set to false. [property] Property "run.deploymentbuilder" already exists, and "overwrite" is set to false. [property] Property "run.analyzers" already exists, and "overwrite" is set to false. [property] Property "run.tests" already exists, and "overwrite" is set to false. [property] Property "run.codecoverage" already exists, and "overwrite" is set to false. [property] Property "run.ilmerge" already exists, and "overwrite" is set to false. [property] Property "run.gems" already exists, and "overwrite" is set to false. [property] Property "app.test.console" already exists, and "overwrite" is set to false. [property] Property "app.test.console.x86" already exists, and "overwrite" is set to false. [property] Property "dirs.test_results" already exists, and "overwrite" is set to false. [property] Property "file.test_results" already exists, and "overwrite" is set to false. [property] Property "tests.excluded_categories.comma_separated" already exists, and "overwrite" is set to false. [property] Property "app.codecoverage" already exists, and "overwrite" is set to false. [property] Property "app.codecoverage.explorer" already exists, and "overwrite" is set to false. [property] Property "codecoverage.filters" already exists, and "overwrite" is set to false. [property] Property "app.ndepend" already exists, and "overwrite" is set to false. [property] Property "run.ndepend" already exists, and "overwrite" is set to false. [property] Property "app.strongname" already exists, and "overwrite" is set to false. [property] Property "app.metrics" already exists, and "overwrite" is set to false. [property] Property "app.metrics" already exists, and "overwrite" is set to false. [property] Property "run.metrics" already exists, and "overwrite" is set to false. [property] Property "app.fxcop" already exists, and "overwrite" is set to false. [property] Property "app.fxcop" already exists, and "overwrite" is set to false. [property] Property "app.fxcop_project" already exists, and "overwrite" is set to false. [property] Property "file.fxcop_project" already exists, and "overwrite" is set to false. [property] Property "run.fxcop" already exists, and "overwrite" is set to false. [property] Property "app.moma" already exists, and "overwrite" is set to false. [property] Property "run.moma" already exists, and "overwrite" is set to false. [property] Property "app.nitriq" already exists, and "overwrite" is set to false. [property] Property "run.nitriq" already exists, and "overwrite" is set to false. [property] Property "app.xbuild" already exists, and "overwrite" is set to false. [property] Property "app.obfuscator" already exists, and "overwrite" is set to false. [property] Property "run.obfuscator" already exists, and "overwrite" is set to false. [property] Property "app.nuget" already exists, and "overwrite" is set to false. [property] Property "app.nuget" already exists, and "overwrite" is set to false. [property] Property "run.nuget" already exists, and "overwrite" is set to false. [property] Property "app.ruby" already exists, and "overwrite" is set to false. [property] Property "app.powershell" already exists, and "overwrite" is set to false. [property] Property "app.ilmerge" already exists, and "overwrite" is set to false. [property] Property "dirs.merge.from" already exists, and "overwrite" is set to false. [property] Property "dirs.merge.to" already exists, and "overwrite" is set to false. [property] Property "file.merge.name" already exists, and "overwrite" is set to false. [property] Property "merge.target.type" already exists, and "overwrite" is set to false. set_environment_variables: error_check: get_regular_dlls: [echo] Getting output dlls based on name in directory D:\a\choco\choco\code_drop\chocolatey\console. run_ilmerge: [echo] Merging the the contents of D:\a\choco\choco\code_drop\chocolatey\console into a single executable - D:\a\choco\choco\code_drop\merge\choco.exe. This will fail if all dependencies are not resolved. [echo] Running this: D:\a\choco\choco\lib\ILMerge\ILMerge.exe /internalize:D:\a\choco\choco\.build.custom\ilmerge.internalize.ignore.txt /targetplatform:"v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /target:exe /out:D:\a\choco\choco\code_drop\merge\choco.exe /keyfile:D:\a\choco\choco\chocolatey.snk /log:D:\a\choco\choco\code_drop\build_artifacts\ilmerge\ilmerge.log /allowDup choco.exe AlphaFS.dll chocolatey.dll chocolatey.resources.dll log4net.dll Microsoft.Web.XmlTransform.dll mscorlib.dll NuGet.Core.dll Rhino.Licensing.dll SimpleInjector.dll System.Reactive.Core.dll System.Reactive.Interfaces.dll System.Reactive.Linq.dll [exec] Starting 'D:\a\choco\choco\lib\ILMerge\ILMerge.exe (/internalize:D:\a\choco\choco\.build.custom\ilmerge.internalize.ignore.txt /targetplatform:"v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /target:exe /out:D:\a\choco\choco\code_drop\merge\choco.exe /keyfile:D:\a\choco\choco\chocolatey.snk /log:D:\a\choco\choco\code_drop\build_artifacts\ilmerge\ilmerge.log /allowDup choco.exe AlphaFS.dll chocolatey.dll chocolatey.resources.dll log4net.dll Microsoft.Web.XmlTransform.dll mscorlib.dll NuGet.Core.dll Rhino.Licensing.dll SimpleInjector.dll System.Reactive.Core.dll System.Reactive.Interfaces.dll System.Reactive.Linq.dll)' in 'D:\a\choco\choco\code_drop\chocolatey\console' BUILD FAILED - 0 non-fatal error(s), 3 warning(s) D:\a\choco\choco\.build.custom\ilmerge.replace.build(79,6): External Program Failed: D:\a\choco\choco\lib\ILMerge\ILMerge.exe (return code was 1): NAnt.Core.BuildException: D:\a\choco\choco\.build.custom\ilmerge.replace.build(79,6): External Program Failed: D:\a\choco\choco\lib\ILMerge\ILMerge.exe (return code was 1) at NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask() at NAnt.Core.Tasks.ExecTask.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run() Total time: 2.5 seconds. BUILD FAILED - 0 non-fatal error(s), 13 warning(s) Nested build failed. Refer to build log for exact reason.: NAnt.Core.BuildException: Nested build failed. Refer to build log for exact reason. at NAnt.Core.Tasks.NAntTask.RunBuild(FileInfo buildFile) at NAnt.Core.Tasks.NAntTask.ExecuteTask() at NAnt.Core.Task.Execute() at uppercut.tasks.CustomExtensionTask.run_the_task() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run() Total time: 2.9 seconds. BUILD FAILED - 0 non-fatal error(s), 10 warning(s) Nested build failed. Refer to build log for exact reason.: NAnt.Core.BuildException: Nested build failed. Refer to build log for exact reason. at NAnt.Core.Tasks.NAntTask.RunBuild(FileInfo buildFile) at NAnt.Core.Tasks.NAntTask.ExecuteTask() at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) at NAnt.Core.Task.Execute() at NAnt.Core.Target.Execute() at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) at NAnt.Core.Project.Execute() at NAnt.Core.Project.Run() Total time: 99.8 seconds. ~~~
Ilmerge log
~~~sh ILMerge version 2.14.1208.65535 Copyright (C) Microsoft Corporation 2004-2006. All rights reserved. ILMerge /internalize:D:\a\choco\choco\.build.custom\ilmerge.internalize.ignore.txt /targetplatform:v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 /target:exe /out:D:\a\choco\choco\code_drop\merge\choco.exe /keyfile:D:\a\choco\choco\chocolatey.snk /log:D:\a\choco\choco\code_drop\build_artifacts\ilmerge\ilmerge.log /allowDup choco.exe AlphaFS.dll chocolatey.dll chocolatey.resources.dll log4net.dll Microsoft.Web.XmlTransform.dll mscorlib.dll NuGet.Core.dll Rhino.Licensing.dll SimpleInjector.dll System.Reactive.Core.dll System.Reactive.Interfaces.dll System.Reactive.Linq.dll Set platform to 'v4', using directory 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0' for mscorlib.dll An exception occurred during merging: Unable to cast object of type 'System.Compiler.Class' to type 'System.Compiler.DelegateNode'. at System.Compiler.SystemTypes.Initialize(Boolean doNotLockFile, Boolean getDebugInfo, PostAssemblyLoadProcessor postAssemblyLoad) at ILMerging.ILMerge.Merge() at ILMerging.ILMerge.Main(String[] args) ~~~