Build errors on Linux


I’m trying to get started with Duplicati on Linux. The binary package worked fine on my Ubuntu 18.04.2 LTS, but I can’t build the current tree source. After replacing msbuild with xbuild in (and running dos2unix) on it, I get several errors, but starting with:

---- 8< ----
LogEntry.cs(83,51): error CS1644: Feature `declaration expression’ cannot be used because it is not part of the C# 6.0 language specification
LambdaSupport.cs(36,31): error CS1525: Unexpected symbol ‘throw’
LambdaSupport.cs(65,35): error CS1525: Unexpected symbol ‘throw’
---- 8< ----

My mono compiler is:
Mono JIT compiler version 4.6.2 (Debian

I’m not a C# programmer, but some quick googling suggest that these are language features that were removed from C# 6 proper. What is the right way forward here?

The Duplicati source relies on some C# 7 language features. Mono started supporting some of these in version 5.0.0. There are some C# 7 features that were implemented in later versions of Mono so unfortunately, I don’t know the minimum version of Mono that is required.

1 Like

These errors were fixed after upgrading the compiler to

Mono JIT compiler version

That package also includes msbuild, so no need to use xbuild anymore.