简体   繁体   English

PCL for Universal Apps中的IsolatedStorageFile在哪里?

[英]Where is IsolatedStorageFile in PCL for Universal Apps?

I started working on a universal app. 我开始开发通用应用程序。

So, I created a new Class library (Portable for Universal Apps) . 因此,我创建了一个新的类库(可用于Universal Apps) However, as soon as I tried to use the IsolatedStorageFile class, it said it was not there. 但是,当我尝试使用IsolatedStorageFile类时,它说它不存在。

And indeed, searching for it in Object Explorer did not reveal such a class in the references for this project, which are the default for such a project: .NET ( .NETPortable, v4.6 ) and Windows ( Portable,Version=7.0 ). 确实,在对象资源管理器中搜索它并没有在该项目的引用中显示此类,这是该项目的默认值:.NET( .NETPortable,v4.6 )和Windows( Portable,Version = 7.0 ) 。 Targeting is set as Windows 8.1 and Windows Phone 8.1 . 定位设置为Windows 8.1Windows Phone 8.1

According to the IsolatedStorageFile page at MSDN it should be supported for Windows Phone 8.1, Windows Phone 8, Windows 8.1 . 根据MSDN上的IsolatedStorageFile页面, Windows Phone 8.1,Windows Phone 8,Windows 8.1应该支持它。

Actually, I can't see it in the references for the Windows 8.1 and Windows Phone 8.1 app that were automatically created for the universal solution, either. 实际上,在为通用解决方案自动创建的Windows 8.1Windows Phone 8.1应用程序的参考中,我也看不到它。

Any idea how to use isolated storage in a universal app and what happened to IsolatedStorageFile ? 任何想法如何在通用应用程序中使用隔离存储以及IsolatedStorageFile发生了什么?

Isolated StorageFile is for Silverlight apps. 隔离的StorageFile用于Silverlight应用程序。 The equivalent for Runtime apps is StorageFile objects in ApplicationData.Current.LocalFolder. 运行时应用程序的等效项是ApplicationData.Current.LocalFolder中的StorageFile对象。

See Accessing app data with the Windows Runtime (Windows Runtime apps): http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx 请参阅使用Windows运行时访问应用程序数据(Windows运行时应用程序): http : //msdn.microsoft.com/zh-cn/library/windows/apps/hh464917.aspx

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

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