icsharpcode / ILSpy

.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
21.65k stars 3.36k forks source link

ILSpy fails to build on linux #3327

Open Fancy2209 opened 3 days ago

Fancy2209 commented 3 days ago

Steps to reproduce

  1. Clone the Repository
  2. Install dotnet-sdk and PowerShell
  3. Try to build ILSpy with dotnet build ILSpy.XPlat.slnf

Error message shown

MSBuild version 17.8.5+b5265ef37 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
  b4d85a557cc1110444856a2f568f51bd0165b1f8
  ICSharpCode.Decompiler.TestRunner -> /home/paulo/ILSpy/ICSharpCode.Decompiler.TestRunner/bin/Debug/net8.0/ICSharpCode.Decompiler.TestRunner.dll
  ILSpyUpdateAssemblyInfo-917956862
/home/paulo/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj(719,5): error : fatal: Invalid revision range d779383cb85003d6dabeb976f0845631e07bf463..HEAD
/home/paulo/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj(719,5): error MSB3073: The command "pwsh -NoProfile -ExecutionPolicy Bypass -File BuildTools/update-assemblyinfo.ps1 Debug" exited with code -1.

Build FAILED.

/home/paulo/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj(719,5): error : fatal: Invalid revision range d779383cb85003d6dabeb976f0845631e07bf463..HEAD
/home/paulo/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj(719,5): error MSB3073: The command "pwsh -NoProfile -ExecutionPolicy Bypass -File BuildTools/update-assemblyinfo.ps1 Debug" exited with code -1.
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:00:01.54

Details

Tried to compile ILSpy on endavourOS, powerhsell is from powershell-bin on the AUR.

christophwille commented 3 days ago

It is definitely the PS failing that is computing the version number. Can you run that directly?

Fancy2209 commented 2 days ago

I did try that and seemed to get the same result

siegfriedpammer commented 1 day ago

It looks like your are using a shallow clone. I fixed an error in the script when working with shallow clones... can you try again with latest master? Thanks!

Fancy2209 commented 15 hours ago

Ah yes indeed, I used --depth=1 since normally to just build stuff it's way quicker, will retest!