gpt4 book ai didi

.net - 使用 Mac OSX 在 Mono 上使用 .NET 4 时出现 mscorlib 错误

转载 作者:行者123 更新时间:2023-12-01 13:58:06 24 4
gpt4 key购买 nike

我有一个 F# 项目,我想为其使用 .NET 4(用于 System.Numerics)。然而,当我尝试在 .NET 4 中编译时(我使用的是 MonoDevelop)我得到了错误:

unknown-file: Error 0: warning FS0217: The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced library '/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/4.0/System.dll'. Consider recompiling the library or making an explicit reference to a version of this library that matches the CLI version you are using. (0) (ApproximationSuite)

有谁知道我该如何解决这个问题?

最佳答案

明确引用 mscorlib,版本 4,如下所示:

<Reference Include="mscorlib" />

然后会出现另一个类似的错误(您没有兼容的 FSharp.Core)。这是因为它不是这个库的 4.0 版本。但是,您不需要重新编译,因为您可以在 v4.0 子目录中找到像 this 这样的包的编译版本。 (请注意,它的脚本不会将 v4.0 安装到 gac)。如果你把 4.0 版本放到 MonoDevelop 寻找它的地方(可能是/usr/lib/fsharp/),它应该编译得很好。

关于.net - 使用 Mac OSX 在 Mono 上使用 .NET 4 时出现 mscorlib 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6972218/

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