问题描述
针对F#PowerPack的预构建二进制文件是针对.NET 2.0运行时进行编译的.如果我有一个.NET 4.0项目,那么为.NET 4运行时编译PowerPack源代码有什么好处吗?
我在 F#代码片段网站中使用了.NET 2.0版本的F#PowerPack.,这是一个.NET 4.0 ASP.NET项目.不使用4.0版本的唯一缺点是,当寻找2.0版本(由PowerPack的2.0版本引用)时,我不得不添加配置以加载4.0版本的 FSharp.Core.dll
./p>
我必须添加如下内容,然后效果很好:
< configuration><!-...-><运行时>< assemblyBinding xmlns ="urn:schemas-microsoft-com:asm.v1">< dependentAssembly>< assemblyIdentity name ="FSharp.Core" publicKeyToken ="b03f5f7f11d50a3a"/>< bindingRedirect oldVersion ="2.0.0.0" newVersion ="4.0.0.0"/></dependentAssembly></assemblyBinding></runtime></configuration>
The pre-built binaries for the F# PowerPack are compiled against the .NET 2.0 runtime. If I have a .NET 4.0 project, is there any advantage to compiling the PowerPack source for the .NET 4 runtime?
I used .NET 2.0 version of F# PowerPack in F# snippets web site, which is a .NET 4.0 ASP.NET project. The only disadvantage of not using 4.0 version was that I had to add configuration to load 4.0 version of FSharp.Core.dll
when looking for 2.0 version (which is referenced by the 2.0 version of PowerPack).
I had to add something like the following and then it worked just fine:
<configuration>
<!-- ... -->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" />
<bindingRedirect oldVersion="2.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
这篇关于F#PowerPack目标运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!