1

Closed

I can't get it to work

description

Hi Alovchin,
I downloaded the source you have generously provided, extracted the libs to the dev directory, added a flac file (called music.flac) to the Audio directory, and changed the code in the MainPage.xaml.cs to set the file name, as in:
StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(
                new Uri("ms-appx:///Audio/music.flac", UriKind.Absolute));
but on emulator or device, your 8.0 version and 8.1 versions both will not work and give me the following error:
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll
An exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll but was not handled in user code
Additional information: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
The music.flac file is definitely in the Solution explorer.
It seems to be working for others, what could I be missing?

Thanks kindly for your help!

file attachments

Closed Sep 22, 2014 at 3:54 AM by Alovchin

comments

Alovchin wrote Sep 21, 2014 at 2:57 PM

Hi Alixbar,

Your music.flac file must be a content. Open file's properties and set "Build Action" to "Content". See more here: http://msdn.microsoft.com/en-us/library/gg481775.aspx

Cheers!

Alovchin wrote Sep 21, 2014 at 2:57 PM

Hi Alixbar,

Your music.flac file must be a content. Open file's properties and set "Build Action" to "Content". See more here: http://msdn.microsoft.com/en-us/library/gg481775.aspx

Cheers!

Alixbar wrote Sep 21, 2014 at 10:59 PM

Thanks so much Alovchin, it is now playing.

wrote Sep 22, 2014 at 3:54 AM