gpt4 book ai didi

mono - 这些 Mono/xbuild 警告是什么意思,我该如何修复它们?

转载 作者:行者123 更新时间:2023-12-04 07:58:11 26 4
gpt4 key购买 nike

我使用 Mono 的 xbuild 2.10.5.0 构建 VS2010 项目。这些项目使用“.NET Framework 3.5 客户端配置文件”作为目标框架(它们必须与 3.5 兼容,我只需要客户端配置文件部分)。

我收到以下警告:

Build succeeded.

Warnings:

c:\Project\MyProject.csproj (default targets) -> C:\PROGRA~2\Mono\lib\mono\4.0\Microsoft.Common.targets (GetReferenceAssemblyPaths target) ->
C:\PROGRA~2\Mono\lib\mono\4.0\Microsoft.Common.targets: warning : Unable to find framework corresponding to the target framework moniker '.NETFramework,Version=v3.5,Profile=Client'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior.

c:\Project\MyProject.csproj (default targets) -> C:\PROGRA~2\Mono\lib\mono\4.0\Microsoft.Common.targets (ResolveAssemblyReferences target) ->
C:\PROGRA~2\Mono\lib\mono\4.0\Microsoft.Common.targets: warning : Reference 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' not resolved
C:\PROGRA~2\Mono\lib\mono\4.0\Microsoft.Common.targets: warning : Found a conflict between : 'System' and 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System' reference.
C:\PROGRA~2\Mono\lib\mono\4.0\Microsoft.Common.targets: warning : Found a conflict between : 'System.Core' and 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System.Core' reference.

恐怕我不明白这些和唯一的谷歌命中 "Unable to find framework corresponding to the target framework moniker"是该错误消息的提交。

这些警告是什么意思,我该如何解决? Mono 根本不支持“客户端配置文件”吗?如果是这样,我在 Mono 文档中找不到任何相关信息。 Unresolved 原因是什么 mscorlib引用和这两个在哪里 System引用它报告之间的冲突?

最佳答案

您猜对了 - Mono 不支持“客户端”配置文件(例如,搜索 Mono version of 3.5 Microsoft.Common.targets 以获取任何提及“客户端”的内容),仅支持完整的 3.5 和 4.0 配置文件。要修复它们,您需要在项目文件中指定受支持的配置文件之一。配置文件选择仅限制构建期间可用的引用集,使用“客户端”配置文件编译的程序集将适用于“完整”配置文件。
mscorlib, Version=2.0.0.0正在发生未解析的引用,因为您正在使用 4.0 配置文件(这是默认回退)进行编译。一旦您将配置文件设置为支持的值,它就会消失。如果不想更改项目文件,可以使用 xbuild /p:TargetFrameworkProfile="" 构建,它正确地选择了 3.5 组程序集。

关于mono - 这些 Mono/xbuild 警告是什么意思,我该如何修复它们?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7228499/

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