none
file.OpenStreamForReadAsync is not available in background task class

    Question

  •  I had copy pasted my code from the metro style app to the background app and I found

    StorageFile file = await ApplicationData.Current.LocalFolder.GetFileAsync(HardCodedConstants.categoriesFileName);
                file.OpenStreamForReadAsync();

     and I found openstreamforreadasync isnt valid anymore ! 

    what am I doing wrong ?? 


    Saturday, November 17, 2012 12:19 PM

Answers

  • add a using:

    using System.IO
    


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Marked as answer by Abhik Mitra Saturday, November 17, 2012 12:37 PM
    Saturday, November 17, 2012 12:30 PM

All replies

  • add a using:

    using System.IO
    


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Marked as answer by Abhik Mitra Saturday, November 17, 2012 12:37 PM
    Saturday, November 17, 2012 12:30 PM
  • I had the same problem.  I wonder why the auto resolve feature in VS2012/2013 does not resolve this?
    Friday, November 08, 2013 5:39 PM
  • so far i know auto resolve doesnt fix extension methods

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Friday, November 08, 2013 9:08 PM