调试System.TypeLoadException

时间:2011-07-09 00:12:58

标签: mono nant boo

我正在尝试在mono-4.0 Nant配置文件上编译Boo并且出现以下错误,我在调试时遇到了问题。

booi:

Invalid type Boo.Lang.Compiler.CompilerParameters for instance field Boo.Lang.Compiler.CompilerContext:_parameters
Missing method .ctor in assembly /Users/tristanz/Projects/boo/build/Boo.Lang.Compiler.dll, type System.Security.SecurityRulesAttribute
Can't find custom attr constructor image: /Users/tristanz/Projects/boo/build/Boo.Lang.Compiler.dll mtoken: 0x0a00097b

BUILD FAILED - 0 non-fatal error(s), 2 warning(s)

INTERNAL ERROR

System.TypeLoadException: Could not load type 'System.Security.SecurityRulesAttribute' from assembly 'Boo.Lang.Compiler'.
  at Boo.NAnt.BooTask.ExecuteTask () [0x00000] in <filename unknown>:0 
  at NAnt.Core.Task.Execute () [0x00000] in <filename unknown>:0

任何想法都会非常感激。

1 个答案:

答案 0 :(得分:2)

问题是NAnt本身必须在4.下运行才能使BooTask正常工作,所以mono --runtime = v4.0就是修复。