简体   繁体   中英

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) . However, as soon as I tried to use the IsolatedStorageFile class, it said it was not there.

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 ). Targeting is set as Windows 8.1 and Windows 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 .

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.

Any idea how to use isolated storage in a universal app and what happened to IsolatedStorageFile ?

Isolated StorageFile is for Silverlight apps. The equivalent for Runtime apps is StorageFile objects in ApplicationData.Current.LocalFolder.

See Accessing app data with the Windows Runtime (Windows Runtime apps): http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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