Rei Miyasaka
Rei Miyasaka

Reputation: 7096

Referencing F# libraries from a Windows Store/Metro C# app

I'm attempting to do some SharpDX in F#. SharpDX can't be imported into a Portable Library, only into a standard .NET library.

Having worked around a glaring bug to reference the F# library from the C# app, I now run into another problem upon execution:

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

This is a familiar exception, but I don't know what would be causing it in Visual Studio 2012.

Upvotes: 3

Views: 433

Answers (1)

Martin Suchan
Martin Suchan

Reputation: 10620

As far as I know, you can only reference F# Portable Libraries in Windows Store projects, not regular f# dlls, that's the first thing.
The second, as the error says - you have to reference the FSharp.Core library. It's located here:

C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\3.0\Runtime.NETPortable\FSharp.Core.dll

I have answered similar question here with more info:
https://stackoverflow.com/a/13064798/574062

Upvotes: 3

Related Questions