Solved

Mobile application configuration file

Posted on 2011-03-24
1
315 Views
Last Modified: 2013-12-27
Hello,

I want to application configuration file to my mobile device application developed with Visual C# 2008. The file can be XML or TXT. How can I add this file type and force Visual Studio 2008 to deploy it with application executable? Whhat will be the path to access this file from code?

Platform: Windows 6.1, dorNet CE 3.5
0
Comment
Question by:smetechit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 500 total points
ID: 35206011
- mark it as "Content" in file properties and also select one of the "Copy ..." options

- for the path to the file, it is copied to the same folder as your binaries, so you can do as in the code snippet

public string GetFullPath(string filename)
{
    string appDir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);

    return System.IO.Path.Combine(appDir , filename);
}

Open in new window

0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to setup the internet connectivity on Windows Mobile Emulator.   I assume that you already have Microsoft Visual Studio, Microsoft Windows Mobile SDK's and the emulator installed. The emulator is available with Visual Studi…
When I was a beginner in Windows Mobile programming, even for small test I used to create a single MFC dialog-based application with one button, and put my test code in the OnLButtonDown method. For Pocket PC it worked fine, on some Windows CE d…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question