How to refer to the file in Windows Phone app using ms-appx ?

Published on December 28, 2013 by abundantcode

Filed under Windows Phone

Last modified December 28, 2013

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 3795 times

When using the Speech recognition , you might refer to the Voice Command Definition file within your project .

Assuming that the file name is AbundantcodeGrammar.xml . you might refer to the file with the ms-appx as shown below.

new Uri(“ms-appx:///AbundantcodeGrammar.xml”,UriKind.RelativeOrAbsolute);

When referring to the file at runtime , there are times when you might receive an error

0x80070002 error – The system cannot find the file specified.

To avoid this error , set the Build Action property of the file to content and “Copy to Output Directory” to “Copy if newer” as shown below.

How to refer to the file in Windows Phone app using ms-appx ?

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment


x

You might be Interested in these Posts

How to delete user account from command line in Windows 10 ?

You can delete a user account from command line in Windows 10 using the net user command and specify...

How to add new user account from command line in Windows 10 ?

You can add a new user account in Windows 10 using command prompt using the net user command and pas...

How to open display settings from command line in Windows 10 ?

The display properties can be found in the settings app in Windows 10 which lets the users to config...