FSharp.Core.sigdata没有发现一起FSharp.Core [英] FSharp.Core.sigdata not found alongside FSharp.Core

查看:340
本文介绍了FSharp.Core.sigdata没有发现一起FSharp.Core的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用F#的ASP.NET MVC应用程序。我的一个控制器动作发送一个F#列表视图,所以我写的:

I'm trying to use F# for an ASP.NET MVC application. One my controller actions sends an F# list to the view, so I write:

<%@ Page Language="C#" Inherits="ViewPage<FSharpList<int>>" %>

当然,对于这个工作,我必须 Microsoft.FSharp.Collections 添加到的命名空间在我的web.config 元素:

<add namespace="Microsoft.FSharp.Collections"/>

和增加 FSharp.Core 的引用,在的组件元素:

and add a reference to FSharp.Core, in the assemblies element:

<add assembly="FSharp.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

只要我添加此程序集的引用,每个视图(无论它使用F#类型或没有)失败,此错误:

As soon as I add this assembly reference, every view (whether it uses an F# type or not) fails with this error:

错误FS1221:FSharp.Core.sigdata没有发现一起FSharp.Core

error FS1221: FSharp.Core.sigdata not found alongside FSharp.Core

我可以变通的作法是没有我的任何意见F#特定类型的,但什么是此错误的原因是什么?此外,哪来的 FSharp.Core.sigdata ?这不是我的GAC,我不能在任何地方找到它。

I can work around this by not having any F# specific types in my views, but what's the reason for this error? Also, where's FSharp.Core.sigdata ? It's not in my GAC and I can't find it anywhere.

推荐答案

您将与参考大会找到它,因为sigdata和optdata是设计时的东西(但我猜codeDOM需要他们吗?)例如:

You'll find it with the Reference Assemblies, as sigdata and optdata are design-time things (but I guess CodeDom needs them too?), e.g.:

C:\Program Files\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v2.0\FSharp.Core.dll
C:\Program Files\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v2.0\FSharp.Core.optdata
C:\Program Files\Reference Assemblies\Microsoft\FSharp\2.0\Runtime\v2.0\FSharp.Core.sigdata

如果您复制旁边FSharp.Core该应用程序使用的,它可能会工作。

If you copy those next to the FSharp.Core that the app is using, it will probably work.

这篇关于FSharp.Core.sigdata没有发现一起FSharp.Core的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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