F#交互抛出未在PCLStorage中实现异常

F#交互抛出未在PCLStorage中实现异常,f#,portable-class-library,f#-interactive,F#,Portable Class Library,F# Interactive,我尝试在F#interactive中使用PCLStorage.FileSystem.Current时未实现异常 我用NuGet下载了PCLStorage,右键单击参考并单击“发送到F#interactive” 我正在使用VS2015更新1,并按照建议重新安装了该软件包 如何让PCLStorage在F#interactive中工作 --> Referenced 'C:\Users\amade\Documents\GitHub\audioExperiments\src\Audio\packag

我尝试在F#interactive中使用
PCLStorage.FileSystem.Current
时未实现异常

我用NuGet下载了PCLStorage,右键单击参考并单击“发送到F#interactive”

我正在使用VS2015更新1,并按照建议重新安装了该软件包

如何让PCLStorage在F#interactive中工作

--> Referenced 'C:\Users\amade\Documents\GitHub\audioExperiments\src\Audio\packages\PCLStorage.1.0.2\lib\portable-net45+wp8+wpa81+win8+monoandroid+monotouch+Xamarin.iOS+Xamarin.Mac\PCLStorage.dll'

> open PCLStorage;;
> PCLStorage.FileSystem.Current;;
> System.NotImplementedException: This functionality is not implemented in the portable version of this assembly.  You should reference the PCLStorage NuGet package from your main application project in order to reference the platform-specific implementation.
   at PCLStorage.FileSystem.get_Current()
   at <StartupCode$FSI_0017>.$FSI_0017.main@()
Stopped due to error
-->引用了“C:\Users\amade\Documents\GitHub\audioExperiments\src\Audio\packages\PCLStorage.1.0.2\lib\portable-net45+wp8+wpa81+win8+monoaroid+monotouch+Xamarin.iOS+Xamarin.Mac\PCLStorage.dll”
>打开PCLStorage;;
>PCLStorage.FileSystem.Current;;
>System.NotImplementedException:此功能未在此程序集的可移植版本中实现。您应该参考主应用程序项目中的PCLStorage NuGet包,以便参考特定于平台的实现。
在PCLStorage.FileSystem.get_Current()处
地址:$FSI_0017.main@()
由于错误而停止

您提到的PCL是针对所有平台(Xamarin、Windows桌面、Windows phone等)设计的。此dll仅用作将所有单个方法定义为诱饵和开关PCL技术的一部分的一种方法。如果您希望将库与FSI一起使用,则需要向相应平台的dll添加特定引用。在这种情况下,您需要参考从NuGet下载的项目的windows桌面版本。

鉴于您的F#interactive在.NET的完整版本中运行,您需要编译一个与之匹配的库。谢谢,这很有意义!
#r
指令是将Windows DLL加载到交互式窗口的正确方法吗?