ILRepack.FullAuto icon indicating copy to clipboard operation
ILRepack.FullAuto copied to clipboard

Package depends on mono on non-Windows OS

Open Tejes opened this issue 2 years ago • 0 comments

Running on Ubuntu 23.10, .NET SDK 7.0, referenced the 1.5.0 version of the package, no other configuration added. Build output:

$ dotnet pack -c Release
MSBuild version 17.4.8+6918b863a for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
  /usr/bin/sh: 2: /tmp/MSBuildTempuser/tmpd0a90ec0569a4c518835a60de5a26a13.exec.cmd: mono: not found
/home/user/.nuget/packages/ilrepack.fullauto/1.5.0/build/ILRepack.FullAuto.targets(88,5): error MSB3073: The command "mono "/home/user/.nuget/packages/ilrepack/2.0.27/tools/ILRepack.exe" --parallel --union  --internalize   --allowduplicateresources  --lib:"[cut for brevity]"" exited with code 127. [/home/user/git/Example.csproj]

Adding <ILRepackBuildToolingRuntimeName>dotnet </ILRepackBuildToolingRuntimeName> to a PropertyGroup in the csproj fixes the problem. Looks like the logic here assumes that if we are not on Windows, we should use mono. I do not agree.

Tejes avatar Jan 22 '24 08:01 Tejes