Solved

Mobile application configuration file

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Locking out functions on Android 5 79
HP System Management 2 102
Check this on live cell-phone, please? 4 58
sumNumber challenge 16 109
With Windows Embedded Handheld, called Windows Mobile, Microsoft re-designed the user interface. The Start Icon moved down to the bottom, inside the menu bar area.   If you need to hide the Start Icon and/or the SIP (soft input panel, softwar…
A short article about problems I had with the new location API and permissions in Marshmallow
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now