"在F#中考虑装配的app.config重新映射..."警告

Old*_*vec 23 f# compiler-warnings

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

考虑从版本"2.0.0.0"[C:\ Program Files(x86)\ Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v2中重新装配程序集"FSharp.Core,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a"的app.config. 0\FSharp.Core.dll]到版本"4.0.0.0"[C:\ Program Files(x86)\ Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v4.0\FSharp.Core.dll]来解决冲突和摆脱警告.C:\ Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1490,5):警告MSB3247:发现同一依赖程序集的不同版本之间存在冲突.

我该怎么办?我不知道如何做这样的重新映射.

Bri*_*ian 20

下面是我认为一个示例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>
Run Code Online (Sandbox Code Playgroud)

  • 这个工具帮助我诊断了类似的问题:http://mikehadlow.blogspot.com/2011/02/asmspy-little-tool-to-help-fix-assembly.html (3认同)