简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM