?
Solved

Mobile application configuration file

Posted on 2011-03-24
1
Medium Priority
?
324 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 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

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…
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month9 days, 13 hours left to enroll

762 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