Open a project file in phone7

后端 未结 2 953
一整个雨季
一整个雨季 2021-02-10 16:11

Howdy, I have a project in VisualStudio which contains a folder \'xmlfiles\' below the root node. This folder contains a file \'mensen.xml\' which I try to open ...

Howe

2条回答
  •  深忆病人
    2021-02-10 16:47

    The emulator does not have access to the PC file system. You must deploy the file to the target (emulator). The easiest way to do this is mark the file as an embedded Resource. Set the file's Build Action to 'Resource' and then extract it at runtime with code something like this:

    var res = Application.GetResourceStream(new Uri([nameOfYourFile], UriKind.Relative)) 
    

提交回复
热议问题