gpt4 book ai didi

c# - 已编译的单声道缺少默认 .NET 库 - 未定义或导入 System.Object

转载 作者:IT王子 更新时间:2023-10-29 03:55:41 30 4
gpt4 key购买 nike

我已经按照位于此处的指南在 OS X Mavericks 上编译了单声道:http://www.mono-project.com/docs/compiling-mono/mac/

现在,当我使用 xbuild 编译我的应用程序时,出现以下错误:

CSC: error CS0518: The predefined type `System.Object' is not defined or imported
CSC: error CS0518: The predefined type `System.ValueType' is not defined or imported
CSC: error CS0518: The predefined type `System.Attribute' is not defined or imported
CSC: error CS0518: The predefined type `System.Int32' is not defined or imported
CSC: error CS0518: The predefined type `System.UInt32' is not defined or imported
CSC: error CS0518: The predefined type `System.Int64' is not defined or imported
CSC: error CS0518: The predefined type `System.UInt64' is not defined or imported
CSC: error CS0518: The predefined type `System.Single' is not defined or imported
CSC: error CS0518: The predefined type `System.Double' is not defined or imported
CSC: error CS0518: The predefined type `System.Char' is not defined or imported
CSC: error CS0518: The predefined type `System.Int16' is not defined or imported
CSC: error CS0518: The predefined type `System.Decimal' is not defined or imported
CSC: error CS0518: The predefined type `System.Boolean' is not defined or imported
CSC: error CS0518: The predefined type `System.SByte' is not defined or imported
CSC: error CS0518: The predefined type `System.Byte' is not defined or imported
CSC: error CS0518: The predefined type `System.UInt16' is not defined or imported
CSC: error CS0518: The predefined type `System.String' is not defined or imported
CSC: error CS0518: The predefined type `System.Enum' is not defined or imported
CSC: error CS0518: The predefined type `System.Delegate' is not defined or imported
CSC: error CS0518: The predefined type `System.MulticastDelegate' is not defined or imported
CSC: error CS0518: The predefined type `System.Void' is not defined or imported
CSC: error CS0518: The predefined type `System.Array' is not defined or imported
CSC: error CS0518: The predefined type `System.Type' is not defined or imported
CSC: error CS0518: The predefined type `System.Collections.IEnumerator' is not defined or imported
CSC: error CS0518: The predefined type `System.Collections.IEnumerable' is not defined or imported
CSC: error CS0518: The predefined type `System.IDisposable' is not defined or imported
CSC: error CS0518: The predefined type `System.IntPtr' is not defined or imported
CSC: error CS0518: The predefined type `System.UIntPtr' is not defined or imported
CSC: error CS0518: The predefined type `System.RuntimeFieldHandle' is not defined or imported
CSC: error CS0518: The predefined type `System.RuntimeTypeHandle' is not defined or imported
CSC: error CS0518: The predefined type `System.Exception' is not defined or imported

当我在 OS X 上使用单声道安装程序时,我从未收到任何这些错误。

(我正在构建单声道,因为我正在向未完成的 .NET 框架添加功能)

运行 autogen.sh 的结果:https://gist.github.com/Geesu/149332f3f877c891d387运行 make 的结果:https://gist.github.com/Geesu/4296f7d4c6c368d6986d

最佳答案

如果有类似这样的警告:

/lib/mono/4.5/Microsoft.Common.targets:  warning : Unable to find framework corresponding to the target framework moniker '.NETFramework,Version=v2.0'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.

您可以在命令行上覆盖 .NET Framework:

xbuild /p:TargetFrameworkVersion="v4.0"

您可以更改您的解决方案:

<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

关于c# - 已编译的单声道缺少默认 .NET 库 - 未定义或导入 System.Object,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27594393/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com