C# Don';我不知道如何使用MSAPPX(wp8)引用项目中的文件

C# Don';我不知道如何使用MSAPPX(wp8)引用项目中的文件,c#,windows-phone-8,C#,Windows Phone 8,我想引用我的项目中的语法文件(Rootfile->folder named grammar->the file named numbersgrameram)。我使用了这行代码,但它告诉我0x80070002错误(系统找不到指定的文件): urinumbers=新的Uri(“ms-appx:///Grammar/NumbersGrammar.grxml“,乌里金。绝对)您是否尝试过改用appdata?在您的情况下,完整路径是 new Uri("appdata:/Grammar/NumbersGra

我想引用我的项目中的语法文件(Rootfile->folder named grammar->the file named numbersgrameram)。我使用了这行代码,但它告诉我0x80070002错误(系统找不到指定的文件):


urinumbers=新的Uri(“ms-appx:///Grammar/NumbersGrammar.grxml“,乌里金。绝对)

您是否尝试过改用
appdata
?在您的情况下,完整路径是

new Uri("appdata:/Grammar/NumbersGrammar.grxml");
显然,尽管
appdata
ms-appx
都指向安装文件夹,但它们必须用于不同的情况


来源:

确保文件存在于指定位置,并且其
生成操作
属性设置为
内容