c# – 如何让Mono使用正确的ToolsVersion?

XBuild Engine Version 12.0
Mono,Version 3.2.8.0

我试图在XBuild中构建我的C#解决方案.它在Windows中构建非常好,但不是在ubuntu中.我收到以下错误

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?

和类似.我已经将RedditSharp.dll添加到GAC,所以我不知道为什么它找不到它,我当然不知道为什么它找不到IReadOnlyCollection.我怀疑这一切都是因为我不能使用Toolsversion 14.0.

有没有人知道在Linux上构建C#?我究竟做错了什么?

解决方法

14表示MSBuild 14,它是Visual Studio 2015的一部分.通常,Mono xbuild在一段时间后才支持最新的Visual Studio版本.所以你要么等到更新,要么hack xbuild,如果你喜欢.

一个解决方法是将您的项目转换为MSBuild版本12

相关文章

在要实现单例模式的类当中添加如下代码:实例化的时候:frmC...
1、如果制作圆角窗体,窗体先继承DOTNETBAR的:public parti...
根据网上资料,自己很粗略的实现了一个winform搜索提示,但是...
近期在做DSOFramer这个控件,打算自己弄一个自定义控件来封装...
今天玩了一把WMI,查询了一下电脑的硬件信息,感觉很多代码都...
最近在研究WinWordControl这个控件,因为上级要求在系统里,...