简体   繁体   English

从F#Library访问Windows命名空间

[英]Access Windows namespace from F# Library

I am trying to create a F# Library to use with Windows Store apps. 我正在尝试创建一个用于Windows应用商店应用的F#库。 I need access to the Windows namespace (especially Windows.Storage ). 我需要访问Windows命名空间(尤其是Windows.Storage )。 What type of project should I choose for the library? 我应该为图书馆选择什么类型的项目?

When I select F# Portable Library, there is no way to add reference to Windows.Storage, neither when I create a project of type F# Library. 当我选择F#Portable Library时,无法在我创建F#Library类型的项目时添加对Windows.Storage的引用。 I am looking for something like Class Library (Windows Store Apps) 我正在寻找类库(Windows Store Apps)之类的东西

I've found Windows.Storage in here: C:\\Program Files (x86)\\Windows Kits\\8.0\\References\\CommonConfiguration\\Neutral\\Windows.winmd . 我在这里找到了Windows.StorageC:\\Program Files (x86)\\Windows Kits\\8.0\\References\\CommonConfiguration\\Neutral\\Windows.winmd This means that F# cannot directly reference it. 这意味着F#不能直接引用它。

I suggest that you model your back-end around it (you do have to combine C# with your F# code, because F# doesn't work on its own with Windows 8). 我建议你围绕它建模你的后端(你必须将C#与你的F#代码结合起来,因为F#在Windows 8上不起作用)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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