How do I get access to Windows.Storage namespace?

2020-07-11 05:49发布

问题:

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.

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

回答1:

The recommended steps to get access to UWP APIs are listed in the dedicated blog post on Windows Blog.

Basically you can take two approaches: add the references to UWP dlls and winmd files manually or use the UwpDesktop 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.



标签: c# .net uwp