Hi,
Can you please provide the exact commands you used to build ExMatter? This is very unclear, you also mention ILRepack even though ILMerge is used. I also needed to specifically install netfx-4.5.2-devpack which is not mentioned.
Running:
fails during ilmerge with the following error:
MSBuild version 17.14.23+b0019275e for .NET Framework
Determining projects to restore...
All projects are up-to-date for restore.
1>Checking Build System
ExMatter -> C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\Debug\ExMatter.exe
[CMAKE] Building ILMerge
Determining projects to restore...
All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\9.0.305\Microsoft.CSharp.CurrentVersion.targets(130,9): warning MSB3884: Could not find rule set file "Sdl7.0.ruleset". [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilme
rge-src\System.Compiler\System.Compiler.csproj] [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
System.Compiler -> C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilmerge-src\System.Compiler\bin\Debug\System.Compiler.dll
ILMerge -> C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilmerge-src\ILMerge\bin\Debug\net452\ILMerge.exe
Running IL merging on System.Compiler and ILMerge.exe
C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilmerge-src\ILMerge\ILMerge.csproj(46,5): error MSB3073: The command "ILMerge.exe /ndebug "/log:C:\Users\administrator\ael\ManagedServices\alphv_blackcat
\Resources\ExMatter\_deps\ilmerge-src\ILMerge/obj\Debug\net452\ilmerge.log" "/delaysign" "/keyfile:C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilmerge-src\ILMerge\..\Common\InterimKey.snk" "/target
platform:v4,%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /t:exe /out:final/ILMerge.exe ILMerge.exe System.Compiler.dll" exited with code 1. [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\R
esources\ExMatter\ExMatter\ExMatter.csproj]
Build FAILED.
C:\Program Files\dotnet\sdk\9.0.305\Microsoft.CSharp.CurrentVersion.targets(130,9): warning MSB3884: Could not find rule set file "Sdl7.0.ruleset". [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilme
rge-src\System.Compiler\System.Compiler.csproj] [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilmerge-src\ILMerge\ILMerge.csproj(46,5): error MSB3073: The command "ILMerge.exe /ndebug "/log:C:\Users\administrator\ael\ManagedServices\alphv_blackcat
\Resources\ExMatter\_deps\ilmerge-src\ILMerge/obj\Debug\net452\ilmerge.log" "/delaysign" "/keyfile:C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilmerge-src\ILMerge\..\Common\InterimKey.snk" "/target
platform:v4,%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /t:exe /out:final/ILMerge.exe ILMerge.exe System.Compiler.dll" exited with code 1. [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\R
esources\ExMatter\ExMatter\ExMatter.csproj]
1 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.45
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: The command "setlocal [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Re
sources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: cd C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter [C:
\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\administrator\ael\ManagedServices\alphv
_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: C: [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\Ex
Matter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\administrator\ael\ManagedServices\alphv
_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -E echo "[CMAKE] Building ILMerge" [C:\Users
\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\administrator\ael\ManagedServices\alphv
_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: dotnet build C:/Users/administrator/ael/ManagedServices/alphv_blackcat/Resources/Ex
Matter/_deps/ilmerge-src/ILMerge/ILMerge.csproj [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\administrator\ael\ManagedServices\alphv
_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -E echo "[CMAKE] Merging ExMatter" [C:\Users
\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\administrator\ael\ManagedServices\alphv
_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\
ilmerge-src\ILMerge\bin\Debug\net452\ILMerge.exe C:/Users/administrator/ael/ManagedServices/alphv_blackcat/Resources/ExMatter/ExMatter/Debug/ExMatter.exe /t:exe /out:C:/Users/administrator/ael/ManagedServices/alphv_blackcat/Resources/Ex
Matter/ExMatter/Debug/ExMatter.exe C:/Users/administrator/ael/ManagedServices/alphv_blackcat/Resources/ExMatter/ExMatter/Debug/Renci.SshNet.dll [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\ExMat
ter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\administrator\ael\ManagedServices\alphv
_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -E echo "[CMAKE] Confusing ExMatter" [C:\Use
rs\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\administrator\ael\ManagedServices\alphv
_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\
confuser-src\Confuser.CLI.exe C:/Users/administrator/ael/ManagedServices/alphv_blackcat/Resources/ExMatter/ExMatter/ExmatterDebug.crproj [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\ExMatter.csp
roj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\administrator\ael\ManagedServices\alphv
_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: :cmEnd [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatte
r\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\Users\administrator\a
el\ManagedServices\alphv_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: :cmErrorLevel [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\
ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: exit /b %1 [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExM
atter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: :cmDone [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatt
er\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Users\administrator\ael\ManagedServices\alphv
_blackcat\Resources\ExMatter\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: :VCEnd [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatte
r\ExMatter\ExMatter.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(6041,5): error MSB3073: " exited with code 1. [C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Re
sources\ExMatter\ExMatter\ExMatter.csproj]
aes-tool -> C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\aes-tool\Debug\aes-tool.exe
[CMAKE] Moving aes-tool to /bin/
Looking at the ilmerge log file:
=============================================
Timestamp (UTC): 10/23/2025 12:12:04 PM
ILMerge version 3.0.0.0
Copyright (C) Microsoft Corporation 2004-2006. All rights reserved.
ILMerge /ndebug /log:C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilmerge-src\ILMerge/obj\Debug\net452\ilmerge.log /delaysign /keyfile:C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilmerge-src\ILMerge\..\Common\InterimKey.snk /targetplatform:v4,C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 /t:exe /out:final/ILMerge.exe ILMerge.exe System.Compiler.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) in C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilmerge-src\System.Compiler\SystemTypes.cs:line 1920
at System.Compiler.TargetPlatform.ResetCci(String platformAssembliesLocation, Version targetVersion, Boolean doNotLockFile, Boolean getDebugInfo, PostAssemblyLoadProcessor postAssemblyLoad) in C:\Users\administrator\ael\ManagedServices\alphv_blackcat\Resources\ExMatter\_deps\ilmerge-src\System.Compiler\SystemTypes.cs:line 654
at ILMerging.ILMerge.Merge()
at ILMerging.ILMerge.Main(String[] args)
it seems that something is wrong with ILMerge itself...
Can you help figuring out how this was built for the scenario?
Thanks in advance!
Hi,
Can you please provide the exact commands you used to build ExMatter? This is very unclear, you also mention ILRepack even though ILMerge is used. I also needed to specifically install
netfx-4.5.2-devpackwhich is not mentioned.Running:
fails during ilmerge with the following error:
Looking at the ilmerge log file:
it seems that something is wrong with ILMerge itself...
Can you help figuring out how this was built for the scenario?
Thanks in advance!