Getting the path of a folder on Windows Phone 7

30 views Asked by At

I have a folder on my solution called "XMLData" under it there is a file called Questions.xml

i have the following code on app.xaml

public static XDocument doc = XDocument.Load("./XMLData/Questions.xml");

when i start the app visual studio gives me the following error:

 An unhandled exception of type 'System.Xml.XmlException' occurred in System.Xml.dll

Additional information: Cannot open './XMLData/Questions.xml'.
 The Uri parameter must be a relative path pointing to content inside the Silverlight application's XAP package. 


 If you need to load content from an arbitrary Uri, please see the documentation on Loading XML content using WebClient/HttpWebRequest.

How can i fix it?

I tried

/XMLData/Questions.xml

XMLData/Questions.xml

../XmlData/Questions.xml
0

There are 0 answers