Solved

Mobile application configuration file

Posted on 2011-03-24
1
308 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
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 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