locked
System filenot found exception RRS feed

  • Question

  • hello System filenot found exception when I run the code

    var uri = newSystem.Uri("ms-appx:///Assets/sa.pdf");

    StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(uri);

    but it works for

    var uri = newSystem.Uri("ms-appx:///Assets/sa.txt");

    StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(uri);


    Santana George


    Wednesday, August 7, 2013 11:15 AM

Answers

  • Hello SANTANA GEORGE,

    Can you set Build Action of your file (sa.pdf) to Content?

    If not than this error is comes. So You set this file property Build Action --> None by default to content.

    • Marked as answer by Santana George Saturday, August 10, 2013 12:02 PM
    Wednesday, August 7, 2013 11:32 AM
  • It could be that you have different build types specified for the text and the pdf file. Please check if the Buildtype is the same. You can do it by right clicking the file in the solution explorer and select Properties.

    lh

    • Marked as answer by Santana George Saturday, August 10, 2013 12:02 PM
    Wednesday, August 7, 2013 11:29 AM

All replies

  • It could be that you have different build types specified for the text and the pdf file. Please check if the Buildtype is the same. You can do it by right clicking the file in the solution explorer and select Properties.

    lh

    • Marked as answer by Santana George Saturday, August 10, 2013 12:02 PM
    Wednesday, August 7, 2013 11:29 AM
  • Hello SANTANA GEORGE,

    Can you set Build Action of your file (sa.pdf) to Content?

    If not than this error is comes. So You set this file property Build Action --> None by default to content.

    • Marked as answer by Santana George Saturday, August 10, 2013 12:02 PM
    Wednesday, August 7, 2013 11:32 AM