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

Build fails on Kail linux.... #5

Open
kaze-nomamani opened this issue Jul 7, 2021 · 1 comment
Open

Build fails on Kail linux.... #5

kaze-nomamani opened this issue Jul 7, 2021 · 1 comment

Comments

@kaze-nomamani
Copy link

May I know how to build code from Kali linux machine? I got errors...


dotnet msbuild /t:Restore /t:Clean /t:Build /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None /t:ILMerge /p:TrimUnusedDependencies=true

Microsoft (R) Build Engine version 16.10.1+2fd48ab73 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
All projects are up-to-date for restore.
WSuspicious -> /home/kali/Downloads/WSuspicious/WSuspicious/bin/Release/net45/WSuspicious.exe
An exception occurred during merging:
The type initializer for 'System.Compiler.CoreSystemTypes' threw an exception.
at System.Compiler.SystemTypes.Clear () [0x00013] in <23e1453939fb46538ee2be5a58d160d0>:0
at System.Compiler.TargetPlatform.Clear () [0x0007e] in <23e1453939fb46538ee2be5a58d160d0>:0
at System.Compiler.TargetPlatform.ResetCci (System.String platformAssembliesLocation, System.Version targetVersion, System.Boolean doNotLockFile, System.Boolean getDebugInfo, System.Compiler.AssemblyNode+PostAssemblyLoadProcessor postAssemblyLoad) [0x00001] in <23e1453939fb46538ee2be5a58d160d0>:0
at ILMerging.ILMerge.Merge () [0x002fb] in <8563c1f661ab40b2bd1382779cdc2720>:0
at ILMerging.ILMerge.Main (System.String[] args) [0x00100] in <8563c1f661ab40b2bd1382779cdc2720>:0
Assembly '/home/kali/Downloads/WSuspicious/WSuspicious/bin/Release/net45/BouncyCastle.Crypto.dll' doesn't have an entry point.
Assembly '/home/kali/Downloads/WSuspicious/WSuspicious/bin/Release/net45/BrotliSharpLib.dll' doesn't have an entry point.
Assembly '/home/kali/Downloads/WSuspicious/WSuspicious/bin/Release/net45/System.Buffers.dll' doesn't have an entry point.
Assembly '/home/kali/Downloads/WSuspicious/WSuspicious/bin/Release/net45/System.Memory.dll' doesn't have an entry point.
Assembly '/home/kali/Downloads/WSuspicious/WSuspicious/bin/Release/net45/System.Runtime.CompilerServices.Unsafe.dll' doesn't have an entry point.
Assembly '/home/kali/Downloads/WSuspicious/WSuspicious/bin/Release/net45/System.Threading.Tasks.Extensions.dll' doesn't have an entry point.
Assembly '/home/kali/Downloads/WSuspicious/WSuspicious/bin/Release/net45/Titanium.Web.Proxy.dll' doesn't have an entry point.
/home/kali/Downloads/WSuspicious/WSuspicious/WSuspicious.csproj(26,5): error MSB3073: The command "/home/kali/.nuget/packages/ilmerge/3.0.29/build/../tools/net452/ILMerge.exe bin/Release/net45/WSuspicious.exe /out:WSuspicious.exe ^
/home/kali/Downloads/WSuspicious/WSuspicious/WSuspicious.csproj(26,5): error MSB3073: bin/Release/net45/BouncyCastle.Crypto.dll ^
/home/kali/Downloads/WSuspicious/WSuspicious/WSuspicious.csproj(26,5): error MSB3073: bin/Release/net45/BrotliSharpLib.dll ^
/home/kali/Downloads/WSuspicious/WSuspicious/WSuspicious.csproj(26,5): error MSB3073: bin/Release/net45/System.Buffers.dll ^
/home/kali/Downloads/WSuspicious/WSuspicious/WSuspicious.csproj(26,5): error MSB3073: bin/Release/net45/System.Memory.dll ^
/home/kali/Downloads/WSuspicious/WSuspicious/WSuspicious.csproj(26,5): error MSB3073: bin/Release/net45/System.Runtime.CompilerServices.Unsafe.dll ^
/home/kali/Downloads/WSuspicious/WSuspicious/WSuspicious.csproj(26,5): error MSB3073: bin/Release/net45/System.Threading.Tasks.Extensions.dll ^
/home/kali/Downloads/WSuspicious/WSuspicious/WSuspicious.csproj(26,5): error MSB3073: bin/Release/net45/Titanium.Web.Proxy.dll" exited with code 1.

@MaxNad
Copy link
Member

MaxNad commented Jul 7, 2021

The failing target (ILMerge) is used to bundle every DLL inside a single .exe file to make the executable a bit more portable.

According to ILMerge GitHub repository: ILMerge works only on Windows-based platforms. It does not yet support Rotor or Mono.. Since the ILMerge project is now archived, I doubt this will change in the future.

This step was provided for convenience, but is in no mean necessary. You should still have the compiled binary and .dll in the bin/Release/net45 folder.

I will try to experiment a bit with il-repack to see if I could swap the ILMerge library for it. In the meantime, you can download il-repack (https://github.com/gluck/il-repack) and try it locally to package the dlls if you want.

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

No branches or pull requests

2 participants