XBuild Engine Version 12.0
Mono, Version 3.2.8.0
I'm trying to build my C# solution in XBuild. It builds absolutely fine in Windows, but not on Ubuntu. I get the following errors:
warning : Project has unknown ToolsVersion '14.0'. Using the default tools version '4.0' instead.
Target GetFrameworkPaths:
/usr/lib/mono/4.5/Microsoft.Common.targets: warning : TargetFrameworkVersion 'v4.5.2' not supported by this toolset (ToolsVersion: 4.0).
error CS0246: The type or namespace name 'RedditSharp' could not be found. Are you missing an assembly reference?
error CS0246: The type or namespace name `IReadOnlyCollection' could not be found. Are you missing an assembly reference?
and similar. I have added RedditSharp.dll to the GAC, so I don't know why it can't find it, and I certainly don't know why it can't find IReadOnlyCollection. I have a suspicion that it's all because I can't use ToolsVersion 14.0.
Does anybody know anything about building C# on Linux? What am I doing wrong?
14 means MSBuild 14, which is part of Visual Studio 2015. Usually Mono xbuild only supports the latest Visual Studio release after a while. So you either wait till it is updated, or hack xbuild if you like.
Another workaround is to convert your projects to MSBuild version 12
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With