如何获得对Windows.Storage命名空间的访问? [英] How do I get access to Windows.Storage namespace?

查看:41
本文介绍了如何获得对Windows.Storage命名空间的访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将数据保存到Microsoft Store应用程序的文件中,因此我需要访问 Windows.Storage 命名空间,但是尚不清楚如何获取它.我无法将其添加为参考.我正在将Visual Studio 2017与.NET Framework 4.6.1结合使用.

I want to save data to files for my Microsoft Store app, so I need access to Windows.Storage namespace, but it's unclear how I can get it. I couldn't add it as a reference. I'm using Visual Studio 2017 with .NET Framework 4.6.1.

我的应用程序是Windows窗体应用程序,我已使用Desktop Bridge将其转换为UWP.

My app is a Windows Forms application that I converted to UWP using the Desktop Bridge.

推荐答案

专用的基本上,您可以采取两种方法:手动添加对UWP dll和winmd文件的引用,或者使用 UwpDesktop-Updated NuGet软件包,该软件包将自动为您解决此问题,但是此项目不会似乎不是最新的SDK,所以手动方法可能是您更好的解决方案.

Basically you can take two approaches: add the references to UWP dlls and winmd files manually or use the UwpDesktop-Updated NuGet package that will take care of this for you automatically, but this project doesn't seem to be up to date with the latest SDKs, so the manual approach may be a better solution for you.

这篇关于如何获得对Windows.Storage命名空间的访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆