使用MonoDevelop 5.1.0编译解决方案和通过调用XBuild的Cake脚本编译相同的解决方案时,我得到了不同的行为。
使用 MonoDevelop 编译解决方案时,一切正常。通过我的蛋糕脚本编译时,我收到以下错误:
System.IDisposable' 类型是在未引用的程序集中定义的。考虑添加对程序集 System.Runtime、Version=4.0.0.0、Culture=neutral、PublicKeyToken=b03f5f7f11d50a3a' 的引用
这种不同行为的原因可能是什么?
蛋糕脚本没有做任何花哨的事情。它只是用完全相同的解决方案调用 XBuild。
我的环境(在 Fedora 23 上):
mono --version
Mono JIT compiler version 4.4.0 (Stable 4.4.0.142/81f38a9 Thu Apr 28 09:14:25 EDT 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
XBuild Version:
XBuild Engine Version 14.0
Mono, Version 4.4.0.0
Copyright (C) 2005-2013 Various Mono authors