How to deploy additional files to a windows mobile 5.0 emulator

C

chunkai.hwang

Hi,
I changed the develpoment tool from vs2003 to vs2005 recently.
Originally, I have a xml file,named data.xml, added in the project in
the vs2003 project.
When I deployed the project to PocketPC2003 emulator, this XML File is
deplyed to the emulator successfully with the following code.
private string GetAppPath()
{
System.Reflection.Module[] modules =
(System.Reflection.Module[])
System.Reflection.Assembly.GetExecutingAssembly().GetModules();
string sPath =
System.IO.Path.GetDirectoryName(modules[0].FullyQualifiedName);
return sPath;
}

//......
private load()
{
string sPath = GetAppPath();
string sFileName= sPath + "\\" + "data.xml";
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(new FileStream(sFileName, FileMode.Open));
//...
}
However, a problem occured when I deployed the same code and XML
file(data.xml) in VS2005 to Windows Mobile5.0 PocketPC Emulator. In the
Debug Mode, It shows that the file, "\Program
Files\DicM5\data.xml",doesn't exist, where DicM5 is the project name
in the Visual Studio.
How to deploy additional file to Windows Mobile5.0 PocketPC Emulator ?
Any Help is appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top