Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FSharp.Core.sigdata not found alongside FSharp.Core

Tags:

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>>" %>

Of course, for this to work, I have to add Microsoft.FSharp.Collections to the namespaces element in my web.config:

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

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

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

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

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

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.

like image 543
Mauricio Scheffer Avatar asked Apr 28 '10 22:04

Mauricio Scheffer


1 Answers

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

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

like image 178
Brian Avatar answered Sep 29 '22 12:09

Brian