f# - F# 中的 "Consider app.config remapping of assembly ..."警告

标签 f# compiler-warnings

安装VS11后,我开始收到以下错误:

Consider app.config remapping of assembly "FSharp.Core, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "2.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v2.0\FSharp.Core.dll] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v4.0\FSharp.Core.dll] to solve conflict and get rid of warning. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1490,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly.



我应该怎么做?我不知道如何进行这样的重新映射。

最佳答案

下面是我认为执行建议的示例 app.config。但是,您的项目中有什么,有什么 FSharp.Core 引用?你的目标是 .Net 4.5 或 4.0 还是什么?该项目是否引用了一些较旧的 F# 库?这通常是因为两个项目引用了不同版本的 FSharp.Core.dll,例如检查 <Reference> .fsproj 文件中的节点。

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
          <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a"
                            culture="neutral"/>
<!--      <bindingRedirect oldVersion="0.0.0.0-2.9.9.9" newVersion="4.3.0.0"/>  -->
          <bindingRedirect oldVersion="2.0.0.0" newVersion="4.0.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

关于f# - F# 中的 "Consider app.config remapping of assembly ..."警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7951560/

相关文章:

c - 编译器中哪个函数负责接受main()的返回值

swift - Swift 中的类型检查是如何工作的

F# Fable 和 JS 互操作 : unsafe list casting

c++ - 警告 C5246 : the initialization of a subobject should be wrapped in braces

c# - .NET 项目中的条件引用是否可以消除警告?

syntax - F# 构造函数语法 - 覆盖和扩充 new

c++ - 我可以让 GCC 在将太宽的类型传递给函数时发出警告吗?

f# - 即使 f# 没有安装在服务器上,也可以在服务器上运行 f# 代码

list - F# 类型 obj 但我想要 'a

f# - 涉及静态类型转换的 f# 方法的泛型类型约束