“考虑程序集的app.config重新映射...” F#中的警告 [英] "Consider app.config remapping of assembly ..." warning in F#

查看:81
本文介绍了“考虑程序集的app.config重新映射...” F#中的警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装VS11之后,我开始出现以下错误:

After I installed VS11, I started to get the following error:


考虑对程序集 FSharp.Core,来自版本 2.0.0.0的区域性=中性,PublicKeyToken = b03f5f7f11d50a3a [C:\Program Files(x86)\参考程序集\Microsoft\FSharp\2.0\Runtime\v2.0\FSharp。 Core.dll]到版本 4.0.0.0 [C:\Program Files(x86)\参考程序集\Microsoft\FSharp\2.0\Runtime\v4.0\FSharp.Core.dll]解决冲突并摆脱警告。
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1490,5):警告MSB3247:发现同一从属程序集的不同版本之间存在冲突。 / p>

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.

我该怎么办?我不知道如何进行这种重新映射。

What exactly should I do? I have no idea how to do such a remapping.

推荐答案

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

Below is I think a sample app.config that does what is suggested. However, what is in your project, and what FSharp.Core reference is there? Are you targeting .Net 4.5 or 4.0 or what? Does this project reference some older F# library? This typically is because two projects reference different versions of FSharp.Core.dll, e.g. check the <Reference> nodes in the .fsproj files.

<?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>

这篇关于“考虑程序集的app.config重新映射...” F#中的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆