KeePass 2.30 won't build against Mono 4 (on Linux or FreeBSD). The install docs state that Mono ≥ 2.6 is required, they don't mention an upper bound. So Mono 4 should imho (be made to) work.
See also Gentoo Linux bug 558094 and this FreeBSD-related thread from the KeePass forum. On the former, this Fedora modification was pointed out as a possible fix:
find . -name "*.sln" -print -exec sed -i 's/Format Version 10.00/Format Version 11.00/g' {} \; find . -name "*.csproj" -print -exec sed -i 's#ToolsVersion="3.5"#ToolsVersion="4.0"#g; s#<TargetFrameworkVersion>.*</TargetFrameworkVersion>##g; s#<PropertyGroup>#<PropertyGroup><TargetFrameworkVersion>v4.5</TargetFrameworkVersion>#g' {} \;
The corresponding modifications in ArchLinux are formulated like this (and apparently leave the TargetFrameworkVersion unmodified):
# "Convert" to mono 4.0 sed -i '1s/ 10.00/ 11.00/' KeePass.sln find . -name "*.csproj" -exec sed -i '1s/"3.5"/"4.0"/' {} +
I noticed that Debian apparently drops the ToolsVersion attribute completely from the main csproj file. Not sure whether that's enough, though, since Mono 4 hasn't entered Debian unstable yet, at the time I'm writing this. Just an idle observation.
I don't know what upgrading the Format Version and the ToolsVersion as above does to backwards compatibility, both of the data files and of compile-time compatibility with older versions of mono. But I'd prefer if KeePass could be compiled against new versions of Mono but not ancient ones, as opposed to the other way round.
Sorry, didn't know that MarkDown here didn't support triple backtick (
```
) as a code block delimiter. The code blocks above should readand
See https://sourceforge.net/p/keepass/discussion/329221/thread/72db1a65/