0

我想使用 windows phone 7 打开 plist 文件,显然他无法理解文件的扩展名,因为当我将它从 file.plist 更改为 file.xml 时它可以工作!但我需要它来处理 plist 扩展。

我正在使用此代码打开它:

var resource = Application.GetResourceStream(
    new Uri(@"/myproject;component/cdp/document-category-info.plist", 
    UriKind.Relative)); 
StreamReader streamReader = new StreamReader(resource.Stream); 
string x = streamReader.ReadToEnd();
4

1 回答 1

0

Are you trying to load a file from Isolated Storage or is your plist embedded within one of your assemblies as a resource or included in your app's setup?

Your code above constructs an isolated storage file object, but never uses it and then tries to read the named resource from your EXE.

于 2013-03-08T10:44:19.373 回答