无法在infer.net好玩//硬链接相关的DLL加载FSharp.Core版本4.0.0? [英] Can't load FSharp.Core version 4.0.0 in infer.net fun // hard link dependency in a dll ?

查看:157
本文介绍了无法在infer.net好玩//硬链接相关的DLL加载FSharp.Core版本4.0.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想Infer.Net(<一href="http://research.microsoft.com/en-us/downloads/21e87d72-782d-4657-82c4-4f77c2b547ca/default.aspx"相对=nofollow>一个F#库概率编程) 并运行VS11 Beta版的例子导致错误:

I am trying Infer.Net (An F# Library for Probabilistic Programming) And running the examples in VS11 Beta lead to the error :

无法加载文件或程序集FSharp.Core,版本= 4.0.0.0,   文化=中性公钥= b03f5f7f11d50a3a或它的一个   依赖性。该系统找不到指定的文件。

Could not load file or assembly 'FSharp.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

如果我打开的dll用于反射器,一个probcomp.dll的infer.net样品,称它无法找到自动FSharp.Core,版本= 4.0.0.0,而我需要选择手动位置

If I open the dlls used the infer.net samples in Reflector, one, probcomp.dll, says it can not find automatically "FSharp.Core, Version=4.0.0.0"and that I need to select the location by hand.

是两件事联系在一起? 难道probcomp.dll已编制了固定路径的参考,而且现在还不是我的机器上一样吗?

Are the two things linked ? Is it possible that probcomp.dll has been compiled with a 'fixed path' reference and that now it is not the same on my machine ?

PS:当然fsharp项目从无到有工作正常。

PS : of course fsharp projects from scratch are working fine..

PS2:在Visual Studio中基准的DLL不显示,他们没有发现任何迹象。我可以在对象浏览器中打开它们。

PS2 : The dll under reference in visual studio do not show any sign that they are not found. And I can open them in the object browser.

更新

在错误发生后紧按节目的开始,也没有时间去看什么。 然而,它发生里面的程序:如果下面的行不叫

The error happens tight at start of the program, there is no time to see anything. Yet, it happens INSIDE the program : If the following line is not called

let coinsD = inferExpr <@ coins @> 

然后,错误不会发生。 有了它,下面的错误引发,在不同的示例 毫不奇怪,它是从他的行为是在反射奇怪的DLL。

Then the errors does not happen. With it, the following error is raised, in a different example Unsurprisingly, it is from the dll whose behaviour was strange in reflector.

无法加载文件或程序集FSharp.Core,版本= 4.0.0.0,   文化=中性公钥= b03f5f7f11d50a3a或它的一个   依赖性。 找到的程序集清单定义不   匹配的程序集引用。 (从HRESULT异常:0x80131040)

Could not load file or assembly 'FSharp.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

该函数的签名是相当的奇怪的对象浏览器:

The signature of the said function is quite strange in the object browser :

public static IDistribution<b>inferExpr<b>(**unknown-type e**)

然而,在反射器的我告诉他哪里在打开的dll找Fsharp 4.0.0,它具有签名

YET, in reflector after I told him where to find Fsharp 4.0.0 upon opening the dll, it has the signature

public static IDistribution<b> inferExpr<b>(FSharpExpr<b> e);

此DLL必须有某种奇怪的硬链接的依赖,而反射器更聪明(或不..),比VS要搞清楚。

This dll must have some kind of strange hard link dependencies, and reflector is smarter (or not..) than VS to figure it out.

要拍好从坏的,如果你有什么可能发生在此DLL中的任何想法,这可能是一个机会,去学习。

To make a good from a bad, if you have any idea of what could have happened in this dll, this could be an occasion to learn.

推荐答案

我能够运行在VS11针对.NET 4.0和使用FSharp.Core 4.0.0.0的例子。我针对.NET 时遇到错误4.5 并改变FSharp.Core为 4.3.0.0 版本。

I'm able to run that example in VS11 targeting .NET 4.0 and using FSharp.Core 4.0.0.0. I encounter an error when targeting .NET 4.5 and changing FSharp.Core to 4.3.0.0 version.

所以,问题是dll文件之间没有硬链接的相关性。改变的目标框架的中的项目属性的到.NET 4.0和小心加入FSharp.Core 4.0.0.0中的参考的对话框(注意到有各种版本FSharp.Core可用)将解决这个问题。

So the problem is not hard link dependencies between dlls. Changing Target Framework in Project Properties to .NET 4.0 and carefully adding FSharp.Core 4.0.0.0 in Reference dialog (noticing there are various versions of FSharp.Core available) would solve the problem.

在你的情况下,由于F#2.0运行时丢失,做上述步骤之前先安装它。

In your case, since F# 2.0 runtime is missing, installing it first before doing the above step.

这篇关于无法在infer.net好玩//硬链接相关的DLL加载FSharp.Core版本4.0.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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